SQL server backup maintenance

Configure cleanup task correctly

The correct procedure for configuring the Backup Maintenance Cleanup Task.

Subscribe to our newsletter

The correct procedure for configuration

It often happens that the backup maintenance cleanup task is not configured correctly. The result is that the hard disk fills up over time because old backups of the database or the transaction log are not deleted. Below is an explanation for the correct configuration:

  • Do NOT enter *.BAK or *.TRN for the file extension, but only BAK or TRN.
  • Furthermore, we recommend specifying the concrete path without using the "include top-level subfolders" function, as this does not always work reliably.
  • We also recommend adding a = backslash at the end of the folder path. This is illustrated in this example (see picture): EXECUTE master.dbo.xp_delete_file 0,N'C:BackupCIM_RIMIS',N'BAK'. Without this, everything called "CIM_RIMIS" or similar and ending in BAK would be deleted. However, this may not be desired because, for example, there are several subfolders.
One rule is that backups should remain on the server at least twice as long as they are backed up to an external medium - there is always a risk that the external backup will fail.

Do you have any questions? Then feel free to contact our experts via our contact page or by phone at +49 7331 3076 - 0.

Configuration Backup Cleanup Task

Subscribe to our newsletter

Subscribe to our biannual newsletter and stay up to date.

* Mandatory field