4

I have a 1TB USB drive that I use as a backup drive for my work PC.

The drive will eventually run out of space and I need to go in and remove older backups using the manage space/view backups dialogs and delete backups from past periods.

Is there any way to tell Windows Backup to manage the backup space in a smarter way and keep as many backups as it can but without going past the drive size and issuing errors?

3
  • You can use different software. Windows Backup is not a full solution nor a perfect solution. Its unlikely you will find free software that does a better job though.
    – Ramhound
    May 14, 2014 at 12:07
  • Ramhound is correct. I would look at the free version of CrashPlan.
    – rrirower
    May 14, 2014 at 12:49
  • Thanks guys. I thought that may be the cause but hoped that maybe there's some utility or tool that can do this as other then this Windows Backup is pretty good. If not then maybe it's a good idea for such a utility? :)
    – RnR
    May 15, 2014 at 12:39

4 Answers 4

3

I script this to run every week:

wbadmin delete backup -keepversions:7 -quiet

Easy. Fire and forget.

1
  • 6
    Please add more details for a user who might not know how to schedule this Screenshots are extra bonus,
    – SeanClt
    Feb 26, 2016 at 16:11
2

to keep the latest 3 backups:

wbadmin delete backup -keepversions:3 -quiet
  1. open notepad and type in the line.
  2. save the file as remove-old-backups.bat
  3. open Task Scheduler (Windows 10)
  4. In the right click on "Create Task"
  5. [General]: fill in a description
  6. [Triggers] > [New] > [On a schedule] > [weekly] … (to run it weekly)
  7. [Actions] > [New] > [Start a program] > select your .bat file

this should do it.

information of the commands:

wbadmin delete backup /?
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2013 Microsoft Corporation. All rights reserved.

ERROR - Command syntax incorrect. Error: /?. See the command
syntax below.

Syntax: WBADMIN DELETE BACKUP
  {-keepVersions:<No. of copies> | -version:<VersionIdentifier> | -deleteOldest}
  [-backupTarget:<VolumeName>]
  [-machine:<BackupMachineName>]
  [-quiet]

Description:  Deletes the backups that you specify. If the
specified volume contains backups other than backups of the local
server, those backups will not be deleted.
To use this command, you must be a member of the Backup Operators group
or Administrators group.

Parameters:
-keepVersions  Specifies the number of the latest backups to
                keep. The value must be a positive integer. The option value
                -keepVersions:0 deletes all the backups.

-version       Version identifier of the backup in MM/DD/YYYY-HH:MM format.
                If you do not know the version identifier, at a command
                prompt, type:  WBADMIN GET VERSIONS. Versions that are
                exclusively backups can be deleted using this
                command. Use WBADMIN GET ITEMS to view the version type.

-deleteOldest  Deletes the oldest backup.

-backupTarget  Specifies the storage location for the backup that you want
                to delete. The storage location for backups is a
                drive letter, a mount point, or a GUID-based volume path. This
                value only needs to be specified for locating backups that are
                not of the local computer. Information about backups for the
                local computer will be available in the backup catalog on the
                local computer.

-machine       Specifies the computer whose backup you want to
                delete. Useful when multiple computers were backed up to
                the same location. Should be used when -backupTarget is
                specified.

-quiet         Runs the command with no prompts to the user.

Remarks: One, and only one, of these parameters must be specified:
-keepVersions, -version, or -deleteOldest.

Examples:
WBADMIN DELETE BACKUP -version:03/31/2006-10:00
WBADMIN DELETE BACKUP -keepVersions:3
WBADMIN DELETE BACKUP -backupTarget:f: -deleteOldest
1
  • 2
    Which backup tool does this apply to? Not Windows 7 backup or the "backup tool from Windows 7" included in Windows 10. Sep 14, 2020 at 6:40
1

This is kind of old, but the answer is: No. Windows (7) Backup does not automatically delete old backups and it doesn't have the capability to do so (automatically).

3rd party backup tools are preferred if that's what you need.

-1

Windows 7 Backup does not automatically delete old backups. I wrote a simple AutoIt script to find the oldest backup directory and delete it if there are 4 or more. I then added this as a scheduled task to run every morning.

Here's the script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .