Purging Shadow Copies on Windows servers
Topic
This article discusses purging Microsoft Shadow Copies when protecting Windows servers.
Environment
- Datto Windows Agent
- Datto Endpoint Backup
Description
Shadow Copy (also known as Volume Snapshot Service,Volume Shadow Copy Service or VSS) is a technology included in Microsoft Windows that can take manual or automatic backups of computer files and volumes, even when they are in use. It runs as a Windows service named Volume Shadow Copy.
Components that use this service include Windows Backup and System Restore, but any Windows component that uses Volume Shadow Copy's VSS provider service can create Shadow Copies.
Shadow Copies and the Datto solution
Shadow Copies present on a system protected by a Datto device or our Datto Endpoint Backup Agent can throw off incremental counters, cause conflicts, and fill storage space that backups need to run. To avoid conflicts:
- Purge any orphaned Shadow Copies from your protected machine
- Make sure that any other backup solutions are uninstalled from the protected system, as they can cause conflicts and failures with our backup solution.
Removing Shadow Copies on the Protected Machine
You can remove existing Shadow Copies from a host system from an elevated Command Prompt session.
Open service.msc on the protected machine
Stop the Volume Shadow Copy service
Launch a Command Prompt with Administrator privileges
List out the current shadows to confirm copies are present
vssadmin list shadows
To remove all Shadow Copies from all volumes, run
vssadmin delete shadows /all
To remove Shadow Copies for a specific drive, run:
vssadmin delete shadows /For=<driveletter>: /all
EXAMPLE
vssadmin delete shadows /For=C: /all
Restart the Volume Shadow Copy Service
If the above command fails to remove all Shadow Copies, or if issues with VSS writers persist, use diskshadow to investigate the problem and remove remaining copies by using the command-line interface (CLI) on the protected machine. See Microsoft's diskshadow article(external link) for more information.