Sign in QQ login WeChat login
All categories

How can I automatically restore data in the background of an open Z-blog themed experience website?

finchui one hundred and eighty-eight 2024-03-29 19:44:16

At present, most of the works of Starland Studio have been opened Experience website background In order to prevent users from misoperating and confusing the background settings, I set them on the server Scheduled Task Every day, the database in the background of the experience website will be reset. How is this achieved?

Take the pagoda as an example:

1. First, back up the specified database;

2. Add a scheduled task to the scheduled task;

3. Select shell script as the task type. The task name is "restore XX database". I set the execution cycle to 5:30 every day.

4. The script content should be filled with shell commands. and Restore Database The shell command for backup is:

 Mysql - u username - p password - S/tmp/database name</home/usrdata/madmin/database backup file name.sql

5. Finally, click Add Task.

So, I have many experience website backstage, is it really a task to add?

In fact, multiple shell commands can be added to the script content, and only a new line is needed.

As follows:

 Mysql - u username - p password - S/tmp/database name</home/usrdata/admin/database backup file name.sqlmysql - u username - p password - S/tmp/database name2</home/usrdata/admin/database backup file name2.sql

Of course, if you need to set different execution cycles, you need to add new scheduled tasks.

 image.png

  • Dislike( one

Link to this article: https://www.finchui.com/web/100.html

Guess you like it

Netizen comments

Hot commodity
Popular articles
Hot tags
Related labels
 FinchUI Store Edition

share

Copy Link

Xinglan Studio Online consultation

Working hours: 9:00-22:00
Saturday and Sunday: 14:00-22:00