Enough disk space?

  • Hi.

    I have a question about backups and how they are overwritten. If I have a backup job that says to retain a full backup nightly for 2 days does sql still need enough room on disk for 3 full backups? What I'm trying to say is on the third day, will it still need to allocate enough free space on the disk to create the third full backup and then delete the second, or will it just overwrite the first one without having to allocate that space?

    Here's a pretend situation: I have a 120 gig drive- my database backup is usually about 50 gigs. On the the third day when there is only 20 gig available- will the job fail?

     

    Thanks!

    Thanks!

  • Yes. It needs enough space on disk for 3 full backups.  Ths backup job will fail. 

     

    Thanks.

  • If I understand correctly, the reason you need space for 3 backups is because the oldest backup is not deleted until a successful backup on the third day, so that there is always a guarantee of having two successful backups at any one time.  Although I'm not sure how useful an old backup would be after several days of backup failure but hopefully you would be notified and have acted on a backup failure immediately and any backup is better than nothing  (usually).

  • The maintenance plan will create a new backup of all databases before deleting old backups.  Any failure in any database will kill the maintenance plan before the old files are deleted.  (This is probably ultra-conservative by design.)

    One approach is to use multiple maintenance plans with a staggered schedule, so one can finish and delete old backups before the next one starts writing.

    In extreme cases you can delete the backup jobs by other means.  I have had problems with flaky hardware that, after spending hours writing hundreds of gigabytes of backup files, sometimes refuses to let the maintenance plan write a few lines of text to the log file.  Two days of this in a row (usually on weekends) leave the backup share too full to write any more backups.  My solution was to schedule a backup-deletion job that runs before the regular backup job.  It deletes backup files that came from the maint plan, have a clear archive bit (have been written to tape), where at least one newer backup file exists for the same database.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply