Deleting Full copy Backup from SBS and Server 2008

Published on
12,364 Points
2 Endorsements
Last Modified:
Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups than you need and you'd like to free up some space again.
Without too much manual hassle :)

1. In the Server Manager, go to Disk Management, and assign the backup drive a drive letter.  I used letter 'L:'
2. Open an elevated priviledges command window
3. Using the handy pipe out '>' ability of the cmd window, pipe out the results of the vssadmin list versions command
My command window opened to c:\users\adminname and I ran
Vssadmin list versions /for=L: > Desktop\shadows.txt
Note that this command seems to be case sensitive!
*** it seems to have changed since I first posted to***
Vssadmin list shadows /for=L: > Desktop\shadows.txt
4.Rename the output file shadows.txt to shadows.xls and open it with Excel
5.Using Excel's autofilter, delete all rows that don't look like
Shadow Copy ID: {9a03c171-913b-46cf-81f6-79705a6a62d4}
The stuff between the curly brackets (the GUID) will vary in content
6. When you have nothing but rows left with that format do a find and replace operation
Replace Shadow Copy ID: with Delete shadows ID and save the resulting file as a text file
From the end of the file, delete however many rows you wish to save as the file lists them oldest to newest, and we wish to save those most recent entries.  Since this file lists all the shadows, we remove from it the shadows we wish to keep.
I originally had 69 backups.  I deleted thw last 30 rows, so this script will delete the 39 oldest backups and the newest 30 will remain in place.
See the attached file for structure shadow.txt
7.  Create a cmd file with the following command
diskshadow -s desktop\shadow.txt
***note this too seems to have changed since I first posted to ***
diskshadow /s desktop\shadow.txt
I had my script file on the desktop, and it was named shadow.txt
8. Run the cmd file in an elevated command windows.
9. After the script completes, remove the drive letter from the backup drive

Congratulations, you've freed up space for more full backups on your disk

Advice to assign drive letter temporarily

Advice on the correct vssadmin commands

The piping out of the command window output is long standing going back to DOS.  If that is new to you, look here

The method of cleaning up the output is up to you.  I find Excel very handy for doing those sorts of tasks.
Using Autofilter with contains and does not contain, and then deleting rows is fairly straight-forward and quick.

diskshadow scripting syntax

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Join & Write a Comment

This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Suggested Courses
Course of the Month3 days, 17 hours left to enroll

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month