Configure Volume Shadow Copy on Windows Server

Working with Shadow Copy requires elevated privileges. I usually access Shadow Copy through vssuirun. This prompts for elevating privileges. Once open, use the Settings pane to select the volume you’d like to schedule backups to. Then choose how much space shadow copies can use. Click on the Schedule button to configure how frequently backups run. I usually try to time these things for when the server isn’t slammed. Otherwise you might run into issues.

By default, Shadow Copy keeps 64 versions of each file. Running snapshots every hour. You can restore easily, by selecting a volume, although volume-based restores are not supported on system derives. Restores can be done using vssuirun and then using the Revert Now… button.

The quicker way to do all this is to use the vssadmin command, which has a lot more options. Run vssadmin along with the list verb to see a list of different types of objects. For example, to see a list of the storage used with Shadow Copy, use the vssadmin command, with the list verb and then the shadowstorage noun:

vssadmin list shadow storage

You’ll then see the storage for each volume, along with the space used, allocated and max for each. Run vssadmin followed by the list verb then shadows to see your shadow copy sets:

vssadmin list shadows

Each shadow copy set is displayed along with a generated ID. Creation times, volume information, tarot location, name of server and the type (e.g. client accessible) are all displayed. You can also use the add verb with these same options, along with a variety of switches for each. To add storage /for the a drive (G) on a drive (H) and give it a maxsize (64GB) use the following:

vssadmin add shadowstorage /for=g: /on=H /maxsize=64GB

Once you’ve added Shadow Copy Storage for a volume, you can then run a manual shadow copy on an enabled volume using the create verb, along with the shadow noun and then the /for: option, specifying the volume:

vssadmin create shadow /for=g:

To revert to a shadow copy, and this is dangerous as you might not want to revert so be careful here, use the revert verb along with shadow (yes, it’s singular as there’s only one) and then the /shadow option followed by the GUID of the copy to revert to:

vssadmin revert shadow /shadow=(AAAAAAAA-BBBB-11111-2222-CCCCCCCC)

To delete a shadow copy, use the delete verb, along with the shadows noun (yes, that’s randomly plural) and then the /shadow option following by the GUID of the shadow copy to delete (yes, I made that GUID up):

vssadmin delete shadows /shadow=(AAAAAAAA-BBBB-11111-2222-CCCCCCCC)

Alliteratively, use favorite option for this verb /oldest which just tosses the oldest backup (less typing, I’m lazy):

vssadmin delete shadows /for=g: /oldest

This is interactive as well, so you’ll have to hit y to confirm. Finally, when disabling all shadow copies (holy shiznit batman, we’re out of space big time) use the delete verb but this time followed by the drive letter to clear copies for:

vssadmin delete shadowstorage /for:g:

One comment

  • Pingback: WINDOWS UPDATE LOCAL SERVER 2014

  • Comments are closed.