Can you use Volume Shadow Copy Service Snapshots on removable flash drives?

Josh Orenberg 1 Reputation point
2022-05-23T19:03:56.917+00:00

Hi I have a quick question - can you use Volume Shadow Copy Service snapshots on removable flash drives?

I am making a data backup program that uses Volume Shadow Copy Service to back up drives. When I back up external hard drives setting up the VSS snapshot works well with drive type DRIVE_FIXED as returned by GetDriveType. When I try to back up a thumb drive setting up the VSS snapshot (specifically the AddToSnapshotSet function) fails with VSS_E_VOLUME_NOT_SUPPORTED ffffffff8004230c as reported by the VSS API functions. GetDriveType returns drive type DRIVE_REMOVABLE. All the drives are NTFS.

Is it possible to use VSS snapshots to back up thumb drives? Do I have to enable it for the drive?

Also I assume it isn't possible to do VSS snapshots on network shares and network share mapped drives right?

Thanks!

Windows development | Windows API - Win32
{count} votes

2 answers

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
    2022-05-24T02:06:56.903+00:00

    According to AddToSnapshotSet Remarks, You need to specify proper provider which supports the removable volume or remote file share in ProviderId.

    If ProviderId is GUID_NULL, the default provider is selected according to the following algorithm:

    If any hardware provider supports the given volume or remote file share, that provider is selected.
    If there is no hardware provider available, if any software provider supports the given volume, it is selected.
    If there is no hardware provider or software provider available, the system provider is selected. (There is only one preinstalled system provider, which must support all nonremovable local volumes.)

    You can obtain information about available providers by using IVssBackupComponents::Query or you can implement a provider.

    0 comments No comments

  2. Josh Orenberg 1 Reputation point
    2022-05-24T23:25:33.053+00:00

    Thanks XiaopoYang-MSFT. I'm guessing I'm using the system provider since I pass GUID_NULL to the ProviderId parameter of AddToSnapShot set and am not aware of any other hardware or software providers. I'm just writing a backup program in C++ and am not making my own software provider or using any hardware providers so far as I know. Does this sound correct? If so the question becomes does the system provider support VSS snapshots on thumb drives and network shares?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.