How Configuration Manager Backup Uses the Volume Shadow Copy Service
The Volume Shadow Copy Service (VSS) is a Windows service that made its debut with Windows XP and Windows Server 2003. This service provides the ability to create a point in time image (shadow copy) of one or more volumes. These shadow copies can then be used to perform backup operations. Shadow copies are created very quickly in general because instead of backing up an entire volume file by file, VSS only needs to track changes to existing files. By tracking disk changes at the volume level, VSS is able to present a static snapshot of changed data to a backup process and then copy a point-in-time snapshot of those files to a backup destination even while the actual files are being written to.The Configuration Manager 2007 backup process utilizes the VSS service, and associated components, to perform site backups. This is a good thing because using VSS means we only need to stop site services just long enough for the backup snapshot to be created. Generally, this is only a few seconds or minutes at most instead of the hours it took previously to create the backup snapshot in SMS 2003.
Of course, this new functionality comes with a bit of a price tag. VSS requires sufficient storage space to create and maintain shadow copies. By default the storage association (where VSS keeps the differences) is set to the same drive being shadow copied (self). Using the default storage association, with the source and backup destination on the same volume, causes VSS to shadow all changes to the volume while the snapshot is active, and also increases the disk churn while the backup files are being written out. This can lead to high disk I/O and disk space consumption during the backup process. If too much space is used, then the snapshot creation, and subsequently the Configuration Manager site backup task, can fail.
To avoid that happening, it is recommended to change the VSS storage association to a different volume than the data being backed up whenever possible. So, the best practice is to set the storage association to another volume that has free space equivalent to 50% of the size of the data being backed up and also configure the Backup ConfigMgr Site Server maintenance task to save the backup files to another volume. For example, on a server with three volumes (C, D, and E) if Configuration Manager is installed on the C drive, you could configure the VSS shadow copy storage association for the C drive to use the D drive and then have the Configuration Manager backup task use the E drive for the final backup destination.
The vssadmin.exe command line utility is used to create or modify VSS storage associations. So staying with the three volume scenario I described earlier, to change the VSS storage association for the C drive to use the D drive, you use the Add ShadowStorage command like so (remember that the minimum size supported for the MaxSize value is 300MB and the size you use should be equal to at least 50% of the size of the data to be backed up):
Vssadmin Add ShadowStorage /For=C: /On=D: /MaxSize=30000MB
To view the newly created shadow copy storage association information, you use the List ShadowStorage command:
Vssadmin List ShadowStorage
If you’ve reviewed the size of the backup snapshot and discovered that you actually need more than the 30 GB you initially dedicated for the storage association, you can just resize it by using the aptly named, Resize ShadowStorage command:
Vssadmin Resize ShadowStorage /For=C: /On=D: Mazsize=50000MB
This would now give you 50 GB of dedicated space for the storage association.
If you then decide that you want to move the storage association because the D drive is filling up with data for some reason, you can use the Delete ShadowStorage command before recreating the shadow storage association on a different volume:
Vssadmin Delete ShadowStorage /For=C: /On=D:
In addition to viewing and changing VSS shadow storage asspociations, Vssadmin.exe can also be used to check the health of the Configuration Manager VSS backup components. The SMS Writer is used to backup site data and the SQL Server writer is used to backup the site database. To verify these components, the List Writers command is used:
Vssadmin List Writers
The output of that command will list the installed VSS writer components, their current state (hopefully ‘stable’) and what their last error was (hopefully ‘No error’).
I’ve given some examples of how you can use vssadmin, but for more information about the supported commands, you should check out the official reference here: http://technet.microsoft.com/en-us/library/cc754968.aspx.
If you are still curious about vssadmin commands, or what to know more about backing up and recovering Configuration Manager sites in general, head over to the Configuration Manager documentation library and read up about it at http://technet.microsoft.com/en-us/library/bb632545.aspx or the Backup and Recovery forum at http://social.technet.microsoft.com/Forums/en-US/configmgrbackup/threads/. If you are coming to MMS 2009, you can also sign up for my instructor-led lab: Backing up and Recovering ConfigMgr Sites (IY17)!
This posting is provided “AS IS’ with no warranties and confers no rights.