RHEL4,5,6 / OL4,5,6 / CentOS4,5,6 / SLES10 / SLES11 / openSuSE is OK!
on RHEL / OL / CentOS
yum -y install gcc gcc-c++ autoconf perl libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel ssse2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gettext-devel libXpm-devel libtool
zypper install gcc gcc-c++ bison patch perl unzip mlocate flex wget automake autoconf gd cpp gettext readline-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel libidn libidn-devel openldap openldap-devel openldap-clients openldap-servers nss_ldap expat-devel libtool libtool-ltdl-devel bison libevent gpgme gpgme-devel
[root@test ~]# tar -zxvf xtrabackup-1.6.2.tar.gz [root@test ~]# cd xtrabackup-1.6.2 [root@test xtrabackup-1.6.2]# ls -l total 48124 -rw-r--r-- 1 500 500 658 Jul 19 2011 BUILD.txt -rw-r--r-- 1 500 500 19070 Jul 19 2011 COPYING drwxr-xr-x 2 500 500 4096 Jul 19 2011 doc -rwxr-xr-x 1 500 500 91220 Jul 19 2011 innobackupex lrwxrwxrwx 1 500 500 12 Jan 10 10:41 innobackupex-1.5.1 -> innobackupex -rw-r--r-- 1 500 500 145354 Jul 19 2011 libtar-1.2.11.tar.gz -rw-r--r-- 1 500 500 8023 Jul 19 2011 Makefile -rw-r--r-- 1 500 500 24795624 Jul 19 2011 mysql-5.1.56.tar.gz -rw-r--r-- 1 500 500 23877968 Jul 19 2011 mysql-5.5.10.tar.gz drwxr-xr-x 2 500 500 4096 Jul 19 2011 patches drwxr-xr-x 7 500 500 4096 Jul 19 2011 test drwxr-xr-x 4 500 500 4096 Jul 19 2011 utils -rw-r--r-- 1 500 500 25 Jul 19 2011 VERSION -rw-r--r-- 1 500 500 176155 Jul 19 2011 xtrabackup.c [root@test xtrabackup-1.6.2]# utils/build.sh Build an xtrabackup binary against the specified InnoDB flavor. Usage: build.sh CODEBASE where CODEBASE can be one of the following values or aliases: innodb51_builtin | 5.1 build against built-in InnoDB 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.5must specify MySQL version, I use is MySQL5.5 version
[root@test xtrabackup-1.6.2]# utils/build.sh innodb55
[root@test mysql]# ln -s /root/xtrabackup-1.6.2/innobackupex /service/mysql/bin/innobackupex [root@test mysql]# ln -s /root/xtrabackup-1.6.2/mysql-5.5/storage/innobase/xtrabackup/xtrabackup_innodb55 /service/mysql/bin/xtrabackup_55 [root@test mysql]# ls -l /service/mysql/bin/*back* lrwxrwxrwx 1 root root 35 Jan 10 14:29 /service/mysql/bin/innobackupex -> /root/xtrabackup-1.6.2/innobackupex lrwxrwxrwx 1 root root 80 Jan 10 14:31 /service/mysql/bin/xtrabackup_55 -> /root/xtrabackup-1.6.2/mysql-5.5/storage/innobase/xtrabackup/xtrabackup_innodb55
[root@test ~]# innobackupex --help Options: --apply-log Prepare a backup in BACKUP-DIR by applying the transaction log file named "xtrabackup_logfile" located in the same directory. Also, create new transaction logs. The InnoDB configuration is read from the file "backup-my.cnf". --copy-back Copy all the files in a previously made backup from the backup directory to their original locations. --databases=LIST This option specifies the list of databases that innobackupex should back up. The option accepts a string argument. The list is of the form "databasename1[.table_name1] databasename2[.table_name2] . . .". If this option is not specified, all databases containing MyISAM and InnoDB tables will be backed up. Please make sure that --databases contains all of the InnoDB databases and tables, so that all of the innodb.frm files are also backed up. In case the list is very long, this can be specified in a file, and the full path of the file can be specified instead of the list. (See option --tables-file.) --defaults-file=[MY.CNF] This option specifies what file to read the default MySQL options from. The option accepts a string argument. It is also passed directly to xtrabackup's --defaults-file option. See the xtrabackup documentation for details. --export This option is passed directly to xtrabackup's --export option. It enables exporting individual tables for import into another server. See the xtrabackup documentation for details. --extra-lsndir=DIRECTORY This option specifies the directory in which to save an extra copy of the "xtrabackup_checkpoints" file. The option accepts a string argument. It is passed directly to xtrabackup's --extra-lsndir option. See the xtrabackup documentation for details. --force-tar This option forces the use of tar when creating a streamed backup, rather than tar4ibd, which is the default. --help This option displays a help screen and exits. --host=HOST This option specifies the host to use when connecting to the database server with TCP/IP. The option accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. --ibbackup-binary=IBBACKUP-BINARY This option specifies which xtrabackup binary should be used. The option accepts a string argument. IBBACKUP-BINARY should be the command used to run XtraBackup. The option can be useful if the xtrabackup binary is not in your search path or working directory. If this option is not specified, innobackupex attempts to determine the binary to use automatically. By default, "xtrabackup" is the command used. However, when option --copy-back is specified, "xtrabackup_51" is the command used. And when option --apply-log is specified, the binary is used whose name is in the file "xtrabackup_binary" in the backup directory, if that file exists. --include=REGEXP This option is a regular expression to be matched against table names in databasename.tablename format. It is passed directly to xtrabackup's --tables option. See the xtrabackup documentation for details. --incremental This option tells xtrabackup to create an incremental backup, rather than a full one. It is passed to the xtrabackup child process. When this option is specified, either --incremental-lsn or --incremental-basedir can also be given. If neither option is given, option --incremental-basedir is passed to xtrabackup by default, set to the first timestamped backup directory in the backup base directory. --incremental-basedir=DIRECTORY This option specifies the directory containing the full backup that is the base dataset for the incremental backup. The option accepts a string argument. It is used with the --incremental option. --incremental-dir=DIRECTORY This option specifies the directory where the incremental backup will be combined with the full backup to make a new full backup. The option accepts a string argument. It is used with the --incremental option. --incremental-lsn This option specifies the log sequence number (LSN) to use for the incremental backup. The option accepts a string argument. It is used with the --incremental option. It is used instead of specifying --incremental-basedir. For databases created by MySQL and Percona Server 5.0-series versions, specify the LSN as two 32-bit integers in high:low format. For databases created in 5.1 and later, specify the LSN as a single 64-bit integer. --no-lock Use this option to disable table lock with "FLUSH TABLES WITH READ LOCK". Use it only if ALL your tables are InnoDB and you DO NOT CARE about the binary log position of the backup. --no-timestamp This option prevents creation of a time-stamped subdirectory of the BACKUP-ROOT-DIR given on the command line. When it is specified, the backup is done in BACKUP-ROOT-DIR instead. --parallel=NUMBER-OF-THREADS This option specifies the number of threads the xtrabackup child process should use to back up files concurrently. The option accepts an integer argument. It is passed directly to xtrabackup's --parallel option. See the xtrabackup documentation for details. --password=WORD This option specifies the password to use when connecting to the database. It accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. --port=PORT This option specifies the port to use when connecting to the database server with TCP/IP. The option accepts a string argument. It is passed to the mysql child process. It is passed to the mysql child process without alteration. See mysql --help for details. --redo-only This option is passed directly to xtrabackup's --apply-log-only option. This forces xtrabackup to skip the "rollback" phase and do a "redo" only. This is necessary if the backup will have incremental changes applied to it later. See the xtrabackup documentation for details. --remote-host=HOSTNAME This option specifies the remote host on which the backup files will be created, by using an ssh connection. The option accepts a string argument. --safe-slave-backup Stop slave SQL thread and wait to start backup until Slave_open_temp_tables in "SHOW STATUS" is zero. If there are no open temporary tables, the backup will take place, otherwise the SQL thread will be started and stopped until there are no open temporary tables. The backup will fail if Slave_open_temp_tables does not become zero after --safe-slave-backup-timeout seconds. The slave SQL thread will be restarted when the backup finishes. --safe-slave-backup-timeout How many seconds --safe-slave-backup should wait for Slave_open_temp_tables to become zero. (default 300) --scpopt=SCP-OPTIONS This option specifies the command line options to pass to scp when the option --remost-host is specified. The option accepts a string argument. If the option is not specified, the default options are "-Cp -c arcfour". --slave-info This option is useful when backing up a replication slave server. It prints the binary log position and name of the master server. It also writes this information to the "xtrabackup_slave_info" file as a "CHANGE MASTER" command. A new slave for this master can be set up by starting a slave server on this backup and issuing a "CHANGE MASTER" command with the binary log position saved in the "xtrabackup_slave_info" file. --socket=SOCKET This option specifies the socket to use when connecting to the local database server with a UNIX domain socket. The option accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. --stream=[tar|. . .] This option specifies the format in which to do the streamed backup. The option accepts a string argument. The backup will be done to STDOUT in the specified format. Currently, the only supported format is tar. Uses tar4ibd, which is available in XtraBackup distributions. --tables-file=FILE This option specifies the file in which there are a list of names of the form database. The option accepts a string argument.table, one per line. The option is passed directly to xtrabackup's --tables-file option. --throttle=IOS This option specifies a number of I/O operations (pairs of read+write) per second. It accepts an integer argument. It is passed directly to xtrabackup's --throttle option. --tmpdir=DIRECTORY This option specifies the location where a temporary file will be stored. The option accepts a string argument. It should be used when --remote-host or --stream is specified. For these options, the transaction log will first be stored to a temporary file, before streaming or copying to a remote host. This option specifies the location where that temporary file will be stored. If the option is not specifed, the default is to use the value of tmpdir read from the server configuration. --use-memory=MB This option specifies the amount of memory in megabytes for xtrabackup to use for crash recovery while preparing a backup. The option accepts a string argument. It is used only with the option --apply-log. It is passed directly to xtrabackup's --use-memory option. See the xtrabackup documentation for details. --user=NAME This option specifies the MySQL username used when connecting to the server, if that's not the current user. The option accepts a string argument. It is passed to the mysql child process without alteration. See mysql --help for details. --version This option displays the xtrabackup version and copyright notice and then exits.