Backup with Xtrabackup Mariadb-galera-cluster

Source: Internet
Author: User

Because Mysqldump is a logical backup, and backups are inefficient, backups cannot be made quickly when there is a large amount of data

Using Xtrabackup is an excellent backup solution at this time.

1. Full backup and full restore

Backup:--backup

Innobackupex--defaults-file=/etc/my.cnf.d/server.cnf--host=127.0.0.1--user=liuwei--password=123456--backup/ tmp/backup/

Option Description:

--defaults-file: Indicates the server's configuration file, this parameter must be the first parameter of the Innobackupex, otherwise the error

--host: Indicates the host

--user: Indicates the user name of the backup

--password: Indicates the password for the backup user name

--backup: indicated as a backup, this parameter can be ignored

/tmp/backup: The directory to be backed up

Application:--apply-log

Innobackupex--apply-log 2016-07-04_17-18-53/

Note: You need to apply the collected redo log to the backup data file before you restore

Restore:--copy-back

Innobackupex--copy-back 2016-07-04_15-26-49/

Note: Actions that need to be done before you restore

1. Close the database

2. Delete all files in the data directory

3. Then restore

4. After restore, you need to modify the data directory permissions, because the default owner after restore is root, need to change to MySQL

5. Restart MySQL

This article is from the "burning Years of Passion" blog, please be sure to keep this source http://liuzhengwei521.blog.51cto.com/4855442/1882359

Backup with Xtrabackup Mariadb-galera-cluster

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.