Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The RevertToSnapshot method reverts a volume to a previous shadow copy. Only shadow copies created with persistent contexts (VSS_CTX_APP_ROLLBACK, VSS_CTX_CLIENT_ACCESSIBLE, VSS_CTX_CLIENT_ACCESSIBLE_WRITERS, or VSS_CTX_NAS_ROLLBACK) are supported.
Syntax
HRESULT RevertToSnapshot(
[in] VSS_ID SnapshotId,
[in] BOOL bForceDismount
);
Parameters
[in] SnapshotId
VSS_ID of the shadow copy to revert.
[in] bForceDismount
If this parameter is TRUE, the volume will be dismounted and reverted even if the volume is in use.
Return value
This method can return one of these values.
| Value | Meaning |
|---|---|
|
The operation was successful. |
|
The calling process has insufficient privileges. |
|
There is an internal error. |
|
One of the parameters passed is not valid. |
|
The provider for the volume does not support revert operations. |
|
The caller is out of memory or other system resources. |
|
The SnapshotId parameter is not a valid shadow copy. |
|
The provider was not found. |
|
The volume already has a revert in process. |
|
Revert is only supported for persistent shadow copies. |
|
The bForceDismount parameter was FALSE, and the volume could not be locked. |
|
Revert is not supported on this volume. |
Remarks
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.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | None supported |
| Minimum supported server | Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only] |
| Target Platform | Windows |
| Header | vsbackup.h (include VsBackup.h, Vss.h, VsWriter.h) |
| Library | VssApi.lib |