Introduction and use of Xtrabackup

Source: Internet
Author: User
Tags mysql version percona percona server
Xtrabackup is a third party MySQL hot standby tool

Download Xtrabackup

URL: http://www.percona.com/downloads/, here you can find the Xtrabackup version you want

Install Xtrabackup

Tar zxvf p ercona-xtrabackup-2.0.1-446.tar.gz

CD percona-xtrabackup-2.0.1

Value Alias Server
Innodb51_builtin 5.1 Build against built-in InnoDB in MySQL 5.1
Innodb51 Plugin Build Agsinst InnoDB plugin in MySQL 5.1
Innodb55 5.5 Build against InnoDB in MySQL 5.5
Xtradb51 Xtradb Build against Percona Server with XTRADB 5.1
Xtradb55 Xtradb55 Build against Percona Server with XTRADB 5.5

Auto_download= "yes"./utils/build.sh 5.5 (after the name, is followed by alias, see map, here will produce a matching MySQL version, corresponding to this here is 5.5.17 version)

After installation, set up soft links

# ln-s/usr/local/script/percona-xtrabackup-2.0.1/innobackupex/usr/local/mysql55/bin/innobackupex # ln-s/usr/ local/script/percona-xtrabackup-2.0.1/src/xtrabackup_innodb55/usr/local/mysql55/bin/xtrabackup_55

# ln-s /usr/local/script/percona-xtrabackup-2.0.1/src/xtrabackup_innodb55/usr/local/mysql55/bin/xtrabackup

Then add the environment variable
Export path= $PATH:/usr/local/mysql55/bin

Now you can use
Xtrabackup backup:

/usr/local/mysql55 After the/bin/innobackupex--defaults-file=/data/mysqldata/3306/my.cnf--user=root/data/backup/full

is backed up, To use--apply-log, make a series of logs that are not written to disk during the backup process. Written to disk.

/usr/local/mysql55/bin/innobackupex--defaults-file=/data/mysqldata/3306/my.cnf--apply-log--user=root/ DATA/BACKUP/FULL/2012-07-04_13-44-40

This time, you can remove the data directory file. Perform recovery

/usr/local/mysql55/bin/innobackupex--defaults-file=/data/mysqldata/3306/my.cnf--copy-back/data/ BACKUP/FULL/2012-07-04_13-44-40

This way, even if you perform a simple xtrabackup backup and restore

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.