Hướng dẫn auto backup sql server 2008 năm 2024
When you create a maintenance backup plan in SQL Server® 2008 R2, you must identify how you want the plan to be set up. This example sets up the maintenance plan with full backups, differentials, and transaction logs. Verify that the SQL Server Agent service is running and set to automatic. The maintenance plan depends on this service to run.
On the Define Back Up Database (Full) Task page, set up the full backup according to the following instructions.
On the Define Back Up Database (Differential) Task page, set up the differential backup according to the following instructions. The settings are similar to the settings for the full backup.
On the Define Back Up Database (Transaction Log) Task page, set up the transaction log backup according to the following instructions.
This section demonstrates how to set up a maintenance cleanup task, such as a task to clean up the transaction logs after three days. This setting keeps the one-hour transaction logs for three days until the maintenance cleanup task deletes the old data. The transaction log cleanup must include a series of three days, which ensures that if you need to revert to the second differential backup, you can apply the transaction logs from that time period. The goal is to have enough transaction log backups between the full and differential backups.
After you finish setting up your maintenance plan, verify that it works. You can wait a few days to see if the job completes, or you can force the job to run by performing the following steps.
If all of your steps run without error, your maintenance plan works, and you are finished. If any of the jobs fail when testing the maintenance plan, view the job history to see what failed.
When your maintenance plan is reliable, check it in a few days to see if it is running as expected. Verify that the .bak files are removed after the expiration and that the transaction logs are cleaned up after three days. Updated 2 months ago |