Overview of the Volume Shadow Copy Service (VSS)
Backup in large-capacity environments with ensured data integrity
Data centers that provide mission-critical services require their data storage to operate 24/7 without service interruption. It is also important to have a well-rounded disaster and recovery plan for these mission-critical data storages. However, large data sets can be cumbersome to back up using traditional methods - often taking several hours or days for a complete backup. Moreover, traditional backup methods lack mechanisms for maintaining data integrity. Data integrity relates to the insistent state of data files; for example, files that are open or data stored in RAM or a cache. In mission-critical data services, it is common to back up data while the applications that produce/modify data are still running. When using inconsistent backup copies for system restoration, it may result in data loss or even server/application failures if these backup files consist of application data or system state information.
To avoid these situations, we need a more intelligent backup method that can better protect data integrity. We provide QNAP Snapshot Agent and VSS Hardware Provider to preserve data integrity. Along with QNAP’s Snapshot technology, they simplify data protection and are more robust in system repair scenarios.
Volume Shadow Copy Service (VSS)
The Volume Shadow Copy Service (VSS) is a set of COM interfaces that implements a framework to allow volume backups to be performed while applications on a system continue to write to the volumes. It was first introduced in Windows Server 2003 and offered view, clone and restore features for consistent shadow copies (also known as a snapshot or a point-in-time copy). A complete VSS solution comprises the following basic parts:
A complete VSS solution comprises the following basic parts:
VSS Requester The is the software that requests the actual creation of shadow copies (or other high-level operations like importing or deleting them). Typically, this is the backup application such as the Windows Server Backup utility and APIs that request such service other backup software that runs on Windows.
VSS Service The part of the Windows operating system that is in charge of the whole VSS process and coordinates all of its parts to work together.
VSS Writer The VSS Writer instructs applications to perform required actions to create the volume shadow copy when requested. VSS writers for various Windows components (such as the registry) are included with the Windows operating system. This is typically included in VSS-aware applications, such as SQL Server® or Exchange Server.
VSS Provider This component creates and manages the shadow copies. This can be either a software or hardware based component. QNAP provides a VSS hardware provider for the ES NAS. A hardware provider offloads the task of creating and maintaining a shadow copy from the host operating system.
VSS Hardware Provider and VSS operation
The following diagram shows the components of Volume Shadow Copy Service (VSS), and the actions required to create a consistent shadow copy (also known as a snapshot or a point-in-time copy) of the data that is to be backed up.
To create a shadow copy, the components in the diagram perform the following actions:
- The backup application (requester) asks VSS to enumerate the writers, gather the writer metadata, and prepare for shadow copy creation.
- The Volume Shadow Copy Service (VSS) notifies all the writers to prepare their data for creating a shadow copy.
- Each writer prepares the data as appropriate, such as completing all open transactions, rolling transaction logs, and flushing caches. When the data is ready to be shadow-copied, the writer notifies the VSS.
- The VSS tells the provider to create the shadow copy.
- The VSS provider creates shadow copy of the target volume.
- The shadow copy is created.
- The VSS releases file system write I/O requests. Applications are free to resume writing data to the disk that is being shadow-copied.
VSS Snapshot Agent and VSS operation
- The NAS initiates backup requests and notifies Snapshot Agent to create the snapshot.
- The Snapshot Agent asks Volume Shadow Copy Service (VSS) to enumerate the writers, gather the writer metadata, and prepare for shadow copy creation.
- The VSS notifies all the writers to prepare their data for making a snapshot.
- Each writer prepares the data as appropriate, such as completing all open transactions, rolling transaction logs, and flushing caches.
- The Snapshot Agent tells the NAS to create the snapshot.
- The shadow copy is created.
- The VSS releases file system write I/O requests. Applications are free to resume writing data.
Backup software supporting VSS
|Microsoft||DiskShadow.exe||As the operating system|
|Acronis||Acronis Backup||Paid license and free trial|
|Altaro||Hyper-V Backup||Paid license and free license with restrictions|
|ARCserve||CA ARCserve Backup||Paid license and free trial|
|Commvault||Simpana 10||Paid license and free trial|
|DataCore||SANsymphony-V||Paid license and free trial|
|NAKIVO||Backup & Replication||Paid license|
|StorageCraft||ShadowProtect Virtual||Paid license and free trial|
|Symantec||Backup Exec||Paid license and free trial|
|Unitrends||Enterprise Backup||Paid license and free trial|
|Veeam||Backup Free Edition||Free|
|Veeam||Backup & Replication||Paid license and free trial|
Preparation for installation
We have learned from previous sections that creating application-consistent snapshots is easy with the QNAP Snapshot Agent and VSS Hardware Provider. Additionally, the underlying network architecture for interconnecting the storage array (ES NAS) and the application server is not hard to implement. All of the components (i.e. VSS Service, Requestor, Provider, and QNAP Snapshot Agent) can be installed on the same server on which the VSS-aware applications reside.
In our demonstration, the following configurations and servers are used:
- Storage device: QNAP ES NAS with QES 1.1.1 or newer.
- Server: Windows Server 2008 (R2), Server 2012 (R2)
- IP Settings: The QNAP Snapshot Agent and the ES NAS communicate over an IP network. For better reliability, it is recommended that both the storage device and server use static IP settings.
|Servers and their Network Settings|
|Application Server A||172.17.23.133||HV01||
Hyper-V Host and
Snapshot Agent Server
|Data Network A1||188.8.131.52||HV01||Data port 1 of HV01|
|Data Network A2||184.108.40.206||HV01||Data port 2 of HV01|
|ES NAS Network Settings|
|Storage Controller A (SCA) Management IP||172.17.22.96||Management port's IP address of Storage Controller A (SCA)|
|Storage Controller A (SCA ) Ethernet1 IP||220.127.116.11||Data port 1's IP address of Storage Controller A (SCA)|
|Storage Controller A (SCA ) Ethernet2 IP||18.104.22.168||Data port 2's IP address of Storage Controller A (SCA)|
|Storage Controller B (SCB) Management IP||172.17.22.87||Management IP address of Storage Controller B (SCB)|
|Storage Controller B (SCB ) Ethernet1 IP||22.214.171.124||Data port 1's IP address of Storage Controller B (SCB)|
|Storage Controller B (SCB ) Ethernet2 IP||126.96.36.199||Data port 2's IP address of Storage Controller B (SCB)|
|Storage pool owned by Storage Controller A ( SCA)||Pool 1||Storage pool with RAID 60 configuration owned by Storage Controller A (SCA)|
|iSCSI LUN||iSCSI LUN on Pool 1|
Before you begin installing the Snapshot Agent, verify the following prerequisites:
- The .NET Framework 3.5 is installed on the Windows Server.
- The VM and its applications to be backed up, including its settings, virtual disks and the default location for virtual machine files have to be stored on the same iSCSI LUN.
- Snapshot Agent cannot be installed if SMI-S Provider is already installed on the server.
- The Snapshot Agent does not support iSCSI connections with MPIO configuration.
- The Snapshot Agent does not support iSCSI connections with CHAP authentication.
- Please do not install too many VMs on the same iSCSI LUN. The VSS writer will be overloaded and may cause session time-out.
Install Snapshot Agent
1. Launch the Snapshot Agent installer, and click "Next" to continue.
2. Read the License Agreement. To accept the license agreement, click "I Agree". Follow the on-screen instructions to install the software.
3. Click "Finish" to close the installer.
Connect to the ES NAS using Snapshot Agent
1. Once you have completed the Snapshot Agent installation, open "QNAP Agent Manager". You will need to add the QNAP NAS that your Windows Server will be using as iSCSI storage by providing the IP address or by clicking "Scan NAS" to automatically find the NAS on the local network.
Note: If the error message "The Network port (8097 or 9500) are not available, please check and turn off the other application using port 8097 and 9500" appears, please exit Qfinder Pro if it is installed on the computer. You can find the program that uses these ports by entering "netstat –ano" in Windows PowerShell.
2. All QNAP NAS found will be listed. Double-click your ES NAS to connect to it.
3. You will be asked to provide your NAS login credentials, to confirm the port for the connection, and to enable the functions you want to install.
4. The Snapshot Agent will connect to the QNAP NAS and you can see the NAS been added to the list on the main page.
Note: If the error message "Register SnapAgent for Windows on NAS
5. Verify that the ES NAS has been successfully registered to your Windows Server.
To list the currently registered shadow copy writers, type" vssadmin list providers" in Windows PowerShell:
6. Check that "QNAP VSS HW Provider" is listed. If the QNAP VSS HW Provider is not listed, please redo the above steps to add the ES NAS.
7. It is possible to check if the agent is connected to the ES NAS from the QES. Log into the ES NAS as an administrator, go to "Storage Manager" > "iSCSI Storage" > "Snapshot", and then click "SnapAgent". A list of Snapshot Agents that are currently connected to the ES NAS will be displayed.
Create iSCSI LUN snapshots
In this section and following sections, we will demonstrate how to create application-consistent snapshots without taking the volumes offline or suspending the applications that write on the volumes.
Before taking an iSCSN LUN snapshot, please make sure that an iSCSI LUN has been created on the NAS. And the iSCSI LUN has been connected and used by the Windows Server. In our demonstration, we also created 6 VMs on the Windows server using Hyper-V Manager.
Use the following procedure to create iSCSI LUN snapshots
1. Log into the ES NAS as an administrator, go to "Storage Manager" > "iSCSI Storage", select an iSCSI LUN, and then from the "Snapshot" drop-down menu select "Take a Snapshot".
2. The "Take a Snapshot" screen appears. Give a name for the snapshot and select the duration to keep the snapshot. Then select the appropriate snapshot type. Click "OK' to start taking the snapshot. The crash-consistent snapshot backups up only data on the disk whereas the application-consistent snapshot backs up data from the disk, cache and memory. Moreover, to create a consistent view of application data during the course of the backup, the application-consistent backup needs Snapshot Agent whereas the crash consistent does not.
3. Log into the Hyper-V Manager, you can see the status of all virtual machines shows "Backing up" and the Checkpoints also indicate the time of the snapshot. The Snapshot Agent helps quiet a VM file system just prior to a backup.
4. The backup will take a few minutes if there are not many VMs. When the job is completed, the QES will display a message saying that the snapshot has been created.
Restore from iSCSI LUN snapshot
The snapshots can be used to quickly restore a VM to a previous point in time. Before starting a restore operation, please disconnect the host's iSCSI connection to the NAS. Therefore, it is recommended that users should shut down the VMs for system recovery.
1. Log into the NAS as an administrator, go to "Storage Manager" > "iSCSI Storage", and then select the LUN to be restored. Select "Action", and then select "Disabled" to disable the iSCSI LUN.
2. Select "OK" when you are prompted for confirmation.
3. Select "Action" and then select "Un-map" to un-map an iSCSI LUN to an iSCSI target.
4. The LUN should be listed in the "Un-Mapped iSCSI LUN List". Select the LUN and click "Snapshot" > "Snapshot Manager" to list all of its snapshots. Then select a snapshot to be restored and click "Revert".
5. A message appears to notify you that newer snapshots will be deleted after the restoration. Select "OK" to continue.
6. Select "OK" to complete the restoration.
7. To map the iSCSI LUN back to its target, select "Action" and select "Map".
8. Select which iSCSI target to be mapped back to, and then select "Apply".
Back up using QNAP NetBak Replicator and VSS H/W Provider
NetBak replicator is a free and easy-to-use backup program that supports VSS. With QNAP NetBak replicator, you can back up transactional-based applications such as databases and virtual machines. VSS can facilitate creating backup files with a consistent view and without data corruption. When you conduct a backup job for an iSCSI LUN from the Windows Server with backup software that supports VSS, the VSS Hardware Provider will use NAS ROW (Redirect on Write) instead of Windows COW (Copy on Write) to take snapshots on the Windows Server and therefore increase the backup efficiency. The first step to use VSS hardware provider function is to configure your backup software to enable VSS as described in the following sections.
Configure NetBak Replicator to enable VSS
1. Select "Advanced Mode" in the lower-left corner, and then select "Options" > "Advanced Settings".
2. Click the "Backup Settings for Opened Files" button.
3. Select both "Enable VSS" and "Enable VSS Writer" options.
4. Select the "Instant Backup" tab. Select the backup source where the Hyper-V VMs are stored, select the destination, and then select "Start Backup" to start the backup job.
5. Log into the NAS, and go to "Storage Manager" > "Snapshot" > "Snapshot Manager". You should see that a snapshot named VSS_snap_# has been created successfully.
6. After the snapshot has been created, another iSCSI LUN called "vss_clone#" (in "iSCSI Storage" > "iSCSI Target List") will be temporary created for the backup job.
7. In the Hyper-V Manager, you can find that the status of the VMs shows "Backing up".
8. You can check backup progress from the NetBak Replicator.
9. A screen appears, showing the number of files being backed up and the duration of time for the backup.
10. To restore with the backup file, please click the "Instant Restore" tab, choose the backup source in the left pane and the backup destination in the right pane. Also select what you would like to do when a file with the same name but different content exists during the restore process. Click "Start Restore" to start the restore job.
Using other backup software and VSS Hardware Provider
Use the following procedure to enable VSS in Acronis Backup.
1. Launch the Acronis Backup software and select "Manage this machine".
2. Select "Options" > "Default backup and recovery options".
3. Select "Default backup options" in the left pane to expand the options.
4. Select "Volume Shadow Copy Service" and its detailed configurations will appear in the right pane. Select "Use Volume Shadow Copy Service" and choose "Hardware" for Snapshot provider. Then click "OK" to finish the configuration.
Symantec Backup Exec
Use the following procedure to enable VSS in Symantec Backup Exec.
1. Launch Symantec Backup Exec and select "Backup and Restore" > "Backup" > "Back Up to Disk".
2. Select "Edit" in the lower right corner of the screen.
3. Select "Advanced Open File" from the left menu. Enable "Use snapshot technology" and then select "Hardware" from the "Snapshot provider" drop-down menu.
Veeam Backup and Replication
Use the following procedure to enable VSS in Veeam® Backup and Replication™.
1. Launch Veeam Backup and Replication program, select the target server in the list, and then select "Manage Volumes".
2. Since the target server already has QNAP Snapshot Agent installed, the two iSCSI LUNs with QNAP VSS HW Provider are displayed in the list.
3. Select "Backup & Replication" in the lower-left corner, and then click "Backup Job".
4. Follow the on-screen instructions to create a backup job.
5. In the Guest Processing configuration window, select "Enable application-aware processing" to enable Microsoft VSS. Then click "Credentials" and enter the login credentials for the VMs that you want to back up. Click "Next" to proceed.
6. You can configure scheduled backup or click "Create" to create one time backup now. Then click "Finish" to complete the setup of a backup job.
- Volume Shadow Copy Service. (September 3, 2014). Retrieved from https://technet.microsoft.com/en-us/library/ee923636(v=ws.10).aspx
- 15827: Acronis Backup & Recovery: Backing Up and Restoring Domain Controller. Retrieved from https://kb.acronis.com/content/15827
- How to configure System provider to perform snapshot backups of Backup Exec explicitly when Backup Exec and Backup Exec System Recovery coexist. (September 14, 2015). Retrieved from https://www.veritas.com/support/en_US/article.TECH73202
- Veeam Help Center. (March 18, 2015). Retrieved from https://www.veeam.com/documentation-guides-datasheets.html