Schedule Daily SQL Database Backup Cleanup

September 10, 2024
  1. Download batch file from here - https://trms.box.com/s/kysfxebpzqs71tyfzqdies1adg0zylyo

    This batch file can be edited to increase or decrease the amount of time we wait for files to be cleared. Open the file in a text editor and update the value after -d and information log message
  1. Open 'Task Scheduler' via the Windows start menu
  2. Click 'Action' from the menu bar and select 'Create Task...'
  3. On the General Tab, name the action Cleanup Database Folder or something that makes sense. Configure for the appropriate server dropdown at the bottom
  1. On the Triggers Tab, select New and configure a daily schedule to run shortly after housekeeping ideally.
  1. On the Actions Tab, select new and browse Windows Explorer for the .bat file downloaded in Step 1 and select OK. It will clear the folder once the file runs of files older than 7 days.