How do I remove Windows Server VSS shadow volumes created by QNAP snapshots?
Applicable Products
- QTS
- QuTS hero
- QES
- QNAP Snapshot Agent
- Windows Server
Scenario
When a QNAP NAS takes an application-consistent snapshot using QNAP Snapshot Agent, it triggers Windows Server Volume Shadow Copy Service (VSS) on the application server. VSS may create shadow copies on Windows Server that are not required after the backup is complete. You can periodically remove these shadow copies to free up space on the Windows server.
Solution
On the Windows Server where QNAP Snapshot Agent is installed, you can remove VSS shadow copies and free up disk space using the following methods.
- Deleting shadow copies is permanent and cannot be undone. Make sure the shadow copies are no longer required for backups, restores, or previous versions of files before deleting them.
- If these shadow copies are part of your backup strategy, review your backup plan and retention policy before deleting them.
Method 1: Manual deletion
- Open File Explorer on Windows Server.
- Locate the volume containing the shadow copies you want to delete.
- Right-click the volume and select Configure Shadow Copies....
The Shadow Copies window appears. - Select one or more shadow copies and click Delete Now.
A warning message appears. - Click Yes.
Method 2: Using the command-line tool vssadmin
- Open Command Prompt as an administrator on Windows Server.
- Search "cmd" in the Start menu.
- Right-click Command Prompt and select Run as administrator.
- List existing shadow copies by entering the following command:
vssadmin list shadowsNoteThis command displays all existing shadow copies, including information such as the shadow copy ID, creation time, and associated volume. The shadow copy ID allows you to specify individual shadow copies to delete. - Perform one of the following actions by entering the corresponding command:
- Delete a specific shadow copy:
vssadmin delete shadows /Shadow={SHADOW_COPY_ID}NoteReplace "{SHADOW_COPY_ID}" with the actual ID of the shadow copy you want to delete. - Delete all shadow copies for a specific volume:
vssadmin delete shadows /for=C:NoteReplace "C:" with your target volume. - Delete all shadow copies globally:
vssadmin delete shadows /allImportantThis command deletes all shadow copies on the server, including those used for backups and Previous Versions. Use this option only if you are sure that no shadow copies are needed.
- Delete a specific shadow copy: