Windowsのバックアップで、VSS,SPPのエラーが出た時の対処法

 ある日、突然Windows10のバックアップを行うと、VSSなどのエラーが出て途中で終わってしまうようになった。バックアップが短時間でエラーになり、オプションで以下のようなメッセージが表示される

シャドウコピーを作成できませんでした。詳細については、"VSS"および"SPP"のアプリケーションイベントログを確認してください。
詳細:ライターで一時的なエラーが発生しました。バックアップ処理を再試行すると、エラーは発生しない可能性があります。

 ディスク管理ツールなどでストレージのコピーを行うとGPTのパーティション情報が壊れて起きるようになるらしい。

 以下を参考に修正を行った。

https://qiita.com/kenichiuda/items/b6d92a6352c0ee5e37c1
https://community.acer.com/en/discussion/comment/423300#Comment_423300

 以下からgptfdiskをダウンロードする。

https://sourceforge.net/projects/gptfdisk/

 パーティション情報を見てみると名前のところが文字化けしている。

C:\xxx>gdisk64.exe 0:
GPT fdisk (gdisk) version 1.0.8

The protective MBR's 0xEE partition is oversized! Auto-repairing.

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): ?
b       back up GPT data to a file
c       change a partition's name
d       delete a partition
i       show detailed information on a partition
l       list known partition types
n       add a new partition
o       create a new empty GUID partition table (GPT)
p       print the partition table
q       quit without saving changes
r       recovery and transformation options (experts only)
s       sort partitions
t       change a partition's type code
v       verify disk
w       write table to disk and exit
x       extra functionality (experts only)
?       print this menu

Command (? for help): i
Partition number (1-2): 1
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: xxxx
First sector: 63 (at 31.5 KiB)
Last sector: 468656270 (at 223.5 GiB)
Partition size: 468656208 sectors (223.5 GiB)
Attribute flags: 0000000000000000
Partition name: '・ーホャ'

 正常と思われる名前に書き換える。

Command (? for help): c
Partition number (1-2): 1
Enter name: Basic data partition

 Partition GUID code:のGUIDでパーティションの種類が分かるので、名前を以下のようにつけておくといいかもしれない。

Partition GUID code: DE94BBA4-06D1-4D40-A16A-BFD50179D6AC (Windows RE)
Partition name: 'Basic data partition'

Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition)
Partition name: 'EFI system partition'

Partition GUID code: E3C9E316-0B5C-4DB8-817D-F92DF00215AE (Microsoft reserved)
Partition name: 'Microsoft reserved partition'

Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition name: 'Basic data partition'

 これを全パーティションに対して、確認・修正を行う。

 書き込みをするとgptfdiskは終了する。

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to \\.\physicaldrive0.
Disk synchronization succeeded! The computer should now use the new
partition table.
The operation has completed successfully.

 さらに、PCに接続されている全GPTドライブも修正する。

 PCを再起動してバックアップを実行する。