Click or drag to resize

IVssBackupComponentsDeleteSnapshot Method

The DeleteSnapshot method deletes a shadow copy..

Namespace:  Alphaleonis.Win32.Vss
Assembly:  AlphaVSS.Common (in AlphaVSS.Common.dll) Version: 1.4.0.0 (1.4.0.0)
Syntax
void DeleteSnapshot(
	Guid snapshotId,
	bool forceDelete
)

Parameters

snapshotId
Type: SystemGuid
Identifier of the shadow copy to be deleted.
forceDelete
Type: SystemBoolean
If the value of this parameter is , the provider will do everything possible to delete the shadow copy. If it is , no additional effort will be made.
Exceptions
ExceptionCondition
UnauthorizedAccessExceptionThe caller does not have sufficient backup privileges or is not an administrator.
ArgumentExceptionOne of the parameters is not valid.
OutOfMemoryExceptionOut of memory or other system resources.
SystemExceptionUnexpected VSS system error. The error code is logged in the event log.
VssObjectNotFoundExceptionThe specified shadow copy does not exist.
VssProviderVetoExceptionExpected provider error. The provider logged the error in the event log.
VssUnexpectedProviderErrorExceptionUnexpected provider error. The error code is logged in the error log.
Remarks

The requester is responsible for serializing the delete shadow copy operation.

During a backup, shadow copies are automatically released as soon as the IVssBackupComponents instance is disposed. In this case, it is not necessary to explicitly delete shadow copies.

See Also