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


Backup Time vs Restore Time


Backup Time vs Restore Time

Author
Message
_nzrdb6
_nzrdb6
SSC-Enthusiastic
SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)SSC-Enthusiastic (106 reputation)

Group: General Forum Members
Points: 106 Visits: 547
As a rule of thumb, would you guys expect restores to take approx the same time as backups. Its a question I've not really considered before. I'm being asked to estimate restore time where backup time will be around 2hrs in total across a number of DBs.

cheers
Keith Tate
Keith Tate
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2298 Visits: 979
There are too many variables in a restore to say "that you should experience a 2 x backup time for you restore time". Your backup is backing up 8k pages that are in use, but your restore has to account for the full size of the database regardless of used 8k pages. So, some of the questions to answer are:
1. Are you restoring to the same hardware (or very similar)?
2. Are you on a SAN and are you restoring to the same level of spindles (or SSDs)?
3. Does the restore DB already exist on the machine or will it create it new?
4. Is instant file initialization turned on on the restore machine?
5. How is the size of your DB distributed? MDF and NDF vs LDF (Log file can't use IFI).
6. Will you be restoring from a network share, local storage, etc?

The best way to tell how long it will take to restore is do actually restore the database. Good news there is a query that you can use to help let you know how long the restore will take once you have started it. I have provided a link to the blog post with the query:
http://johnsterrett.com/2011/08/29/how-long-will-this-sql-server-restore-take/



Microsoft Certified Master - SQL Server 2008
Follow me on twitter: @keith_tate

Forum Etiquette: How to post data/code on a forum to get the best help
GilaMonster
GilaMonster
SSC Guru
SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)

Group: General Forum Members
Points: 221865 Visits: 46282
_nzrdb6 (11/25/2013)
I'm being asked to estimate restore time where backup time will be around 2hrs in total across a number of DBs.


Restore the database, see how long it takes. Best way. You should be doing test restores regularly to ensure that the backups are restorable as it is.

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


ScottPletcher
ScottPletcher
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19431 Visits: 7410
I'd expect the restore time to generally be longer; if restoring to a new database, potentially significantly longer.

For a backup, SQL only needs to backup the active portion of the log. When restoring, SQL needs to restore the entire log, and also ultimately roll forward and/or roll back in-flight transactions to make the final db useable.

SQL DBA,SQL Server MVP(07, 08, 09) Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial:
If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (212K reputation)SSC Guru (212K reputation)SSC Guru (212K reputation)SSC Guru (212K reputation)SSC Guru (212K reputation)SSC Guru (212K reputation)SSC Guru (212K reputation)SSC Guru (212K reputation)

Group: General Forum Members
Points: 212819 Visits: 41977
I have a 141GB database that takes 00:31:05 to backup and and 01:31:27 to restore. I don't know if the 3:1 ratio exists elsewhere but, as you can see, it takes this particular database substantially longer to restore than it does to back-up.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)

Group: General Forum Members
Points: 93899 Visits: 38955
This is, obviously, an it depends moment. At a previous employer our 75 GB HR and Finance databases had backup and restore times under 10 minutes. These were native compressed backups using SQL Server 2008 Enterprise Edition.

On older hardware with SQL Server 2005 and Hyperbac for compression these same databases took 30 minutes to backup and restore. Without compression, approximately 1 hour for both.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
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