Delete Old Backups | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Delete Old Backups

I just took over a SQL Server Admin job. The previous DBA backed up databases to a BACKUP File but never deleted old backups. I would like to automate the deletion of any backup file older than 4 weeks old. He had backups over 6 month old. The entire drive is backed up to tape once a week so I don’t need all the old ones, but for expediency would like to keep a months worth on disk. It’s like pulling teeth to get the network guys to restore from tape for us around here.
You can do it by using ‘Database Maintenance Plan’. Read online help for more information.
HTH
Surendra Kalekar
Also referhttp://searchsqlserver.techtarget.com/cgi-bin/rd.pl/ftID-1083418-ctID-1052478?//tip/1,289483,sid87_gci1052478,00.html link. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Test that in your local machine and implement the necessary parameters in your production .Better takout the option of integerity check from your maintanance paln, it created lots of headache to me
Hmm – has anyone got an link/opinion on the use of DEVICES for backups, as opposed to using good old disk? I have always used disk, so I’m wondering if I am missing a trick here… Panic, Chaos, Disorder … my work here is done –unknown
Why do you want to do it to devices than to files. I feel managing to files is far easier than to devices.
http://www.windowsitlibrary.com/Content/77/12/1.html
http://www.informit.com/guides/content.asp?g=sqlserver&seqNum=42&rl=1
…for your amusement. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
So I take it you agree with me, then, Satya? I.e. you always backup to disk… e.g. backup database X
to disk = ‘some file name’ Panic, Chaos, Disorder … my work here is done –unknown
Yea even in our production environments, we do take backups to individual backup files only.Thats the old methord to take backups to device i think . anyone have any idea how we restore a backup in other server (test) if we have backup taken in Device in Production server ? Just to know !!!
Run SP_HELPDEVICE and check the path where the file is stored and ensure that is copied to another server use normal RESTORE statement to do fro that device. BOL is good friend [8D]. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Satya, I am not clear with that . For eg :<br /><br />I have 3 backups taken to a device (Device1 =&gt; (c:deviceMydevice.Back) ) .sp_helpdevice will list what all backupset that device contain. it would be somting like ….<br /><br />backup1<br />backup2<br />backup3<br /><br />But see, the location of all files wil be c:deviceMydevice.Back .There is no seperate backup file created for each backupset, its all wil be taken to same device file, Now can you make clear how to move and restore a backupset to another physical server <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /><br /><br />Thanks for all your helps. any helpfull hands are appreciated,not only sathya .I am not at all using device in my environment, Just thought to ask this question here.<br /><br /><br /><br /><br />rajiv<br />NewBie-23
Yes all the SQL database backups will be performed to a file and copied to DR server as a seperate step.
quote:Originally posted by SQL_Guess So I take it you agree with me, then, Satya? I.e. you always backup to disk… e.g. backup database X
to disk = ‘some file name’ Panic, Chaos, Disorder … my work here is done –unknown

Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>