January 14, 2008 at 3:15 am
Hi,
I have two maintenance plan to backup sql server 2005 databases. They have different databases to backup with one day retention.
Plan A backup 3 dbs (1,2,3) mon - fri at 9:00 PM
Plan B Backup 2 db (4,5) daily at 9:00 PM
On Saturday Plan B is deleting backups of Plan A (which were completed on Friday).
Following is the code executed from PLAN B
-------------------------------------------
Maintenance Cleanup Task (servername)
Maintenance Cleanup on Local server connection
Cleanup Database Backup files
Age: Older than 1 Days
Task start: 13/01/2008 21:00.
Task end: 13/01/2008 21:00.
Success
Command:EXECUTE master.dbo.xp_delete_file 0,N''D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup'',N''bak'',N''01/12/2008 21:00:07'',1
The only solution I can think of is to have different extention for BACKUPS for the two plans.
Am I doing something wrong or is it a BUG?
Deepak
January 15, 2008 at 7:25 am
If all backups are in the same folder, the cleanup task will delete anything with a .bak extension. If you seperate the backups into different folders and have seperate cleanup tasks for each sub folder it should only remove what is in that folder.
January 16, 2008 at 11:31 am
The cleanup task deletes all .bak files not ones made by a particular maintenance plan. You would have to segregate the backups into seperate folders as another poster mentioned. Your only other option is to have only one cleanup task. You would have to schedule this task to delete the backup files at the same interval. e.g. all database backup files are deleted after 7 days.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply