1

I got a 18.3 GB .bak file, when restored, the database size is about 78 MB, including logs (54MB).

restore filelistonly from  DISK = N'E:\xx.bak'

BackupSizeInBytes
23068672
0

I understand that the opposite (backup smaller than restored database) might occur if there is unused space that was allocated in the source database, but this is not the case here.

Why the backup file size is much larger than the restored database?

The size on disk is 19,200,123 KB which is about 18 GB.

2
  • Backup size in bytes =23068672 which is ~23 MB not 20 GB, if i am getting the info right what you mentioned above .
    – KASQLDBA
    Jan 21, 2016 at 14:39
  • Are you sure the 20G file only included one file. When you take backup do you use NOINIT. Is this is case the backup set might have multiple backups. Run restore filelist only to see if backup has multiple files. Plus are you sure your backup is 20G filelist shows only 23 MB
    – Shanky
    Jan 21, 2016 at 14:41

1 Answer 1

2

23068672 bytes = 22 MB, not 20 GB.

If it were really 20 GB the only thing I could think that would make it that big would be reusing the same file for multiple backups and appending each backup to it.

2
  • The database backup file size is 18.3 GB, where is the rest of the data? Can you elaborate on the multiple backups ?
    – Ofiris
    Jan 21, 2016 at 14:52
  • 1
    @Ofiris You can tell SQL to append a backup to an existing file, instead of making a brand new one or over-writing it. Fred is suggesting that could be a way to make an arbitrarily large backup file that will restore to a fairly small database.
    – BradC
    Jan 21, 2016 at 15:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.