4 ways to back up a database with a Linux VPS host

Source: Internet
Author: User
Tags vps phpmyadmin

From the virtual host over to the VPS, the general webmaster may feel that the cost of operation and maintenance time is relatively large. For example, in the VPS maintenance, backup data, in the absence of the use of regular automatic backup function of the software is basically a manual backup. For Web page files, we can be done by compressing and packaging FTP downloads, but MySQL database backup needs extra care, once the backup error is missing, and then really need to restore recovery can cause a lot of damage.

Here are some of the more commonly used Linux VPS host backup MySQL database way:

First, phpMyAdmin Export method

Whether we are using a Web panel or a one-click package, there should be a phpmyadmin installed, and we can directly log in and then export the database to a separate site. Before going anywhere, we can clean up, optimize the database files, and then export the database in order to reduce the unnecessary capacity of the database as much as possible.

Second, mysqldump command export

Standard command: Mysqldump-u database user name-p database Password--default-character-set= encoded database name > database file name. sql

Demonstration case: mysqldump-ulaozuo-plaozuo.org--default-character-set=gb2312 Laozuo > Laozuo.sql

There are two questions to note here, and the first one is the coding problem. According to the code of the database of own website, is gb2312 or utf-8

Login to the VPS with SSH, then use the mysqldump command to export the database to the root directory, and then download to the local backup via FTP.

Third, download the original MySQL database file

The method of downloading a database file directly may not be common, but it is a good way to basically restore the database without losing it. Based on the panel or script path we used to find, such as AMH panel in/usr/local/mysql/data/corresponding database name, WDCP panel database original file in/www/wdlinux/mysql/var corresponding database name folder. Download to local, and then if you need to restore the corresponding database name upload replace it.

Iv. using multi-backup backup software

Multi-backup backup software is also a good backup software, I believe everyone has been aware of it. That is, you can back up the database or back up files. Tell me about the backup. After registering for the account, create a new task-database backup, select the type of database that needs to be backed up, and fill in the corresponding information data to start the backup. When you need to restore or migrate, it is also a key to complete.

Let's introduce so much, backup way I think it is to choose fast and good, multi-backup is a good choice. If you feel that these methods are not satisfied with your words, please leave a message we discuss together.


4 ways to back up a database with a Linux VPS host

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.