Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, February 27, 2009 7:57 PM | 2 votes
I have a script to do a backup, if a week number is pair it goes to one external disk if not to it goes to a another external disk.
In this way i only have 2 weeks backed up. (15 days).
But right know i have all the old versions too when i try recovered it appears there (127 at all).
How can i delete this old versions ? to stay with only the last 15 days.
Thx.
Rafael Silva
.
All replies (14)
Monday, March 2, 2009 10:06 AM ✅Answered | 4 votes
Hello,
We can delete older backups and free the space occupied by them using the following two ways:
**1. ** Deleting System State Backup: **wbadmin delete systemstatebackup –keepversions:10 **
The above command will keep the latest 10 versions and delete the rest all the system state backups.
2. Deleting other backups: Backup application stores multiple backup versions in the VSS shadow copies. Hence, older backup version can be deleted by deleting older shadow copy. Commands to list and delete VSS shadow copies are below. They need to be run in an elevated command window.
· vssadmin list shadows /for=x: – for listing the snapshots on x: where x: is the backup location
· vssadmin delete shadows /for=x: /oldest – for delete the oldest shadow copy. It can be called multiple times in case there is need to delete multiple older backups.
Note: wbadmin get versions or backup UI would still report deleted backups until next backup runs. At end of each backup – non-existent backups are removed from the backup catalog.
Sree,
Can you please double check if there is any space in between “keepversions:” and the value “30”. In the mean time can you please try using the
following command that will delete the oldest System State Backup to just unblock you:
** wbadmin delete systemstatebackup –deleteOldest**
Friday, February 27, 2009 8:40 PM
Hi,
I am also want know how to delete the old backup copies. In windows server backup when I view the backup details it showing 203 (days) copies and remaining space in HDD is 9%. So I would like to delete the old backups. I have tried the below mentioned method.
To delete all system state backups, except the thirty most recent, type:
wbadmin delete systemstatebackup -keepVersions:30
I got the msg like
ERROR - The value for option: keepVersions is missing. See usage below.
Anyone pls help...
Regards,
Sree
Tuesday, March 3, 2009 1:34 PM
Hi Bikash,
Thanks for your reply. I did double check the command it is correct. I have a doubt, if we use -deleteOldest command it will remove backup of how many days/copies? or it will remove all old backup's.
I heard that,
Automatic disk usage management. After you configure a disk for a scheduled backup, Windows Server Backup automatically manages the disk usage—you do not need to be concerned about running out of disk space after repeated backups. Windows Server Backup will automatically reuse the space of older backups when creating new backups. The management tool displays the backups that are available and the disk usage information. This can help you plan for provisioning additional storage to meet your recovery time objectives.
Link : http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1335638,00.html
In this I like to know, When no space for the next backup that time it will delete automatically only one old backup or how?. If yes how could be system performance? it will effect anything?
Sree
Wednesday, March 4, 2009 3:22 PM
Hello Sree,
-deleteOldest option for deleting system state backup would only delete the oldest version.
In case the disk is running out of space, the new backup will try to reclaim space from the older VSS shadow copies. So
some of the older backup versions would get deleted automatically.
The wbadmin commands are not supported in PowerShell in LongHorn Release. So if you trying the command in PowerShell it may not
work. Try running the same command in an elevated command window.
If you still find issue in deleting the older System State Backups then please send the logs.
**For sending the logs:
**
zip the contents of %windir%\logs\windowsserverbackup folder and send to [email protected] (only use the highlighted letters this is to avoid spam)
Tuesday, April 7, 2009 5:50 AM
Hello Sree,
Are you able to delete the System State Backup using the information provided above? If not can you please send us the logs using the instruction
mentioned above.
Thanks
Bikash
Tuesday, April 7, 2009 9:54 PM
Hi Bikash,
Really I am Sorry replying after a long time.
In case the disk is running out of space, the new backup will try to reclaim space from the older VSS shadow copies. So
some of the older backup versions would get deleted automatically. So we didn't tried to delete our old backup copies.
Thanks for your reply...
Sree
Monday, November 8, 2010 5:48 AM
What if I have decided I don't want to use the Windows backup anymore, but this thing has consumed 190 GB of space on a 200 GB drive which I'd like to use for something entirely different, and I need more than the 10 GB currently free to do it?
Can I just pretend there is more space than is listed free under Explorer and start adding data, and as that data is written, VSS will just automatically delete old backups to make room for a bunch of, say, ZIP files that I copy to that drive?
Do I really need to use the VSS delete shadows command to dump all those old backups one by one according to their GUID as noted under vss list shadows? (since the vss delete shadows /for:e:/Oldest doesn't seem to work)?
Friday, January 28, 2011 7:13 PM
is there was way to say only keep 1 copy of the backup instead of 20? or 200?
Tuesday, April 5, 2011 4:00 PM
Hello,
We can delete older backups and free the space occupied by them using the following two ways:
**1. ** Deleting System State Backup: **wbadmin delete systemstatebackup –keepversions:10 **
The above command will keep the latest 10 versions and delete the rest all the system state backups.
2. Deleting other backups: Backup application stores multiple backup versions in the VSS shadow copies. Hence, older backup version can be deleted by deleting older shadow copy. Commands to list and delete VSS shadow copies are below. They need to be run in an elevated command window.
· vssadmin list shadows /for=x: – for listing the snapshots on x: where x: is the backup location** **
· vssadmin delete shadows /for=x: /oldest – for delete the oldest shadow copy. It can be called multiple times in case there is need to delete multiple older backups.** **
Note: wbadmin get versions or backup UI would still report deleted backups until next backup runs. At end of each backup – non-existent backups are removed from the backup catalog.
Sree,
Can you please double check if there is any space in between “keepversions:” and the value “30”. In the mean time can you please try using the
following command that will delete the oldest System State Backup to just unblock you:
** wbadmin delete systemstatebackup –deleteOldest**
Hi Bikash,
I tried your VSS approach to delete the snapshot created with Windows Server Backup. The command I used is:
vssadmin delete shadows /shadow={backup ID}
The result I got is:
Error: Snapshots were found, but they were outside of your allowed context. Try
** removing them with the**
backup application which created them.
I copied the error message literally, even the format is incorrect!!
I really doubt that the Windows Server Backup is a half-baked feature. Otherwise, how could such a simple deletion so difficult to be done?
Thanks,
Sam
Update:
According to here, it seems this IS a half-baked feature...
sam witwiki
Tuesday, April 5, 2011 7:53 PM
are you going to impement a gui solution to delete past version like on windows 7 ?
I cant see such a thing on windows server 2008 r2 yet
Tuesday, June 7, 2011 1:53 PM
the Above command wiill work but there is no space between systemstatebackup and -deletedOldest.
the command is wbadmin delete systemstatebackup–deleteOldest
this worked for me.
NetOnsite Solutions
Tuesday, June 7, 2011 1:58 PM
Remove the Space after systemstatebackup
NetOnsite Solutions
Tuesday, July 19, 2011 12:35 PM
I woould like to add this as a scheduled task. Do someone has a some kind of scitpt??
Sunday, April 10, 2016 10:03 PM
Your syntax is wrong. There is a space.
This will only work for System State backups. If you did a full server backup it will not work.