What are the challenges you face when working across database platforms? Take the survey

How much free disk space is required?

tleblanctleblanc Posts: 17 Bronze 2
edited November 30, 2012 2:13PM in SQL Backup Previous Versions
Sorry for this really basic question :oops: but how much free disk space is required to decompress the backup and restore it over an existing database?

The error I'm getting:
10/18/2012 10:20:13 AM: Failed to read backup file header: Failed to write data block size of 65536 from 2293760 (wrote 0): There is not enough space on the disk Failed to write data block size of 2293760 (wrote 327680)

I'm trying to take the back-up of our production database and restore it over the previous night's copy on a reporting server. The MDF file is about 425 GB and there only 287 GB free.

Does there need to be >425 GB free? So does the total size of the drive need to be MDF size * 2?

** added **
Or does the space need to be on the drive the .SQB file is on? (the MDF is on G and the backup file is on H and neither have a spare 425GB...)
** / added **



  • Options
    This is being looked at by my colleague via our support system.

    There is no scratch pad area where backup data is staged during a restore. The error message that you are getting is because SQL Server does a size check when it starts a restore. Because you don't have enough space on that drive you are being thrown an error. The space check is done on the destination location where the database files are going to be hosted, not on the location of the backup file (unless the database files and the backup file are on the same drive).

    I note that your intent is to overwrite the previous copy of the database. In this case you can execute a restore command with the 'replace' option. This will just overwrite the previous database files.

    Note that you will lose that previous copy of restore database when you execute this command.

    Thanks for your patience and feedback in this matter.
  • Options
    tleblanctleblanc Posts: 17 Bronze 2
    Thanks Raj,
    When you say
    In this case you can execute a restore command with the 'replace' option.
    are you referring to something placed in the resulting sqlbackup script? Because I'm already specifying that I want to overwrite the database in the Edit Restore Job wizard.
  • Options
    tleblanctleblanc Posts: 17 Bronze 2
    While there may not be a true "scratch disk" there is the TempDB. It had outgrown its drive capacity on our server and was the ultimate cause of the not enough disk space error in this case.

    I reset the SQL service (truncating the TempDB) and that allowed me to do the restore.

    I subsequently changed the location of the TempDB to a drive with more room to grow.
Sign In or Register to comment.