SQL Maintenance Cleanup Task Working but Not Deleting

Alex picture Alex · Mar 16, 2011 · Viewed 87.9k times · Source

I have a Maintenance Plan that is suppose to go through the BACKUP folder and remove all .bak older than 5 days. When I run the job, it gives me a success message but older .bak files are still present.

I've tried the step at the following question: https://serverfault.com/questions/245493/sql-maintenance-cleanup-task-success-but-not-deleting-files

Result is column IsDamaged = 0

I've verified with the following question and this is not my issue: https://serverfault.com/questions/94094/maintenance-cleanup-tasks-running-successfully-but-not-deleting-back-up-files

I've also tried deleting the Job and Maintenance Plan and recreating, but to no avail.

Any ideas?

Answer

sturb picture sturb · Jul 25, 2011

Try these checks:

  1. Use *.* for the file extension or bak without a dot, both of which I have found work if other issues are correct too.
  2. Make sure that the path is simply the path to where your backups are but with a backslash on the end.
  3. Check that verify is ticked when you create the back up in the first place.