Sql-server – How to change “Initial File Size” before restoring

restoresql server

I have backup of size 10GB. When I restore DB on server it will take around 100GB due to initial file size set to 100GB. I could change it and shrink to around 14GB.

Now I want to restore db on my local machine, but the problem is I don't have enough free space.

Is there any option to restore db/override this setting? I do not want to recreate DB from scripts and then move data using SSIS/Redgate Compare or similiar.

Best Answer

I don't believe this is possible, typically the database would need to be shrunk before or after a restore.

If this were me I'd restore the database on another server, maybe on a dev server, shrink the files, and then copy and restore locally.