Xtrabackup is an open-source project of percona (mysqlperformanceblog) to implement functions similar to innodb's official Hot Backup Tool InnoDBHotBackup. But in fact, Xtrabackup also provides additional functions (but there are also unimplemented functions ). Xtrabackup contains two tools: xtrabackup
Xtrabackup is an open-source project of percona (mysqlperformanceblog) to implement functions similar to innodb's official Hot Backup Tool InnoDB Hot Backup. But in fact, Xtrabackup also provides additional functions (but there are also unimplemented functions ). Xtrabackup contains two tools: xtrabackup-for Hot Backup innodb, x
Xtrabackup is an open-source project of percona (mysqlperformanceblog) to implement functions similar to innodb's official Hot Backup Tool InnoDB Hot Backup. But in fact, Xtrabackup also provides additional functions (but there are also unimplemented functions ).
Xtrabackup contains two tools: xtrabackup-tools used for hot backup of innodb and xtradb tables. Other tables cannot be backed up.
Innobackupex-perl scripts encapsulated in xtrabackup provide the myisam Table backup capability.
What can Xtrabackup do online (hot) backup of InnoDB of the entire database? The XtraDB table performs Incremental Backup (innodb only) on the basis of the last full database backup of xtrabackup ).
I. Installation Package
XtraBackup:
The source code package of version 0.8 is downloaded here.
Download the MySQL source code package:
Because XtraBackup is compiled and installed, the source code of MySQL must be used.
For 64-bit systems, you can directly download the compiled package:
Ii. Compilation and Installation
The test shows that XtraBackup compilation under mysql4.1 may fail. You can compile it using mysql5.0. The generated executable file is also applicable to mysql4.1.
You can also download the binary version XtraBackup of the corresponding platform to skip the compilation and installation steps. However, the binary version currently does not support many platforms, so the compilation steps are listed here.
# If MySQL5.1 is used, Directory change to/mysql-5.1. */storage/innobase/
Cd mysql-5.0.85/innobase # enter the source code directory
Patch-p2 <./xtrabackup-0.8-src/fix_innodb_for_backup.patch # patch InnoDB source code
# If MySQL5.1 is used, use fix_innodb_for_backup51.patch
Cd .. # Go To The Directory mysql-5.0.85
./Configure
Make # We only need Make, and do not need Make install
Cd innobase/xtrabackup-0.8-src
Make # compile XtraBackup; MySQL5.1 must use XtraBackup0.9
After the compilation is successful, we will obtain the executable files xtrabackup and innobackupex. For ease of use, copy them to a $ PATH. (Here I/u01/mysql/bin/is part of the $ PATH)
Cp xtrabackup/usr/local/bin/
Cp innobackupex-1.5.1/usr/local/bin/
This step is required otherwise an error is reported when running the innobackupex-1.5.1 and xtrabackup is not found.
Notes during installation:
To compile XtraBackup; MySQL5.1 must use XtraBackup0.9.
In addition, to compile with MySQL5.1, You need to modify the Makefile of XtraBackup:
# MySQL 5.0
# INC =-I.-I...-I./.../include-I./.../include
# INNODBOBJS =
# MySQL 5.1
INC = ......
MYSQLOBJS =
After the installation is complete, we can use the innobackupex command to back up our data.