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

.bak file quadrubles in size with restore Expand / Collapse
Author
Message
Posted Wednesday, October 17, 2012 2:23 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 17, 2012 3:41 AM
Points: 1, Visits: 2
I'm a newbie and I'm using using SQL 2008 R2
I have a 10GB .bak file that when I restore requires 41GB. The restore fails because I currently have insufficient disk space. I don't understand, because the original MTB file is only 12GB. The Log file is 60GB (if that's of any consequence). Can I crop the .bak file before I restore?
Post #1373670
Posted Wednesday, October 17, 2012 2:30 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, April 07, 2014 12:42 AM
Points: 613, Visits: 1,252
sean 1516 (10/17/2012)
I'm a newbie and I'm using using SQL 2008 R2
I have a 10GB .bak file that when I restore requires 41GB. The restore fails because I currently have insufficient disk space. I don't understand, because the original MTB file is only 12GB. The Log file is 60GB (if that's of any consequence). Can I crop the .bak file before I restore?





You need to shrink the database before taking the backup. Other wise it will try to create the db with same size as the original databse


-- Roshan Joe
*******************************************
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #1373674
Posted Wednesday, October 17, 2012 3:06 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 @ 1:05 PM
Points: 41,512, Visits: 34,427
When restoring SQL recreates the DB exactly as it was at time of backup, including file sizes. So you will need space for the full size of the original DB.

That the log is way bigger than the data file suggests missing log maintenance. Please read through this - Managing Transaction Logs



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 #1373692
Posted Tuesday, October 23, 2012 6:50 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 5:48 AM
Points: 1,048, Visits: 2,646
joeroshan (10/17/2012)
You need to shrink the database before taking the backup. Other wise it will try to create the db with same size as the original databse


joeroshan, hope you can suggest him to do a log backup rather than shrinking the log file.




Regards
Durai Nagarajan
Post #1376007
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse