One day, I was trying to restore 1 GB back up to a new server. But the error shows
System.Data.SqlClient.SqlError: There is insufficient free space on disk volume ‘C:\’ to create the database. The database requires 2739929088 additional free bytes, while only 801185792 bytes are available. (Microsoft.SqlServer.Smo)
There are three possibilities that I can see:
1) There is something other than what you think there is in that backup file
2) The backup was taken with compression on, which can make the backup files many times smaller than the actual database.
3) The backup is corrupt in some way.
Please use the command RESTORE FILELISTONLY FROM DISK=’mybackupfile.bak’
This should tell you what the contents of the backup file are.
You can also try RESTORE VERIFYONLY FROM DISK=’mybackupfile.bak’ to verify that the backup is intact.
So first I do, is to shrink my database by run
DBCC SHRINKDATABASE (myDatabase)
Then backup to the disk.
RESTORE VERIFYONLY FROM DISK=’C:\Temp\APP.bak’ can show the details errors.