Keep size of Win7 FILE backups in check automatically?

I have Windows 7 Backup utility set to backup just one directory of files to another location (long story as to why, suffice it to say that's all that needs to be backed up on this machine).


How do I keep the target directory from growing infinitely huge?  I would ideally like to keep a one-week rolling window of these backups in the target/backup directory and have it automatically prune those backups that are older than a week.

I don't see where the Windows Backup tool lets you specify that option (it has some options about managing sizes in regards to IMAGE backups--but not file backups)...and I can't find any script out there that would seem to be suited to the job (I would be happy to have a Task Manager job run every night to prune backups older than a week)--whatever works!!!

Any ideas or suggestions?

April 15th, 2010 10:20pm

I have Windows 7 Backup utility set to backup just one directory of files to another location (long story as to why, suffice it to say that's all that needs to be backed up on this machine).


How do I keep the target directory from growing infinitely huge?  I would ideally like to keep a one-week rolling window of these backups in the target/backup directory and have it automatically prune those backups that are older than a week.

I don't see where the Windows Backup tool lets you specify that option (it has some options about managing sizes in regards to IMAGE backups--but not file backups)...and I can't find any script out there that would seem to be suited to the job (I would be happy to have a Task Manager job run every night to prune backups older than a week)--whatever works!!!

Any ideas or suggestions?

<script type="text/javascript"></script> <script type="text/javascript"></script> <script type="text/javascript"></script> <script type="text/javascript"></script>
Free Windows Admin Tool Kit Click here and download it now
April 15th, 2010 10:21pm

Kelly,

Windows 7 Backup has a feature which allows you to manage backup disk space. On the Backup and Restore Center page, look for the "Manage Space" link. You will find it right under the target description.

The following blog post walks you through the UI and the space management options available:

http://blogs.technet.com/filecab/archive/2009/11/23/managing-backup-disk-space.aspx

Windows Backup takes full backups of data from time to time. If you want to set up a rolling window for weekly backups, this is what you can do:

1. Force a full backup every week:

Windows Backup does not expose any way to control frequency of full backups through UI so that users don't get confused with full and incremental backups. But there is a registry entry you can tweak to control the full backup frequency:

(Please be very careful while changing registry values.)

Path: SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsBackup\AutomaticFullBackup

Name: TimePeriodInDays

Type: DWORD

Value: the default value is 365. Set it to 7.

This will cause a full backup to be taken every week. Rest of the backups during the week will be incremental on top of this full backup.

2. Use the space management feature to delete the previous week's backup. This step, cannot be automated and will have to be done manually through the UI.

Hope that helps.

Thanks,

Sankalp

April 22nd, 2010 6:48am

Thank you for the response, but I'm not sure that solves the problem.


We do not want to backup the FULL machine...the machine and all of it's data is expendable except for one directory.  We have the Windows 7 Backup set to backup that one directory.  We would like a full backup of that directory, but we only need to keep a rolling one-week window of backups for it ... we don't want it to grow over time.

We are bandwidth limited on the amount of data we can backup off this machine, so that is another strike against doing a full-machine backup as well.

Is there a way to have Windows 7 backup only backup a directory or two, do it as a full backup and prune 7+ day old backups?

Free Windows Admin Tool Kit Click here and download it now
May 4th, 2010 4:22pm

Kelly,

Let me clarify.

1. Windows Backup has the ability to backup just a directory or two:

  1. Go to Backup and Restore Center
  2. Click the "Set up backup" button
  3. Choose backup target
  4. On the next page, choose the "Let me choose" option
  5. On the treeview presented on the next page, select the directories you want to backup. Exclude everything else.
  6. Proceed to save settings and run first backup.

2. Windows Backup makes an initial copy of the data that you choose to backup. This initial copy is what I meant by a "full backup". After this, it tracks changes and copies only those files that change. Such backups are called "incremental backups". As such, a "full backup" does not mean backup of the full machine.

3. The only limitation is that the pruning of old backups needs to be done manually through the "Manage space" UI accessible through the Backup and Restore center.

You can use the way I suggested in the previous reply along with the configuration method I described above to get your required setup.

 

May 5th, 2010 6:24am

I tend to agree with Kelly, I am also doing a full backup of my users of several folders on the windows 7 machines "I hacked the registry and told it I want a full not an incremental". We have 100's of machines and we need to be able to delete the folders it creates. I would like to keep 2 full backups and delete the rest. Right now I have folders in there that are months and months old. I want to keep just 2, the current backup and the last one. Anything older than that can be deleted.

Windows 7 backup does not seem to let you do this which tells me this is not an operating system for a large corporation but rather an operating system for your average home user. It amazes me that Microsoft didn't think this would be a problem by not being able to manage the backup folders that windows 7 creates.

Free Windows Admin Tool Kit Click here and download it now
July 12th, 2011 7:36pm

Just want to share I have the same issue too, and am also looking for a solution as my backup drive keeps getting full because of Windows7 backup is keeping all the old files I had already deleted from the folders I selected to backup from the "let me choose" option, while all the new files I saved to those folders are getting backed up at the same time.

Here is my configuration:

The backup runs on every Sunday morning.

C: = 180GB Windows7 OS drive. I enabled "backup system image" and the "keep 1 system image ONLY" option, so that 1 copy of the system image from this C: is sitting on the backup drive.

D: = 1TB data drive with all the movies, music... etc. I selected all the folders that I want to backup from the "Let me Choose" option for the "data backup."

E: = 1.5TB Backup drive. This is the backup drive which keeps a copy of the C: system image + all the folders I picked to backup from D:

If I can do math, 1.5TB drive should be more than enough (1.3TB free space available with single partition) to store the system image of the 180GB C:, and the entire 1TB D:.

Recently, I noticed that the weekly "data backup" had not been working because of the 1.5TB drive gets full. Reasoning being is that the data backup size of the 800GB data I had sitting on the D: had grown from 800GB to 1.1TB! I had to delete the data backup to run backup again, then the data backup size would return to 800GB. Otherwise the E: just does not have enough space to allow the backup to complete.

I double checked the data backup content, realized that Windows7 had kept all the files I had already deleted from the D: in the data backup as well. When I paid attention to the date of the "data backup", i noticed that the date is shown as in a range "from the 2nd last backup date to the most recent backup date." It looks like even if I had deleted all the files from the D: at some point during the week, Windows Backup would keep a copy of all the deleted because those files existed during the time frame. All the deleted files are still sitting in the Data Backup!!! Hence the increase of the data backup size.

This makes perfect sense as I should be able to recover any files which were deleted during any day of a week when I set Windows Backup to run on every Sunday morning, simply because of the backup should contain any files from the "last backup date" to the "most recent backup date." The problem is, the backup file size grows too large even if Windows Backup only backs up all the files on my D: within a week's range - from Sunday to Sunday.

What Dmac0713 suggested, keep the most recent backup + last backup, will use double of the space. Not something I want. What I'm looking for is even more simple - a copy of all the files sitting on the D: right before the backup runs. I don't care if I could not recover a movie I deleted 4 days ago by accident, can always download it again. For all the important photos, I keep an extra copy of them on an extra external drive. 

Perhaps I should try setting the backup to run on every 2nd day rather than every Sunday!!! That way Windows will not keep any deleted files for more than 2 days? I will test to see if this will work/not.

November 6th, 2011 9:24pm

2. Use the space management feature to delete the previous week's backup. This step, cannot be automated and will have to be done manually through the UI.

I can't believe this serious oversight was ever allowed to ship.  Manually managing backups?  You might as well turn the "backup" feature off since once it fills most people aren't going to notice.

That is not failing in a safe condition.  It's always better to have a more current backup - if nothing else once full, the MS Backup software should throw up a notice (and more aggressive than just what is done through notification center) and offer to automatically delete the oldest backups as needed in order to maintain a current backup.

As it currently works, Windows Backup is a complete joke and might as well not even exist since it definetly won't be protecting most people as would be reasonable to assume.

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2012 5:02pm

Hey all,

As Eric mentioned this is an oversight, but I like windows 7 backup and was keen to find a solution to delete older backups.

I found the following links online for "forfiles" which is built into win 7 already.

http://www.mojobudgie.com/a-simple-batch-script-to-delete-folders-older-than-x/

http://technet.microsoft.com/en-us/library/cc753551%28WS.10%29.aspx

I wanted a regular backup to backup different users "document" folders to our server so I tweaked the script to look like this.
I will probably use it as a log off script but a scheduled task would do just as well:

net use b: \\server\Backups\%USERNAME%\%COMPUTERNAME%
forfiles /p b:\ /d -4 /c "cmd /c if @ISDIR==TRUE echo RD /Q @FILE &RD /Q /S @FILE"
net use b: /delete /YES

-4 refers to any files older than 4 days but you can change this to any value you.

  • Proposed as answer by James Newton Monday, June 18, 2012 10:17 PM
February 20th, 2012 3:54am

Hey all,

As Eric mentioned this is an oversight, but I like windows 7 backup and was keen to find a solution to delete older backups.

I found the following links online for "forfiles" which is built into win 7 already.

http://www.mojobudgie.com/a-simple-batch-script-to-delete-folders-older-than-x/

http://technet.microsoft.com/en-us/library/cc753551%28WS.10%29.aspx

I wanted a regular backup to backup different users "document" folders to our server so I tweaked the script to look like this.
I will probably use it as a log off script but a scheduled task would do just as well:

net use b: \\server\Backups\%USERNAME%\%COMPUTERNAME%
forfiles /p b:\ /d -4 /c "cmd /c if @ISDIR==TRUE echo RD /Q @FILE &RD /Q /S @FILE"
net use b: /delete /YES

-4 refers to any files older than 4 days but you can change this to any value you.

Ahh replies! I'll spend sometime to play with this. Thank you for the information Fides6905
Free Windows Admin Tool Kit Click here and download it now
March 7th, 2012 7:18pm

So can we expect a windows back up feature in Win 8 that includes automatic space management? I mean, I don't see it necessary to have the users manage which backup sets they want to keep? This is terrible for home users and I don't even recommend it to my clients. The few times I did, they call me asking which ones to delete and I don't want to tell them the wrong information. If they deleted a backup and then lost their primary drive somehow. I guess third party tools is the only logical and automated way to go about backing up eh?
March 7th, 2012 9:39pm

3. The only limitation is that the pruning of old backups needs to be done manually through the "Manage space" UI accessible through the Backup and Restore center.

This needs to be automated by the OS. Period.

Free Windows Admin Tool Kit Click here and download it now
March 7th, 2012 9:40pm

3. The only limitation is that the pruning of old backups needs to be done manually through the "Manage space" UI accessible through the Backup and Restore center.

This needs to be automated by the OS. Period.


Not an apple guy here but I wish Win7 had a built-in backup system similar to the OSX  Time Machine ....
March 21st, 2012 10:52pm

Do you know if there are any side effects deleting the old backup folders manually ?  What happens when you go to restore a file ?  Is the backup prgram smart enough to know that a set(s) have been deleted ? 

Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2012 1:44pm

Do you know if there are any side effects deleting the old backup folders manually ?  What happens when you go to restore a file ?  Is the backup prgram smart enough to know that a set(s) have been deleted ? 

I think you can manually delete the backup files from the HD but I never tried doing it myself.

A quick test you can try:

imagine if you create the backup files on an external HD. Win7 Backup Restore manage backups window will show the backup date when you have the HD attached to your computer. You can choose to restore from the backup files stored on the external HD. I assume when you removed the external HD, the manage backup windows will not show anything, and the OS itself will still be running fine.

May 24th, 2012 9:08pm

I have the backup sets out on a shared network location.  When I manually delete the old backup set(s), the Windows 7 station that created backup does not keep track of the manual deletion.  So when you go to restore, the Windows 7 thinks the manually deleted set still exists. It will show up on the list as possible backup to restore from.  However, when try to restore,  the restore wizard eventually says the set is not there.  If you start the restore process and chose restore from another location, then it appears to locate the actual remaining sets.
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2012 2:41pm

When you delete the old backup set(s), did you delete the folder named "WindowsImageBackup"? Or the file named under your Computer name with the Backup Restore icon?

The WindowsImageBackup is your system image. The file named under the Computer name with the Backup Restore icon is the actual "Data File" backup. I renamed the one named under my computer name to "computer name_whatever", went to Backup Restore>Manage Space>View Backups. The backup date is no longer there. I then renamed the file back to my computer name from "computer name_whatever", clicked the "Refresh" option located above the "Space usage summary", then clicked the "View backups", the backup showed up again.

Not sure why you have the date stuck there.... perhaps you have to click the refresh option again?

May 25th, 2012 3:05pm

I'm looking under the data files.  What I did was click on Restore my files button, then clicked on the Choose a different date link.  The file sets are all listed there, even the ones you manually deleted.  When you choose one of those, of course the restore cannot the find the file location.
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2012 5:15pm

I have for the longest time disliked window's inability to prune older backups. So, I eventually made my own script that does it for me. I also created a simple installer for a scheduled task.

Here it is if anyone is interested:
https://github.com/BigRedBrent/WindowsBackupPruning



July 18th, 2015 1:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics