I am in the process of creating backup maintenance plans my databases. In the data flow task, I’ve placed a ‘Maintenance Cleanup Task’ that follows ‘Backup Database Task’ . In the ‘File age’ section, I only see an option of deleting files older than ‘n’ number of hours, days, weeks, months or years. Is there a way to delete files older than ‘n’ number of files?
Any suggestions are appreciated.
Thanks!
The assumption here is that because backups are being taken on a weekly/daily/hourly... basis then they should be cleaned up as such too. This logic falls over slightly if you take adhoc or out of band backups by manually running the jobs (which is often what you do when you set up the plans).
As a general rule - if you take daily backups and want to keep only 7 files then clean up files older than one week....