Click or drag to resize
IVssBackupComponentsRevertToSnapshot Method
The RevertToSnapshot(Guid, Boolean) method reverts a volume to a previous shadow copy. Only shadow copies created with persistent contexts (AppRollback, ClientAccessible, ClientAccessibleWriters or NasRollback) are supported.

Namespace: Alphaleonis.Win32.Vss
Assembly: AlphaVSS.Common (in AlphaVSS.Common.dll) Version: (
void RevertToSnapshot(
	Guid snapshotId,
	bool forceDismount


Type: SystemGuid
The identifier of the shadow copy to revert
Type: SystemBoolean
If this parameter is , the volume will be dismounted and reverted even if the volume is in use.
ArgumentExceptionOne of the parameter values is not valid.
UnauthorizedAccessExceptionThe calling process has insufficient privileges.
OutOfMemoryExceptionOut of memory or other system resources.
SystemExceptionUnexpected VSS system error. The error code is logged in the event log.
VssBadStateExceptionThe backup components object is not initialized, this method has been called during a restore operation, or this method has not been called within the correct sequence.
VssObjectNotFoundExceptionThe snapshotId parameter is not a valid shadow copy.
VssProviderNotRegisteredExceptionThe provider was not found.
VssRevertInProgressExceptionThe volume already has a revert in process.
VssUnsupportedContextExceptionRevert is only supported for persistent shadow copies.
VssVolumeInUseExceptionThe forceDismount parameter was , and the volume could not be locked.
VssVolumeNotSupportedExceptionRevert is not supported on this volume.
NotImplementedExceptionThe provider for the volume does not support revert operations.
NotSupportedExceptionThis operation is not supported on the current operating system.
This operation cannot be canceled, or undone once completed. If the computer is rebooted during the revert operation, the revert process will continue when the system is restarted.
Note Note
Windows XP, Windows Server 2003 and Windows Vista: This method requires Windows Server 2008 or Windows Server 2003 SP1
See Also