Lindenberg Logo  
Lindenberg Software Backup
Language Icon

Shadow Copies & Volume Shadow Service (VSS)

Shadow Copies are the Windows mechanism to ensure consistent backups. The service providing that features is called Volume Shadow Copy Service or VSS for short. Lindenberg Software Backup uses shadow copies on both the client when preparing a backup and optionally also on the server to protect previous backups.

In essence, VSS creates a copy of every disk block before it writes new data to disk in order to allow to go back in time and recover overwritten information. The problem with VSS is that in the worst case it triples the amount of IO as every block needs to be read from the original location, written to another, and then new data is written. In that respect it is inferior to modern file systems like ReFS or btrfs that use a new disk location and update the metadata to point to new locations. On the other side, ReFS or btrfs might suffer from fragmentation as original and updated parts of a file are no longer stored contiguously.

Shadow copies are unfortunately also a tricky technology:
  • Shadow copies requires free space on the disk. Insufficient free space can cause shadow copy operations to fail.
  • Only one shadow copy can be created at the same time. If multiple applications try to create shadow copies in parallel, this may cause failures. Backup tries to detect the issue and retries several times.
  • Occasionally usage of shadow copies creates a situation where no more shadow copies can be created - and a system reset or restore is required to fix the situation. Fortunately I encountered this only with severe bugs in the software.
  • On some systems or drives, shadow copies are not enabled by default. In order to enable them please open a command prompt with administrative privileges, and then use vssadmin resize shadowstorage /for=<thedrive> /on=<thedrive> /maxsize=<somepercentage, e.g. 20%>.
  • The creation of shadow copies usually taskes something like a few seconds to half a minute. On a system under very heavy load I have seen the creation to take about an hour.
  • Occasionally a very busy system drops all shadow copies - you can see a Volsnap 25 error in the event log. It happened twice on my system, and searching the internet did not provide an acceptable solution to avoid that reliably. Thus it caused me to replace the reliance on shadow copies to store the backup history on the server by using differncing virtual hard disks in Backup 1.1. Nevertheless, shadow copies are a very important feature to create consistent backups on the client.