Shadow Copy Creation Details

In general, how a shadow copy is created depends on the type of shadow copy to be created, its context, and the role accorded to writers in the shadow copy operation. (See Shadow Copy Context Configurations for more information.)

The shadow copy context is set by calling the IVssBackupComponents::SetContext method. Before calling the IVssBackupComponents::DoSnapshotSet method to create a shadow copy, requesters must call the IVssBackupComponents methods in the order specified in the following sections.

Prerequisites for All Shadow Copies

Regardless of the level of writer participation, the creation of any shadow copy will always require the requestor be initialized with calls to IVssBackupComponents::InitializeForBackup and IVssBackupComponents::StartSnapshotSet.

If this call is not made, the IVssBackupComponents::DoSnapshotSet method will return an error.

Shadow Copies with Writer Participation

If the shadow copy context specifies writer participation (that is, IVssBackupComponents::SetContext is called with VSS_CTX_BACKUP, or VSS_CTX_APP_ROLLBACK):

Shadow Copies without Writer Participation

Creating shadow copies without writer participation is discouraged for standard backup applications (see Backups without Writer Participation).

There are uses, such as fast backups of a disk to provide a safety net against accidental file corruption, which can be conducted without explicit writer participation. Such a shadow copy would have a context of either VSS_CTX_FILE_SHARE_BACKUP or VSS_CTX_NAS_ROLLBACK.

For this type of shadow copy, note the following: