Can I delete a differential backup from SQL Server 2005?
I often like to create backups when testing the software I work on, and will sometimes create a differential backup if I want to be able to get back to multiple previous states. However开发者_StackOverflow社区, sometimes I realize that I forgot one thing I wanted to include in a differential backup, or I no longer need a previous differential backup. Sometimes I simply want to create a new scenario from the original base image and start working with a new series of differential backups. So I'd like to be able to delete some older differential backups so I don't get confused about which ones I'm using. But I can't find any way to delete just the differential backups, selectively or all at once.
The best solution I've found so far is to remove the existing backup destination (so that the new backup won't overwrite it) and create a new one in a new file, then create a differential backup to that new file with the "back up to a new media set" option selected. But I currently don't understand this solution or even know if it works for sure (I haven't done a lot of backing up and restoring lately). How does it know what the base backup looks like if I've removed that file from the destination set?
I'm starting to think the best way to delete all my differential backups might actually be to skip all that and just restore to my base backup, then re-backup overwriting all existing backup sets. This method doesn't let me pick and choose which differential backups to delete, but at least I can understand what's going on and rely on it.
Where are you backing these up to? If you are backing up to disk, then you can have each backup be it's own file. That way you can individually remove files/backups you no longer want or need. The initial backup will be the base image/backup, and each after can be a differential if you want.
If your database is small enough (or you have enough space) you can always do full backups since you said this is all for testing, so I'm guessing you aren't working with huge amounts of data during this process. Then you don't need to worry about differentials, and can always do a full restore from a single file instead of having to maintain the chain.
精彩评论