xtrabackup-2.1.2-611下载链接:wget http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.2/binary/Linux/x86_64/perc
xtrabackup-2.1.2-611下载链接:
wget
安装编译所需的依赖包
yum install libaio libaio-devel perl-Time-HiRes curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel perl-ExtUtils-MakeMaker perl-DBD-MySQL.* package -y
tar xvf percona-xtrabackup-2.1.2-611.tar.gz
cd /percona-xtrabackup-2.1.2/bin/
[root@CcTalk-DB bin]# ll
total 112420
-rwxr-xr-x 1 root root 110729 May 18 08:00 innobackupex
lrwxrwxrwx 1 root root 12 Aug 23 13:25 innobackupex-1.5.1 -> innobackupex
-rwxr-xr-x 1 root root 2211237 May 18 08:00 xbcrypt
-rwxr-xr-x 1 root root 2285672 May 18 08:00 xbstream
-rwxr-xr-x 1 root root 13033745 May 18 08:00 xtrabackup
-rwxr-xr-x 1 root root 16333506 May 18 07:26 xtrabackup_55
-rwxr-xr-x 1 root root 80988093 May 18 07:44 xtrabackup_56
[root@CcTalk-DB bin]#
推荐阅读:
MySQL开源备份工具Xtrabackup备份部署
MySQL Xtrabackup备份和恢复
用XtraBackup实现MySQL的主从复制快速部署【主不锁表】
安装和使用 Percona 推出的 Xtrabackup 备份 MySQL
XtraBackup 的详细介绍:请点这里
XtraBackup 的下载地址:请点这里
3.将innobackupex、xtrabackup等文件copy到mysql程序目录下/bin、目录
cp * /usr/local/mysql/bin/
4.将mysql安装目录下的文件做软链接到/usr/bin/目录下。这个比变量方便,,这样就完成了部署安装!!!
ln -s /usr/local/mysql/bin/* /usr/bin/
5.验证:
执行如下命令按 tab 键能够自动关联补全为安装成功!
[root@slave1 ~]# innobackupex
innobackupex innobackupex-1.5.1
[root@slave1 ~]# xtrabackup
xtrabackup xtrabackup_55 xtrabackup_56
[root@CcTalk-DB bin]# 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".
--compact
Create a compact backup with all secondary index pages omitted. This
option is passed directly to xtrabackup. See xtrabackup
documentation for details.
--compress
This option instructs xtrabackup to compress backup copies of InnoDB
data files. It is passed directly to the xtrabackup child process.
Try 'xtrabackup --help' for more details.
--compress-threads
This option specifies the number of worker threads that will be used
for parallel compression. It is passed directly to the xtrabackup
child process. Try 'xtrabackup --help' for more details.
--compress-chunk-size
This option specifies the size of the internal working buffer for
each compression thread, measured in bytes. It is passed directly to
the xtrabackup child process. Try 'xtrabackup --help' for more
details.
--copy-back
Copy all the files in a previously made backup from the backup
directory to their original locations.
--databases=LIST
此选项指定 innobackupex 应
备份的数据库列表。该选项接受字符串参数或文件路径
包含要备份的数据库列表。该列表的格式为
“databasename1[.table_name1] databasename2[.table_name2] . . .”。如果
未指定此选项,则将备份所有包含 MyISAM 和
InnoDB 表的数据库。请确保 --databases
包含所有 InnoDB 数据库和表,以便所有
innodb.frm 文件也得到备份。如果列表很长,
可以在文件中指定,并且可以指定文件的完整路径
而不是列表。 (请参阅选项 --tables-file。)
--debug-sleep-before-unlock=SECONDS
这是 XtraBackup 测试套件使用的仅调试选项。
--defaults-file=[MY.CNF]
此选项指定从哪个文件读取默认 MySQL 选项
。该选项接受一个字符串参数。它还会直接传递
到 xtrabackup 的 --defaults-file 选项。有关详细信息,请参阅 xtrabackup
文档。