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.
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.
-
1Agree 100% - write your backups as individual files. Use maintenance plans or Ola Hallengren's excellent scripts. – Peter Schofield Nov 2 '11 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. – Jeremy Boyd Nov 11 '11 at 15:05
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.
-
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. – Kamil Gosciminski May 15 '19 at 6:59
-
1Nope 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 May 16 '19 at 7:04
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.