Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database backups

Status
Not open for further replies.

rhysmeister

Programmer
May 29, 2003
54
GB
My SQL Server 2000 \ Windows 200 Server machine had happilly ran a maintenance plan for sometime with no problems. A Couple of weeks ago I noticed that backups were not being deleted when they are supposed to be (if they are 7 days old). I checked the configuration and it looked fine so I deleted and reconfigured the maintenance plan. This did not solve the problem. Can anyone shed any light on this?
 
I gave up having MS delete them through the job. I wrote a batch job that does a robocopy to move all older than 7 days to a temp folder then I delete everything from the temp folder. Works for me.

ROBOCOPY "\\db\d$\mssql\backup" "\\db\d$\mssql\backup\temp" *.bak /move /minage:7
ROBOCOPY "\\db\d$\mssql\backup" "\\db\d$\mssql\backup\temp" *.trn /move /minage:7
DEL "\\db\d$\mssql\backup\temp\*.*" /q 2>nul

I did hear something about this feature stopping working after a name change of the server or the instance or something. Did you do something like that?

Debi
 
By the way ROBOCopy is a ...


Robocopy is a powerful Microsoft Windows 2000 Resource Kit and Microsoft Windows NT 4.0 Resource Kit tool. This command-line tool can accomplish a variety of scripted copying tasks, including large data migrations and server consolidations.


You can pull it out of the 2000/2003 RK or you can download it from here ...


Thanks

J. Kusch
 
Robocopy is awsome. Yeah, there's some issue with sqlmaint.exe deleting backups after something or another happens. It usually is that the SQL server has decided that it doesn't want to delete them any more.

Manual deletion is the best bet.

Denny

--Anything is possible. All it takes is a little research. (Me)
 
The server name hasn't changed as long as I have been here and the problem occured when I was here. I'll give ROBOCOPY a go.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top