The Volume Shadow Copy Service (VSS) is an integral component of the Windows Operating System, which can facilitate the creation and management of shadow copies of the system that can be used for attaining backups or restoring the system to a stable earlier point. As detailed below, many variables can contribute to the VSS Timeout or Shadow copies are lost during backup error.
Why could Shadow copies be lost during backup?
- High Disk I/O Load: Heavy disk activity on the system can lead to VSS timeouts, especially during backup operations, as high disk activity doesn’t allow VSS to create shadow copies within the default time. Other disk-intensive processes, such as large file transfers or disk fragmentation, can contribute to this issue as they can also act as a deterrent by freezing the volume for a snapshot.
- Inadequate System Resources: Insufficient or inadequate system resources, such as low memory, CPU, or available disk space, can cause VSS timeouts. VSS happens to be a resource-intensive operation; hence, if the system is low on resources, it may lead to timeout errors.
- Third-Party Software Conflicts: Sometimes, third-party software, especially backup and security software, may conflict with VSS operations, leading to timeouts.
- VSS Writer Issues: VSS writers create shadow copies of specific data sets (e.g., files, databases). If a VSS writer is malfunctioning or in an inconsistent state, it can cause timeouts as VSS relies on the writers and providers to interact with the applications and services
- Storage Hardware Issues: If the underlying storage hardware, such as failing disks or storage controllers, malfunctions, it can lead to VSS timeouts
Fix Shadow copies are lost during backup in Windows
Based on the probable causes contributing to the error, the best possible approach to resolve the issue would include checking the system for available resources to facilitate the smooth running of the service, apart from ensuring no software conflicts. The possible countermeasures to the error are listed below:
- Increase the VSS Timeout Value
- Restart the VSS Service
- Check Disk Space
- Monitor system resource usage
- Disable conflicting Software
- Check VSS Writers
The detailed troubleshooting steps to resolve the error are listed below:
1] Increase the VSS Timeout Value
Suppose the system happens to be temporarily engaged in high disk activity or any other high resource utilization process. In that case, it hardly leaves room for the VSS service to complete its operations. Increasing the VSS timeout value in such cases gives the service enough time to complete its operations during resource-intensive phases. The following steps can be followed to increase the VSS timeout value by way of modifying the Windows Registry:
It is advisable to take a backup of the registry before incorporating any changes.
- Press Windows + R to open the Run dialogue box and type regedit to open the Windows Registry.
- Navigate to
HKEY Local Machine/Software/Microsoft/Windows/Current Version/SPP/Create Timeout
- Create a new DWORD (32-bit) named VssPreparation Timeout
- Change the Timeout to 1200000 ms, i.e., 2x10x50x1000 = 20 mins.
2] Restart the VSS Service
Sometimes, the VSS service may be blocked due to conflicts with other background processes, preventing it from accomplishing its tasks within the expected timeframe, leading to the timeout error.
Also, the VSS service depends on various other processes like Microsoft Shadow Copy Provider Service, which, if encountered with problems, can directly impact the parent VSS service, leading to the timeout error.
Restarting the VSS service can help resolve such issues apart from any other errors encountered by the service regarding configuration and initialization during system startup. The below-mentioned steps can be executed to restart the VSS service on Windows OS:
- Press Windows + R to open the Run dialogue box and type services.msc to open the Services Window.
- Once the service console opens, scroll through for Volume Shadow Copy Service.
- Right-click on the said service and click on STOP to terminate the concerned service.
- Right-click on the same service again and choose RESTART to restart the service.
3] Check Disk Space
Since the Volume Shadow Copy Service requires sufficient disk space to store the snapshots of the files or volumes, the lack of space can possibly contribute to the error. Therefore, ensuring sufficient availability is essential and can be an effective remedial measure. The following steps can be adopted for checking the disk space:
- Open Windows Explorer by pressing the Windows + E
- On the left navigation pane of the Explorer, under This PC, check for the Local Drive option/s like (C: D:, E:, etc.)
- Right-click on the drive and select the Properties option to check for the available disk space in the concerned drive.
4] Monitor system resource usage
Monitoring or tracking the utilization level of the system resources while VSS is underway can help identify if the error is being encountered due to a lack of system resources. To check the same:
- Press the CTRL+SHIFT+ESC keys together and click on Task Manager.
- Once the Task Manager window opens, click the Performance tab to check the resource utilization.
5] Check VSS Writers
Applications or services responsible for writing data to the disk are VSS Writers. Whenever a shadow copy is created, the overall consistency of the application data is ensured by the VSS Writers, as they happen to communicate the instructions on nuances of backing data and applications to the backup tools. To check for VSS Writers and their overall health, please follow the below-mentioned steps:
- Open PowerShell or Windows Terminal with admin permission.
- Type vssadmin list writers and press Enter to list all the VSS Writers and their status.
- Review the list to check for any writer that might be in a failed or unstable state by checking the State or the Last Error. The State column displays the status of the concerned Writer, while the Last Error column lists any recent errors, if any.
- If any of the Writer are displayed in a failed state, restarting the parent VSS service or its dependencies can help restore the stability of the concerned Writer.
The above-mentioned steps can significantly resolve the VSS Timeout Error, irrespective of its cause. However, while following the above troubleshooting steps, caution must be exercised while modifying the registry settings and changing system configuration and settings.
How do I restore a shadow copy in Windows?
The only way to store is to roll back to the previous version of Windows if you have recently upgraded or use a system image to return to an earlier version.
How long are shadow copies kept?
While it depends on the configuration, it mainly depends on the storage space allocated to shadow copies. As the system runs out of space, it will start deleting the oldest copy to create space for a new one.