After the transition from virtual host to VPS, general webmasters may feel that the cost of operation and maintenance time is still relatively large. Although sometimes the cheap VPS is a little cheaper than the virtual host, VPS is more worried about operation and maintenance than the virtual host. For example, in terms of VPS maintenance and data backup, manual backup is used instead of regular automatic backup. The backup cycle should be much shorter than that of the virtual host. For web files, we can compress and package them for FTP download, The backup of the MYSQL database needs extra care. Once the backup error is missing, it may cause great losses when it is really necessary to restore.
Lao Zuo sorted out the MYSQL database backup methods commonly used by most users for the Linux VPS host website environment:
First PHPMYADMIN export method
Whether we use a WEB panel or a one click package, PHPMYADMIN should be installed. We can directly log in and export the database to a separate website. Before going anywhere, in order to reduce the unnecessary capacity of the database as much as possible, we can clean and optimize the database files, and then export the database.
Second Mysqldump command export
Reference“ Linux VPS uses the command to quickly import/back up the MYSQL database ", log in to VPS with SSH, export the database to the root directory with the mysqldump command, and then download it to the local backup through FTP.
Third, download the original MYSQL database file
The method of directly downloading database files may not be commonly used, but it is a good method. Basically, the database restore will not be lost. Find it according to the panel or script path we use. For example, the AMH panel is under the corresponding database name of/usr/local/mysql/data/, The original database file of the WDCP panel is in the database name folder corresponding to/www/wdlinux/mysql/var. Download to local, and then upload and replace the corresponding database name if necessary.
Fourth, use the Imperial Backup King backup software
The Imperial Backup King software is also a good MYSQL database backup software. We can download it officially, put it in the root directory of the website, open the login, set the binding database link file, backup the data, and download it to the local with Backup King. If you need to restore a database, bind the new database directly, and then select Restore Database Directory.
For large websites or important websites, we can use multiple methods for backup. It is better to restore the data after testing without problems, and then delete the old data, because in case of failure to restore, it is still a terrible thing.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge