Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Backup Strategy - sanity check needed Expand / Collapse
Author
Message
Posted Tuesday, March 11, 2008 11:43 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 8, 2008 3:10 AM
Points: 24, Visits: 68
I'm trying to figure out a backup strategy for SQL 2005. I need to have a recovery routine that minimises downtime, so I figured I'd go with a daily full backup, 4 hourly differentials and translog backups every 30 minutes.

I'm concerned about the backup files getting oversized and having to fish through multiple backup sets looking for the right files to recover in the right order so I need to decide when to INIT the backup devices, and if indeed, it is a good idea to have 3 backup devices (one for full, one for the diffs and one for the translog backups). I came up with the idea of running the following steps in my daily backup job:
STEP 1 - backup database to fullbackup_device WITH INIT
STEP 2 - do differential backup to diffbackup_device WITH INIT
STEP 3 - do translog backup to translogbackup_device WITH INIT

In the 2 hourly differential backup job just do a diff backup to diffbackup_device WITH NOINIT.
In the translog backup job do a translog backup to translogbackup_device WITH NOINIT.

I need a sanity check. Is this a sensible plan or I'm I missing the blindingly obvious?
Post #467664
Posted Tuesday, March 11, 2008 12:03 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 2:46 PM
Points: 2,153, Visits: 658
julia.nicholas (3/11/2008)
I'm trying to figure out a backup strategy for SQL 2005. I need to have a recovery routine that minimises downtime, so I figured I'd go with a daily full backup, 4 hourly differentials and translog backups every 30 minutes.

I'm concerned about the backup files getting oversized and having to fish through multiple backup sets looking for the right files to recover in the right order so I need to decide when to INIT the backup devices, and if indeed, it is a good idea to have 3 backup devices (one for full, one for the diffs and one for the translog backups). I came up with the idea of running the following steps in my daily backup job:
STEP 1 - backup database to fullbackup_device WITH INIT
STEP 2 - do differential backup to diffbackup_device WITH INIT
STEP 3 - do translog backup to translogbackup_device WITH INIT

In the 2 hourly differential backup job just do a diff backup to diffbackup_device WITH NOINIT.
In the translog backup job do a translog backup to translogbackup_device WITH NOINIT.

I need a sanity check. Is this a sensible plan or I'm I missing the blindingly obvious?


Hi,

First thing, you need to ask the business, what are our Recovery Time and Recovery Point Objectives, as these thresholds will drive your backup strategy. Otherwise, you risk letting technology drive your backup plan, which is not a good way. Once you have both of these values, you will need to devise a plan to meet or better exceed the RTO and RPO expectation for the business.

So, as an example, the business provide you with a RTO of 1hr (back in business) and a RPO of 30min (what we can afford to loose in data terms). Now you have something to work with and you decide to do following:

1. Full backup - Daily 20:00
2. Differential backup - Every 4 hours
3. Transaction log backup - 30min

So this means, in event of a failure, you get back within 30min from point of failure, maybe more if you can backup tail of transaction log. Now, achiving the 1hr RTO is going to depend on how fast you can restore your full backup, your latest differential and transaction log to point before failure. The only way to ensure you can achive this is to test, test and test again. Most importantly, you will need to ensure you allocate ample storage to support your strategy, so this is a key requirement to allow a smooth recovery process. The more log dumps you have, the more management you'll need to perform in terms of making sure the backup files are safe.

Another way of achieving the RTO and ROP would be to look at other features of SQL Server, such as log shipping and database mirroing, which should be included in your DR strategy, as these methods are faster then playing backups.

Finally, if file size and storage utilization are major concerns, look at implementing tools such as Red-Gate or Quest Light Speed backup products, as they allow you to compress your backup files.

Thanks,
Phillip Cox
MCITP - DBAdmin
Post #467676
Posted Tuesday, March 11, 2008 12:45 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 8, 2008 3:10 AM
Points: 24, Visits: 68
Thanks for the reply Phillip. I had already based the plan around these factors and hence the daily, 4 hourly, 30 minute schedule. This is just one element of my overall DR plan.

