Tuesday, February 14, 2012

Maintenance cleanup task not deleting older backup files.

SQL Server 2005/2008 : Maintenance cleanup task not deleting older backup files.

On several occasions I have heard people mention that the maintenance cleanup task to delete older backup files from the specified directory.

In the maintenance cleanup task you can mention the directory where you want backup files to be deleted if older than x days. You can also mention 'To include subfolders' to be searched for old files. But in spite of this it won't delete the files.

The problem could be a typo. Make sure you have the correct path. I normally go to the folder in Windows explorer and copy the path.

But one of the most difficult typos to detect is the file extension. I have seen several people mention the file extension or the backup (either BAK or TRN) with a DOT '.'

Like '.BAK' or '.TRN' and this causes the problem. So.....

Do not include the DOT '.' in the file extension name.

No comments:

Post a Comment