The Blown Light Bulb

Information worth to share...


How to manage Shadow Copy (VSS) from command line

Shadow Copy (or Volume Snapshot Service, VSS) is a technology that was initially introduced on Windows XP to let NTBackup tool to take non-persistent snapshots of application locked files to get them backed up. Creation of persistent snapshots (the ones not being deleted after a reboot) was introduced with Windows Server 2003 and used to create periodic incremental snapshots of data or deltas (differences) of changed files over time, allowing to store up to 64 snapshots.

Shadow Copy for shared folders provides point-in-time copies of files that are located on shared network resources, such as a file server, and

it is really useful because let you recover previous version of accidentally deleted files, overwritten files or simply to let you compare two versions of the same file.

As a systems administrator, people come to me to recover files they deleted accidentally. Some times there is nothing you can do, on other occasions backup tapes made your day, but 98% of the time I get it recovered with VSS Previous Versions. Furthermore, once you have taught your users on how to recover the files by themselves, you get some free time to focus on more important things.

To manage Shadow Copy (VSS) from the command line you can use VSSadmin.exe which is included as an OS tool. VSSadmin.exe /? lists all operative available options you can use; some of them are:

**_Vssadmin add shadowstorage
_**Adds a shadow copy storage association for a specified volume.

**_Vssadmin delete shadowstorage
_**Deletes volume shadow copy storage associations.

**_Vssadmin list shadowstorage
_**Lists all shadow copy storage associations on the computer.

**_Vssadmin create shadow
_**Creates a new shadow copy of a specified volume.

**_Vssadmin delete shadows
_**Deletes shadow copies of a specified volume.

Vssadmin list shadows
Lists all existing shadow copies of a specified volume. Without parameters list all shadow copies on the computer.

Check Microsoft’s TechNet for the full command syntax and available options.

I also recommend you to check the links below to extend your VSS knowledge: