Shadow Copy Context Configurations

Requesters control a shadow copy's features by setting its context. This context indicates whether the shadow copy will survive the current operation, and the degree of writer/provider coordination.

Persistence and Shadow Copy Context

A shadow copy may be persistent—that is, the shadow copy is not deleted following the termination of a backup operation or the release of an IVssBackupComponents object.

Persistent shadow copies require _VSS_SNAPSHOT_CONTEXT contexts of VSS_CTX_CLIENT_ACCESSIBLE, VSS_CTX_APP_ROLLBACK, or VSS_CTX_NAS_ROLLBACK. Persistent shadow copies can be made only for NTFS volumes.

Nonpersistent shadow copies are created with contexts of VSS_CTX_BACKUP or VSS_CTX_FILE_SHARE_BACKUP. Nonpersistent shadow copies can be made for NTFS and non-NTFS volumes.

Writer Participation and Shadow Copies

A shadow copy context can be classified as either involving writers or not involving writers.

Shadow copy contexts that involve writers in their creation include:


Those that do not involve writers in their creation include:


One context can be used with both types of shadow copies, but cannot be used in creating a shadow copy:


Creating a shadow copy with a context of VSS_CTX_ALL (using IVssBackupComponents::StartSnapshotSet and IVssBackupComponents::DoSnapshotSet) is not supported.

Operations that support a context of VSS_CTX_ALL are the administrative operations IVssBackupComponents::Query, IVssBackupComponents::DeleteSnapshots, IVssBackupComponents::BreakSnapshotSet, and IVssBackupComponents::ExposeSnapshot.

Obtaining Shadow Copy Information

If a requester knows the identifying GUID of a shadow copy (its VSS_ID), it can obtain information about the context of a specific shadow copy (identified by its VSS_ID) by unpacking the VSS_SNAPSHOT_PROP structure returned by a call to IVssBackupComponents::GetSnapshotProperties.

To obtain context information about all shadow copies on a system, a requester examines the m_lSnapshotAttributes member of the Obj.Snap member of the VSS_OBJECT_PROP (which is a VSS_SNAPSHOT_PROP structure) structure obtained by using IVssEnumObject to iterate over the list of objects returned by a call to IVssBackupComponents::Query.