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