Options

multiple db backup setting days to delete old backups

frayed_edgefrayed_edge Posts: 2
edited July 12, 2005 6:30AM in SQL Backup Previous Versions
I have the stored procedure to run the backups for all the databases on the server. Is there some way of setting it to delete old backups over a certain age?

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Thanks for asking, and yes, this is possible by changing the arguments in to the sqlbackup stored procedure. Somewhere in the arguments that you give to sqlbackup in your script, specify the ERASEFILES=(days) or ERASEFILES_ATSTART=(days). The second will clean up the old files before backing up, in the case that you run low on disk space, and the first will erase the old backup files after successfully completing the backup. I recommend ERASEFILES unless you are desparately low on disk space.
Sign In or Register to comment.