April 25, 2012 at 3:05 pm
Hello all. I'll probably know my answer by FRI but thought I'd ask and see if anyone here has actually seen it work. I created a MAINT JOB to backup my DB. Daily it's creating a *.BAK file in my "secure" (LOL) directory. I configured it in SQL to only keep 7 days of my .BAK files. My question. After 7 days will it go in my directory and delete the file from 7 days ago?
I'm running SQL 2005 🙂
April 25, 2012 at 3:08 pm
Yes. If the maintenance job is backing up directly to your "secure" directory, then it will purge .bak files older than 7 days.
_________________________________
seth delconte
http://sqlkeys.com
April 25, 2012 at 3:14 pm
AWESOME! Thanks for the reply. Now if there are files in there from a month ago is it smart enough to delete files 7 days and older and BEYOND? I have files in there from 2 months ago. I want to see if it will delete everything that's in there older than 7 days.
Again thanks for the speedy reply.
April 25, 2012 at 3:35 pm
I think it won't delete backups that were made from a different backup job, but I could be wrong. If it won't, you can create a cleanup script to do this:
http://www.mssqltips.com/sqlservertip/1324/maintenance-task-to-delete-old-sql-server-backup-files/[/url]
_________________________________
seth delconte
http://sqlkeys.com
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply