时间:2021-07-01 10:21:17 帮助过:37人阅读
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
This option specifies the list of databases that innobackupex should
back up. The option accepts a string argument or path to file that
contains the list of databases to back up. 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.)
--debug-sleep-before-unlock=SECONDS
This is a debug-only option used by the XtraBackup test suite.
--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.