Sql-server – Excessive space required for SQL Server .bak restore

database-restoresql server

I am trying to restore a SQL Server 2008 (standard edition) backup to my dev machine using the production database. I get an "insufficient free space" error when doing so. SQL Server claims that it needs 43 GB free to restore my db, but the .bak file is only 4.5 GB! Sure, I'll give it a little room to operate, but 10x the amount of actual space used seems a little excessive. I am not compressing this db (when I do compress the .bak file, it goes down to .8 GB).

Is there anything I can do to the original db to allow it to be installed within a smaller working space?

Best Answer

Is it likely your transaction log file...the backup will want to create one as large as was on the original.

Your best bet if this is the case is to shrink the log file before you do the backup.

Another option outside of backup if you can get away with it is to detach, and then copy the database file and re-attach, SQL will then create a new transaction log file at the default size of like 1mb.