multiple db backup setting days to delete old backups
frayed_edge
Posts: 2
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
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.