MySQL Innobackupex

yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
yum list | grep percona
yum install percona-xtrabackup-24


CREATE USER 'backup'@'localhost' IDENTIFIED BY '[email protected]';
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'backup'@'localhost';
FLUSH PRIVILEGES;

## Backup
innobackupex --include="^test\." --user=backup [email protected] --no-timestamp /backup

innobackupex --databases=test --compress --compress-threads=4 --no-timestamp /backup
innobackupex --apply-log /backup

## Restore
service mysql stop
mkdir /tmp/mysql
mv /var/lib/mysql/* /tmp/mysql/
innobackupex --copy-back /data/backups/new_backup
chown -R mysql: /var/lib/mysql
service mysql start