Trim Backups From Transaction Log Backup File

  • Hi,

    I do a nightly full backup, a differential every 4 hours and then a transaction log backup every 10 minutes. For the transaction log backup, I append to the existing .trn file. However, over time that transaction log back up file grows to be quite large because it has backups from long ago. Is there a way to have those backups delete themselves as new ones are added so I only have say a week’s worth of transaction log backups? I suppose I could not append and just create a new file each time and have a Maintenance Plan task trim the old ones, but the simplicity of one single file is compelling rather than having 1000 files sitting out there.

    Thanks in advance,

    Jeff Utz ‘98

    “It is better to have one grumpf with the thunder of a thousand oxen, then a thousand grumpfs with no thunder at all.”

    -Unknown

  • Sorry - but no, there is no option available for marking space inside a file as reusable.

    Your best option is going to be using a separate file for each transaction log backup and setting up a maintenance cleanup task to delete old files. I would recommend keeping at least 2 days online, and backing those files up to tape or moving them to offline storage daily.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • I agree with Jeffrey. I have a folder with all the trans log backup files for various databases, even up to a week. Yes, there are many thousands, but who cares ? It actually can be useful to see them sometimes when looking for high activity time periods or events.

  • Thanks peeps for your responses.

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

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