7

Summary

I have a Server 2012 (not R2) Hyper-V Host server using Windows Server Backup (WSB) to back up about 670 GB of data to three 1 TB USB hard drives, rotated weekly. The server was installed July 2013 and has been happily backing up to the backup drives until about a month ago. Now the backups are failing because the backup drives are out of space.

Questions

  1. How do I configure the backup deletion policy introduced in Server 2012?
  2. What exactly, if anything, has changed in Server 2012's handling of old backups created with Windows Server Backup when the backup drive runs out of space?

Detail

Windows Server Backup is Supposed to Automatically Delete Old Backups

According to this blog post on Technet, Windows Server 2008 automatically deletes the oldest backup(s) on a destination backup drive when that drive runs out of free space:

If the backup storage location is full, Windows Server Backup automatically deletes the oldest backup version to make space for the current backup. Since each backup is stored inside a shadow copy, deleting a backup version is accomplished by simply deleting the corresponding shadow copy.

I manage a number of Server 2008/R2 servers and can attest by experience that this is true.

I reason that Server 2012 retains this feature by noting that this server with which I am having problems:

  1. Was deployed July 2013
  2. Has backed up to these same three backup drives without issue until now
  3. I've not deleted any backups and am the only administrator
  4. The oldest backups on any of the three drives are from February 2014.

Thus I reason, Server 2012 has been deleting old backups off of my backup drives, otherwise the oldest backups would date back to July 2013 when the server was deployed, not a more recent date as is actually the case.

Server 2012 Supposedly Introduces a Backup Deletion Policy

Doing my own research, I found this list of feature changes to Windows Server Backup which states that new in Server 2012:

If you are backing up to a hard disk or volume you can specify a deletion policy to determine whether backups should be deleted only when necessary to make space for additional backups or if they should be deleted after a certain number of backups have passed.

At minimum, this implies that WSB in Server 2012 is capable of deleting old backups to make room for new ones. Curiously that same source claims "Space and version management was not available" in previous versions of Windows.

So, first, how does one configure this deletion policy? Second, does anyone know if Server 2012's default behavior regarding deletion of old WSB backups has changed since Server 2008 R2?

Note: I'm not looking for assistance troubleshooting the reason why this server's behavior has changed since I intend to attack that problem by configuring the backup deletion policy. If the behavior doesn't go away after doing this, then I will invest the time in understanding why the backups suddenly stopped getting deleted.

I say Reinstate Monica
  • 3,100
  • 7
  • 23
  • 51

3 Answers3

8

That article you link is wrong. There is no way to specify the retention policy in Windows Server 2012 when backing up to external disks. I don't know why they lie like that... The configurable retention policy feature DOES, exist for the Windows Online Backup feature that you can use in Server 2012. Possibly this is where the confusion arises.

AFAIK backup disk space usage is the same in 2012 as in 2008 R2, which was also supposed to handle retention automatically, but didn't always work. When this occurred in 2008 R2 we would use the Diskshadow utility to manually trim VSS versions from the backup disk, which is what I'd advise you do here.

Use diskshadow to delete oldest VSS copy from Windows Server backup disk: http://www.bluecompute.co.uk/blogposts/windows-server-backup-manually-delete-snapshots/

EDIT: As Twisty points out, Diskshadow is not needed for this any more, you can use the new WBADMIN DELETE BACKUPS command

BlueCompute
  • 2,924
  • 2
  • 18
  • 28
  • 2
    A Microsoft article is wrong? Hmm, that's a first. Thanks for the DISKSHADOW command suggestion. I actually prefer the WBADMIN DELETE BACKUPS command (added in Server 2012). The syntax is **WBADMIN DELETE BACKUP -keepVersion: -BackupTarget:** (See _WBADMIN DELETE BACKUP /?_ for more info.) This command lets you remove multiple old backups in a single shot, whereas the DISKSHADOW command either deletes all of the backups or only the oldest, forcing you to run it multiple times to discard more than one unwanted backup. – I say Reinstate Monica Sep 24 '14 at 14:48
0

create a tast at least 5 min before Backup RUN: %windir$\system32\wbadmin.exe PARAMETER: DELETE BACKUP -keepVersions:8 -quiet

AlexJ
  • 11
  • 2
    Welcome to Server Fault. Please expand your answer to explain how it answers the OPs question. As written, it's unclear how this is an answer. Thanks for contributing to SF. – I say Reinstate Monica Jul 29 '15 at 16:49
0

http://blogs.technet.com/b/filecab/archive/2011/03/14/windows-server-backup-automatic-disk-usage-management.aspx

Automatic Disk usage management feature comes into play when Windows Server Backup detects that the backup target does not have enough space to accommodate the backup while backup is in progress.

There are a few items: • Backup will not shrink the used space if it deems the shrink will not free up enough space for the next backup • It will not shrink to less than 1/8th of the target volume size

Dom
  • 731
  • 1
  • 8
  • 19