Our system maintenance process will certainly need to make regular backups of the database, but if the scheduled manual backup, not only a waste of time, but also can not guarantee that every time the backup, so automatic backup becomes our choice, but the scheduled backup needs to regularly clean up the backup files, Otherwise, because of insufficient disk space to cause backup failure, loss of the accuracy of backup, below we take a step-by-minute look at if you automatically back up and delete outdated backup data.
1. Open SQL SERVER R2, connect to the database, right-select administration-Maintenance Plan-Maintenance Plan Wizard.
2. In the name, take an easy-to-understand name for the maintenance plan, such as "Everydaybak", then click Change to make a plan of execution for the maintenance plan.
3. The execution plan can be executed on a daily, weekly and monthly basis at its own request, for example the plan is to be executed 0 o'clock in the morning every day.
4. Then click OK to return to the previous step of the "Maintenance Plan Wizard-Select Schedule Properties" screen and click Next. The Select Maintenance Plan screen pops up.
5. Select the "Back Up Database (full)" and "Purge Maintenance" tasks two check boxes. Select Next, arrange the task order, and you can go directly to the next step.
6. Popup "Define" Backup Database (Full) "Tasks" window
Select the data you want to back up in the Database drop-down box to check.
Next to select the path to save the backup file, you can check the "Verify Backup integrity" checkbox to improve backup security.
Finally, in the "Set backup compression" option, select whether or not to compress according to your server's situation.
And then next.
7. Select "Search files and delete files based on extension", enter the folder in the folder text box to save the database backup, enter "bak" file name extension
In the file retention area, select the Delete files based on file retention time at file runtime check box, and then select the length of backup retention you want in the drop-down box below. And then next.
Click "Finish".
It's so easy to automatically back up and delete outdated backup data.
SQL SERVER R2 automatically backs up and deletes outdated backup data