Thursday, March 8, 2012

database maintenance plan - differential backup

I have implemented a backup strategy using the Full Recovery mode. Using the database maintenance plan I created 2 jobs:
1. Full database backup once each night
2. Transaction Log backups every 15 minutes
However, I would also like to implement a differential backup perhaps 4 times per day. This would save me from having to restore dozens of transaction Log backups in the event of a failure towards the end of a day
I know that the database maintenance plan does not support differential backups. Is there any plans to add this in the future?
Also, if I create a separate job for differential backups, how do avoid the T-Log backup and differential backup executing at the same time without increasing the T-Log interval?
What happens if both the T-Log and differential backup occur at the same time?
Scott,
I basically asked the same question on 07/09 with subject "backup sets to
named device". I solved my own problem like this:
Job A runs once daily at zero hours.
Step 1 creates a backup device pointing to local file with sp_addumpdevice.
Step 2 performs full backup with BACKUP DATABASE.
Step 3 removes old backup devices with sp_dropdevice.
Job B runs daily every 4 hours.
Step 1 performs diff backup with BACKUP DATABASE.
Job C runs daily every 10 minutes.
Step 1 performs log backup with BACKUP DATABASE.
Each job uses datetime and string functions to create the device and file
names, such as NorthWind_YYYYMMDD and NorthWind_db_YYYYMMDD.bak. For step 3
of Job A, I query sysdevices to get the names of old devices. You can
determine how many devices and associated backups remain based on the query.
I end up with complete backups for each day encapsulated in a single file
which gets written to tape and stored offsite.
It's working like a charm. I'll post the detailed t-sql if you need it.
Anthony
|||Scott,
Sorry about not really answering your questions in the previous post. I
have had backup jobs executing at the same time and didn't see any problems.
But for my previous suggestion, I have full at zero hours, logs every 10
minutes starting at 00:05 to 23:59, and diffs every 4 hours starting at
04:00 to 23:59. Now none of the jobs intersect.
I haven't looked at Yukon. But since it's .Net based, you will probably
be able to code you're own maint plans.
Anthony
|||Thanks Anthony, I would love to see the T-SQL. It sounds very creative.
My only concern is if both the transaction log and the differential backups execute at the same time, will it cause conflicts somehow.
"Anthony" wrote:

> Scott,
> Sorry about not really answering your questions in the previous post. I
> have had backup jobs executing at the same time and didn't see any problems.
> But for my previous suggestion, I have full at zero hours, logs every 10
> minutes starting at 00:05 to 23:59, and diffs every 4 hours starting at
> 04:00 to 23:59. Now none of the jobs intersect.
> I haven't looked at Yukon. But since it's .Net based, you will probably
> be able to code you're own maint plans.
> Anthony
>
>

No comments:

Post a Comment