Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the complete steps for setting an automatic backup policy for a SQL Server database

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

What this article shares with you is what is the complete step of setting automatic backup strategy for SQL Server database. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Why make a backup?

Data backup is the basis of disaster recovery, which refers to the process of copying all or part of the data set from the hard disk or array of the application host to other storage media in order to prevent data loss caused by system errors or system failures. The traditional data backup mainly uses the built-in or external tape drive for cold backup. But this method can only prevent operation errors and other man-made failures, and its recovery time is also very long. With the continuous development of technology and the massive increase of data, many enterprises begin to adopt network backup. Network backup is generally realized by professional data storage management software combined with corresponding hardware and storage devices.

one。 A brief introduction

SQL Server's own maintenance plan is a very useful maintenance tool that can accomplish most database maintenance tasks.

Database backup is also a very important part of daily work. There are many ways to back up.

Today, I will introduce the simplest way: directly through the SQL Server Management Studio graphical interface to set backup strategy.

Moreover, this mode of operation is the fastest to respond to the immediate backup requirements, and the backup strategy can be created directly through the graphical interface without writing code.

two。 Demand

Here is how to create a backup strategy combined with a specific work scenario.

For example, a backup of a production system is generally required as follows:

-1. A full backup every Saturday (this article only implements this requirement, the other two please refer to requirement 1)

-2. One incremental backup per day during weekdays

-3. All backups are deleted voluntarily after a month.

three。 Hands-on Activities

Operation steps

1. New maintenance plan

two。 Name the maintenance plan

3. The task of creating a maintenance plan

4. Set up tasks for the maintenance plan

5. Set up a subplan

6. Find the plan in the assignment and test it

7. After successful execution, the backup bak file is found in the backup file set up.

8. If the execution fails, check the history of the job and correct it (usually it may be the account permission to execute the job, please explore for yourself)

Realize the requirement of full backup every Saturday

1. New maintenance plan

two。 Name the maintenance plan, for example, here we call it "Saturday_full_backup"

3. Drag the toolbox to create a maintenance plan task

4. To set up the task, refer to the following figure (under win10, there is a problem with the interface display of the setting task. Here I cut the image of the server)

Set the backup type to: full (full)

5. After the task is set up, set the subplan

Set the execution time to: every Saturday, 22:00 in the evening

6. After the backup policy is set, find the backup policy you created in the sidebar on the left

SQL Server Agent-- > Job-- > Saturday_full_backup.Subplan_1 (backup strategy you just created)

7. Right-click the job and select "Job start step"

8. After the job is executed successfully, go to the backup folder you set up and view the backup task you just performed

At this point, the SQL Server database setting automatic backup policy has been completed ~

If the job fails, right-click the job, view the History, find the cause of the error and correct it

Be sure to learn to read the wrong log, this is the way to cope with changes!

These are the complete steps of setting automatic backup strategy for SQL Server database. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report