Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Restore from bak file asks for too much free space

Author  Topic 

bvprasad
Starting Member

3 Posts

Posted - 2010-01-21 : 16:48:02
I am trying to RESTORE from a .bak file which is 31GB. It is asking for 360GB (12 times the bak file size) as free space, which I don't have. Is there a way I can reduce the free space requirement?

Thanks
Prasad

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-01-21 : 16:54:14
You can do a RESTORE FILELISTONLY to see file sizes of actual database files in the backup.

But if you don't have the disk space, you don't have it.

Possible you can shrink the original db, then take new backup, but that probably won't be a good idea, depending on the nature of the original db
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-01-22 : 01:40:40
RESTORE will pre-create files that are the same size of the originals, regardless of what size the BAK file is. That's why your restore is looking for 360GB.

If you have a 360GB database with 31GB of data in it (assuming your BAK file is not compressed) then I think you NEED to shrink the original as it sounds like it hasn't had much in the way of housekeeping!
Go to Top of Page

bvprasad
Starting Member

3 Posts

Posted - 2010-01-22 : 19:11:24
Thanks for the responses. I finally added an external 500GB hard drive, restored to the new drive. Here are the stats:
Space allocated: 259GB
Space free: 227GB (87%)

After shrink db:
Space allocated: 161GB
Space free: 131GB (81%)
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-01-23 : 01:09:59
So you could shrink it some more?, if you need to ...
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2010-01-25 : 20:17:17
It's because your log file was huge. You need to shrink log file and again back it up.
Go to Top of Page
   

- Advertisement -