xtrabackup安装及问题解决

1.官方网址:http://www.percona.com/downloads/

2.选择版本及系统

(1)注意版本不对可能安装失败

[root@localhost tools]#  rpm -ivh percona-xtrabackup-24-2.4.4-1.el6.x86_64.rpm 
警告:percona-xtrabackup-24-2.4.4-1.el6.x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID cd2efd2a: NOKEY
错误:依赖检测失败:
    libev.so.4()(64bit) 被 percona-xtrabackup-24-2.4.4-1.el6.x86_64 需要
    libgcrypt.so.11()(64bit) 被 percona-xtrabackup-24-2.4.4-1.el6.x86_64 需要
    libgcrypt.so.11(GCRYPT_1.2)(64bit) 被 percona-xtrabackup-24-2.4.4-1.el6.x86_64 需要

(2)注意本机的libgcrypt的安装的版本,下载的包要与其适配,否则会报如下错误

[root@localhost tools]#  xtrabackup --version
xtrabackup: error while loading shared libraries: libgcrypt.so.11: cannot open shared object file: No such file or directory

3.下载二进制包

[root@localhost tools]# rpm -qa |grep libgcrypt
libgcrypt-1.8.3-4.el8.x86_64

如本地安装了libgcrypt183,就下载下方的包

https://www.percona.com/downloads/Percona-XtraBackup-2.4/Percona-XtraBackup-2.4.14/binary/tarball/percona-xtrabackup-2.4.14-Linux-x86_64.libgcrypt183.tar.gz

4.解压并配置环境变量

(1) tar xf percona-xtrabackup-2.4.14-Linux-x86_64.libgcrypt183.tar.gz
(2) mv percona-xtrabackup-2.4.14-Linux-x86_64 /usr/local/xtrabackup
(3) echo "export PATH=$PATH:/usr/local/xtrabackup/bin" >> /etc/profile
(4) source /etc/profile

5.检测是否安装成功

[root@localhost tools]# xtrabackup --version
xtrabackup: recognized server arguments: --datadir=/data/mysql/data --server-id=6 --log_bin=/data/binlog/mysql-bin 
xtrabackup version 2.4.14 based on MySQL server 5.7.19 Linux (x86_64) (revision id: ef675d4)
 

你可能感兴趣的:(xtrabackup安装及问题解决)