Windows Server Backup is a great basic inbuilt utility to backup your Windows 2008/R2 servers.
But is also just that, as basic utility, it has some smarts, but trips itself up often if the circumstances are right.
Microsoft recommend your backup disks are 150% greater than the data you are backing up so that it can have enough space to create the number of snapshots it wants.
The problem is if you don't have that extra space and you run very close to your disk size, any large change in data will attempt to 'overfill' the disk and the fail due to error.
Now Microsoft don't recommend this solution, however it is a work around :).
Above: Windows Server Backup Disk Usage
As you can see, I have enough room for day to day changes (around 4GB on average), so WSB can recycle the space happily, however recently I moved a VHD from one disk to the other, so suddenly the incremental change was 120GB, which will never fit.
Above: Windows Server Backup Status
So suddenly I was getting failed backups with the error:
One of the backup files could not be created. Detailed error: There is not enough space on the disk.
When this happens you have three choices.
- Buy new, larger backup disks
- Reduce the amount you are backing up
- Try Delete the oldest snapshots off the backup disk.
You know how to do the first two, so lets get on to how to remove the oldest snapshots to give us some more space on the hdd.
Note: Once removed you cannot get them back, so make sure your systems are all in working order, ie do this at your own risk!
We need to start by identifying the backup disk's UID. To do this we open command prompt and run mountvol with no switches.
C:\Users\Administrator>mountvol
Creates, deletes, or lists a volume mount point.
MOUNTVOL [drive:]path VolumeName
MOUNTVOL [drive:]path /D
MOUNTVOL [drive:]path /L
MOUNTVOL [drive:]path /P
MOUNTVOL /R
MOUNTVOL /N
MOUNTVOL /E
path Specifies the existing NTFS directory where the mount
point will reside.
VolumeName Specifies the volume name that is the target of the mount
point.
/D Removes the volume mount point from the specified directory.
/L Lists the mounted volume name for the specified directory.
/P Removes the volume mount point from the specified directory,
dismounts the volume, and makes the volume not mountable.
You can make the volume mountable again by creating a volume
mount point.
/R Removes volume mount point directories and registry settings
for volumes that are no longer in the system.
/N Disables automatic mounting of new volumes.
/E Re-enables automatic mounting of new volumes.
Possible values for VolumeName along with current mount points are:
\\?\Volume{768cb7c0-93e6-11e1-811d-806e6f6e6963}\
*** NO MOUNT POINTS ***
\\?\Volume{19941286-93e7-11e1-9a8b-00259063b05d}\
D:\
\\?\Volume{0de85de0-9849-11e1-ae67-00259049b4c2}\
*** NO MOUNT POINTS ***
\\?\Volume{768cb7c1-93e6-11e1-811d-806e6f6e6963}\
C:\
\\?\Volume{768cb7c4-93e6-11e1-811d-806e6f6e6963}\
E:\
The bottom section is what we are interested in. Most particularly the Volumes with '** NO MOUNT POINTS **, as the backup disk does not get mounted with a drive letter.
I'm not sure why, I'm sure someone could fill me in though, the System Drive is always listed twice, one with a drive letter and one without.
The disk we are looking for is the 3rd disk down, which has a UID different to the others. The information we need is the entire string: \\?\Volume{0de85de0-9849-11e1-ae67-00259049b4c2}
Now the next command is for the actual deletion of the snapshots.
For this we use a builtin utility called 'DISKSHADOW', simply type this into a command prompt to enter the utility.
Now type delete shadows OLDEST -VolID-
which in the examples case would be:
delete shadows OLDEST
\\?\Volume{0de85de0-9849-11e1-ae67-00259049b4c2}
When run you should see something similar to:
DISKSHADOW> delete shadows OLDEST \\?\Volume{0de85de0-9849-11e1-ae67-00259049b4c2}
Deleting shadow copy {47c0fd32-c3e9-4c66-8481-2ac004b6d2ff} on volume \\?\Volume
{0de85de0-9849-11e1-ae67-00259049b4c2}\ from provider {b5946137-7b9f-4925-af80-5
1abd60b20d5} [Attributes: 0x00020019]...
1 shadow copy deleted.
DISKSHADOW>
Now when you look back at your Windows Server Backup:
Above: Windows Server Backup Disk Usage
You are actually able to delete all the shadow copies on the disk, so that only one copy remains if you wish. But again be certain you don't need to go back in time to retrieve this data!
So use all of this information at your own risk, but if this is what you were searching to do, that's how to you it :)