By Delia / Last update May 31, 2023

VSS (Volume Shadow Copy Service) is actually not a new technology, as Windows 2003 and Windows XP SP1, released around 2003, both provide support for VSS. In recent years, Microsoft has been supporting VSS in more and more of its first-line products, including Exchange, SQL, AD, DPM, and so on. In Windows 2008, even the system's own backup tool has been replaced with a VSS version.

So what exactly is VSS, and how does it work?


What is Volume Shadow Copy Service (VSS)

Volume Shadow Copy Service (VSS) is a service introduced by Microsoft in Windows Server 2003 to make it easier for users to recover lost files without the assistance of IT professionals. In addition, VSS provides a more flexible backup solution, which gives even small businesses the ability to recover lost data.

In fact, VSS also provides large enterprises with more recovery options than the basic tools and helps them reduce the number of IT professionals in data recovery tasks.

What VSS Can Do

A new technology always appears to solve an existing problem.

In the IT field, many resources are used for backup and recovery of various systems. It is not uncommon that users inadvertently store files with incorrect information, accidentally delete files, or suffer other data issues.

When users need to retrieve data, they need to ask technical support staff to perform manual recovery, which can be quite time-consuming.

data recovery

And by using VSS you can create data copy points on specific volumes, so that you can restore data to a previous state on demand in the future. These 2 key features help users recover accidentally deleted files even without efficient backup policies.

VSS gives administrators the ability to publish shared folders on the server and make point-in-time backups at certain intervals (up to 65 copies can exist for a specified period of time). This allows end users to safely work with files and restore to earlier versions at any time without the need for IT intervention.

In the field of backup, traditional backup solutions are generally full backup, incremental backup and differential backup. Among them, full backups take too long, and incremental and differential backups usually require third-party software support. VSS was created to solve these problems.

2 Methods of Creating Volume Shadow Copies

1. Clone (Full Copy/Split Mirror)

Synchronize the source and target volumes by software or hardware. The data of the 2 sides are identical until the synchronization connection is broken, and the data of the target volume and the source volume remain independent and read-only after the synchronization connection is broken.

2. Copy-on-Write (Differential Copy)

This method can also be implemented in software or hardware. When a write operation occurs on a volume that needs to be copied, the block being written to is first copied to another location where the differential data is stored, and the operation is indexed and logged. Using the data in the source volume and the differential data, we logically have a source volume at some previous point in time.

The advantage of this method is that it requires little additional storage space, but the disadvantage is that there are additional read and write operations on the source volume, and the data on the source volume must still be there when data recovery is done.

Components of the Volume Shadow Copy

vss components

Requestors: Programs that initiate volume shadow replication, usually backup programs.

Writers: First and foremost, they are part of the application to ensure that the data at the application level is intact and consistent when doing volume shadow replication. Database level applications generally have their own Writers, such as Exchange, SQL, AD, etc.

Providers: Components that create and maintain volume shadow copies. This can be implemented through the operating system, hardware, or the software itself.

Source volume: Contains the data volumes that need to be backed up.

Storage volume: The data volume that provides the provider with the copy-on-write files.

Basic Process of Creating Volume Shadow Copy

vss process

  • Requestor asks VSS to enumerate writers and their metadata in preparation for volume shadow replication.
  • VSS informs the application Writer to prepare for volume shadow replication.
  • Writer starts making preparations, such as writing the contents of the memory to the database, writing the contents of the logs to the database, and so on. Notify VSS when it is done.
  • VSS initiates the commit.
  • VSS suspends the writer and requestor for a few seconds to create a volume shadow copy. This time cannot exceed 60 seconds. During this time, VSS writes the file system buffs in memory to the hard disk to ensure file consistency on the hard disk.
  • VSS tells the requester to take up to 10 seconds to create the volume shadow replica.
  • VSS unfreezes the file system. When the volume shadow copy is created, VSS releases the inactive writer and all read and write IO operations in the queue are completed.
  • VSS confirms that the IO was successful during the creation of the volume shadow replication, if it fails it means that the volume shadow replication is inconsistent, VSS notifies the requestor and deletes the volume shadow replication, the requestor can choose to retry or notify the administrator.
  • VSS starts copying the data from the volume shadow copy and returns the location information to Requestor after the copy is complete. This step is the longest process of backing up the data.

Notes on Applying VSS

The only downside to this service is that you need to set aside more disk space for each volume shadow, because you have to store these copies somewhere. However, because VSS uses pointer data, these copies take up much less space than you might think, and you can store them efficiently.

You can also use replication in conjunction with backup tools and VSS to move copies to another VSS - an available server at another site. So, if the original server crashes in a disaster, your end users can still access their data. Since the VSS takes a snapshot at certain intervals and does not lock the parent files while they are in use, open file locking does not affect the Replication and Backup tool.

In addition to copying open files, you can also back up VSS snapshots while end users are working with the files. This feature significantly improves backup capabilities by eliminating backup windows, open file locking, and other obstacles.

You will probably also experience CPU utilization issues (when running backup agents) and LAN utilization issues (when backing up data across a network), but this does not prevent end users from using the files.