SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Backup Strategy - sanity check needed


Backup Strategy - sanity check needed

Author
Message
julia.nicholas
julia.nicholas
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 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?
Big Data Man
Big Data Man
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2432 Visits: 750
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
julia.nicholas
julia.nicholas
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 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
GSquared
GSquared
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23275 Visits: 9730
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
julia.nicholas
julia.nicholas
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 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!
GSquared
GSquared
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23275 Visits: 9730
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
Big Data Man
Big Data Man
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2432 Visits: 750
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
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86264 Visits: 45232
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, MVP, M.Sc (Comp Sci)
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


GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86264 Visits: 45232
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, MVP, M.Sc (Comp Sci)
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


GSquared
GSquared
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23275 Visits: 9730
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search