Xtrabackup is an open-source tool used to back up the InnoDB database of MySQL.
New features of this version.
1. This version of xtrabackup percona fully supports the new MySQL 5.6 feature.
2. xtrabackup percona supports InnoDB buffer pool preloading to introduce MySQL 5.6.
3. configurable log replication Interval check.
4. When innobackupex-slave-info is used to back up MySQL and percona server 5.6, the gtid value is stored in xtrabackup_binlog_info.
5. The xtrabackup-export option now supports portable tablespace introduced in mysql5.6.
In addition, this version also has many bugs in fixed.
Use xtrabackup for MySQL hot backup and data recovery
Xtrabackup is an open-source tool used to back up the InnoDB database of MySQL. It supports hot backup and Incremental backup with high performance.
The RedHat installation method is as follows:
1. Download RPM installation package (xtrabackup-1.4-74.rhel5.x86_64.rpm)
2. rpm-IVH xtrabackup-1.4-74.rhel5.x86_64.rpm
For how to install other systems (Windows, BSD, and UBUNTU), see here.
Backup:
1. Back up data to a directory:
Xtrabackup -- backup -- datadir =/var/lib/MySQL/-- target-Dir =/data/backups/MySQL/
For a detailed list of xtrabackup command parameters, see here.
You can directly add [xtrabackup] To My. CNF to specify the xtrabackup parameter, such as user and password, so that you do not need to enter the password during Backup.
2. Restore backup data
A. Stop MySQL service: $/etc/init. d/mysqld stop or service MySQL stop
B. modify my. CNF's datadir to the backup directory: datadir =/data/backups/MySQL/
C. Start the MySQL service: $/etc/init. d/mysqld start the latter Service MySQL start
It is quite simple. As for Incremental backup, you must specify the directory of the last backup during Backup.
Xtrabackup -- backup -- target-Dir =/data/backups/INC1 -- incremental-basedir =/data/backups/base -- datadir =/var/lib/MySQL/