==== Windows Manage VSS Shadows ====
The commands must be run with elevated administrator command prompt
=== Delete VSS Shadows ===
C:\> VSSAdmin Delete Shadows /For=ForVolumeSpec [/Oldest] [/Quiet]
C:\> VSSAdmin Delete Shadows /Shadow=ShadowId [/Quiet]
C:\> VSSAdmin Delete Shadows /All
- For the given ForVolumeSpec deletes all matching shadow copies.
If /Oldest is given, the oldest shadow copy on the volume is deleted
If /All is given, then all shadow copies on all volumes that can be
deleted will be deleted. If /Shadow=ShadowId is given, the shadow copy
with that Shadow Copy ID will be deleted. Only shadow copies that have
the ClientAccessible type can be deleted.
- The Shadow Copy ID can be obtained by using the List Shadows command.
When entering a Shadow Copy ID, it must be in the following format:
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
where the X's are hexadecimal characters. This ID can be obtained
through the List Shadows command.
Example Usage: vssadmin Delete Shadows /For=C: /Oldest
=== Add VSS Shadow Storage ===
C:\> VSSAdmin Add ShadowStorage /For=ForVolumeSpec /On=OnVolumeSpec /MaxSize=MaxSizeSpec
- Adds a shadow copy storage association between the volume specified by
ForVolumeSpec and the volume specified by OnVolumeSpec the shadow copy
storage volume. Storage for shadow copies of ForVolumeSpec will be
stored on OnVolumeSpec. The maximum space the association may occupy on
the shadow copy storage volume is MaxSizeSpec. If MaxSizeSpec is set to
the value UNBOUNDED, the shadow copy storage space will be unlimited. If the
maximum number of shadow copy storage associations have already been made,
an error is given. MaxSizeSpec can be specified in bytes or as a percentage
of the ForVolumeSpec storage volume. For byte level specification,
MaxSizeSpec must be 320MB or greater and accepts the following suffixes:
KB, MB, GB, TB, PB and EB. Also, B, K, M, G, T, P, and E are acceptable
suffixes. To specify MaxSizeSpec as percentage, use the % character as the
suffix to the numeric value. If a suffix is not supplied, MaxSizeSpec is in bytes.
Example Usage: vssadmin Add ShadowStorage /For=C: /On=D: /MaxSize=900MB
vssadmin Add ShadowStorage /For=C: /On=D: /MaxSize=UNBOUNDED
vssadmin Add ShadowStorage /For=C: /On=C: /MaxSize=20%
=== Resize VSS Shadow Storage ===
C:\> VSSAdmin Resize ShadowStorage /For=ForVolumeSpec /On=OnVolumeSpec /MaxSize=MaxSizeSpec
- Resizes the maximum size for a shadow copy storage association between
ForVolumeSpec and OnVolumeSpec. Resizing the storage association may cause shadow
copies to disappear. As certain shadow copies are deleted, the shadow copy storage
space will then shrink. If MaxSizeSpec is set to the value UNBOUNDED, the shadow copy
storage space will be unlimited. MaxSizeSpec can be specified in bytes or as a
percentage of the ForVolumeSpec storage volume. For byte level specification,
MaxSizeSpec must be 320MB or greater and accepts the following suffixes: KB, MB, GB, TB,
PB and EB. Also, B, K, M, G, T, P, and E are acceptable suffixes. To specify MaxSizeSpec
as percentage, use the % character as the suffix to the numeric value. If a suffix is not
supplied, MaxSizeSpec is in bytes.
Example Usage: vssadmin Resize ShadowStorage /For=C: /On=D: /MaxSize=900MB
vssadmin Resize ShadowStorage /For=C: /On=D: /MaxSize=UNBOUNDED
vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=20%
=== Delete VSS Shadow Storage ===
C:\> VSSAdmin Delete ShadowStorage /For=ForVolumeSpec [/On=OnVolumeSpec] [/Quiet]
- Deletes an existing shadow copy storage association between
ForVolumeSpec and OnVolumeSpec. If no /On option is given, all shadow
copy storage associations will be deleted for the given ForVolumeSpec.
Example Usage: vssadmin Delete ShadowStorage /For=C: /On=D:
Remark: See "Move VSS Shadow Storage"
=== Move VSS Shadow Storage ===
There is no specific command to move a shadow storage for a volume. You must remove it and add a new one.
Remark: Remove a shadow storage is sometimes refused because shadows are present, locked or in-use. You need to
delete these shadows and sometimes.... it fails. A workaround is to resize the shadow storage to 320 MB (the
smallest size) to force Windows itself to remove the shadows.