10

The title pretty much sums it up. We are running out of space on our backup disks, and need to remove old backups out of the set. I can't seem to find any information on this.

3 Answers 3

9

I would change your backup strategy to write to individual files for each database backup. You could then have a maintenance plan step that examines your backup location and removes *.bak files older the X days.

2
  • 1
    Agree 100% - write your backups as individual files. Use maintenance plans or Ola Hallengren's excellent scripts. Commented Nov 2, 2011 at 22:53
  • We ended up doing this, just stinks that we have to have a maintenance plan, and that the backupset can't handle that. Commented Nov 11, 2011 at 15:05
4

There's no way (that I've ever heard of) to delete a single backup from a backup file. This is why people write each backup to a separate file so you can just delete the old files.

2
  • Do you know if anything changed from 2011? I've spent a lot of time searching for a way to delete individual backups from a file. Commented May 15, 2019 at 6:59
  • 1
    Nope nothing has changed and I'd expect nothing to ever change on that front. In fact new features like backup to url only support one backup per file.
    – mrdenny
    Commented May 16, 2019 at 7:04
-1

Well, if you really want to get a db with those selected items you could restore the database to a new database and choose the backups you want to keep whilst restoring.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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