What I'm trying to ascertain is if the plan I have for clearing the diffs and translogs down once a day at the point of full backup has any draw backs. It appears to work and I can get point in time recovery I need and a restore within the time boundaries I've set for this exercise. My question is just a nuts and bolts technical one.

Thanks

J
Post #467699
Posted Wednesday, March 12, 2008 11:56 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Monday, November 17, 2014 12:50 PM
Points: 13,872, Visits: 9,598
The only thing I'm not sure I like about the plan you have is that you initialize the backup during each daily backup.

That means, if something goes wrong with the current day's backup, you have zero ability to recover from it at all.

Say, for example, that the database crashes and needs to be restored, and it happens while the nightly full backup is being done. Probability of such is low, but the whole point of backups is to make low-probability disasters less disastrous. In that case, if you don't have the prior day's full and differential backups available, your database is toast and probably can't be recovered.

Or am I misreading something?


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #468307
Posted Thursday, March 13, 2008 8:16 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 8, 2008 3:10 AM
Points: 24, Visits: 68
This was the kind of scenario I was thinking my be an issue with INITing it every day.

Thinking aloud...
We tape backup the server shortly after the 20:00hrs full backup job, so, if this were to happen and the full backup failed, it wouldn't run the differential WITH INIT step in the Job nor the Translog backup WITH INIT. In theory that would leave the differentials and translogs in tact (wouldn't it?) and I should be able to pull back the full backup from the previous night's tape and then apply the diffs and translogs.

Sanity check #2 please!
Post #468749
Posted Thursday, March 13, 2008 10:46 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Monday, November 17, 2014 12:50 PM
Points: 13,872, Visits: 9,598
Differential backups are only useful if the prior full backup is good. So in the case we're discussing, where the full backup was lost, your differential backups would be useless.

In that case, you'd be recovering from the prior day's full backup, and the most recent log backup. Have you tested that to see if it works and accomplishes what you need? (Backups are only as good as you've tested them.)


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #468892
Posted Friday, March 14, 2008 1:15 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 2:46 PM
Points: 2,153, Visits: 658
Hey,

Just adding to GSquared's points, you wouldn't want to initilize the same file everyday, as this zero outs last backup contents. I would recommend you consider using file backups per day with a date stamp (e.g. mybackup_1403200820000.bak).

Thanks,
Phillip Cox
MCITP- DBAdmin
Post #469214
Posted Friday, March 14, 2008 11:41 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 40,438, Visits: 36,895
Make very sure that you have viable backups somewhere other than on the server itself. See here for why.

There no point in doing a diff straight after a full DB backup. A diff backups up changes since the last full DB backup. If run straight after a full, it will backup nothing.

Make sure you test your backups. The more frequently you test, the better. A backup you can't restore from is worse than useless.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #469574
Posted Friday, March 14, 2008 11:58 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 40,438, Visits: 36,895
GSquared (3/13/2008)
In that case, you'd be recovering from the prior day's full backup, and the most recent log backup.


To do that, you'll need the previous day's full DB backup, and all the transaction log backups, in order, since that backup. Since the log backup right after the failing full is WITH INIT, the log backup chain is broken at that point.




Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #469586
Posted Friday, March 14, 2008 12:41 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Monday, November 17, 2014 12:50 PM
Points: 13,872, Visits: 9,598
GilaMonster (3/14/2008)
GSquared (3/13/2008)
In that case, you'd be recovering from the prior day's full backup, and the most recent log backup.


To do that, you'll need the previous day's full DB backup, and all the transaction log backups, in order, since that backup. Since the log backup right after the failing full is WITH INIT, the log backup chain is broken at that point.



That was the point of my original reply on this. Of course, that's assuming the transaction log is being truncated by the backups. If not, then each transaction log backup is complete and could be used (I think). I've never done anything as odd as what's being proposed here, so I've never had reason to test it.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #469632
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse