Huang Cong: VPS automatically and periodically backs up website data and Mysql databases to build a site on a cloud disk, which becomes a headache because you don't know when your VPS will go down or your service provider will be running, once the website data is lost, it is almost useless. Therefore, I have developed a set of automatic backup methods.
Required:
1. one VPS (the virtual space cannot be used in this way)
2. baidu cloud synchronization disk (used to automatically synchronize backup data to the network disk)
3. Allway Sync (this software is used to automatically copy the folder to Baidu Cloud Sync disk) link: http://pan.baidu.com/s/1sjQ7tY9 password: 0ikn
4. Navicat for MySQL (this software is used to automatically back up Mysql database) link: http://pan.baidu.com/s/1dDjCzpJ password: fzdm
Procedure:
1. install Baidu cloud synchronization disk, Navicat for Mysql, and Allway Sync on VPS.
2. run Baidu cloud synchronization disk and set a folder as your synchronization disk. I set D:/wwwroot/Baidu cloud synchronization disk as the synchronization disk. Data copied to this folder will be synchronized to our cloud disk. we only need to find a way to copy the database and website information to this folder at regular intervals.
3. first, set up the Mysql backup solution to enable Mysql to automatically back up data to the Baidu cloud synchronization disk every day. First, run Navicat for Mysql and choose connection> right-click the server and choose connection properties.
4. select the Advanced tab --> set the storage path to D:/wwwroot/Baidu Cloud sync disk (set your own synchronization disk path)
5. connect to the server and choose "plan"> "create batch job"> "select available task"> "select". at this time, we have selected the database backup task.
6. click save --> set the file name (enter it as needed)
7. click set scheduled task --> New --> set "start time" to 3 (set this by yourself) --> OK. At this time, Mysql backups are ready. every day at, Navicat will automatically back up all the databases on the server to the Baidu cloud synchronization network disk and automatically upload them to the Baidu Cloud.
8. Next, set the backup of the website program. Run the Allway Sync program. this program is easy to use. on the left side, select the website folder you want to back up (for example, my wordpress program only wants to back up the uploaded files, then I will set the directory to D:/wwwroot/hcsem/Web/wp-content/uploads ), select the directory for Baidu cloud synchronization disk on the right side (it is best to create a folder for each site to differentiate). I set it to D:/wwwroot/Baidu cloud synchronization disk/hcsem/uploads
9. click "analysis". if you want to synchronize too many folders, the software will have an important reminder of too many file differences. click "ignore.
10. click "synchronize" to complete folder synchronization. However, to enable daily scheduled automatic synchronization, we also need to select "synchronization group" --> configuration --> synchronization plan --> Check "synchronize at specified intervals" --> set "synchronization interval" to "day ""--> OK.
11. now, all the configurations are complete, and you will find that the database and website programs are automatically backed up to the Baidu cloud synchronization disk at a fixed time every day, for example:
Look at Baidu cloud network disk again, there are backups every day, haha!
Every website is backed up every day.
Anyone who has a better backup method is welcome to share it. if you feel OK, remember to like it!