「XtraBackup」- 安装及说明

更新日期:2020年03月13日 @FINISHED

版本选择

虽然我们没有找到正式的说明,但是通过 About Percona XtraBackup 左侧的 Percona XtraBackup Series 菜单可以看出来版本号存在跳跃,所以我们猜测官方可能想与 MySQL 的主版本保持同步。

根据官方「About Percona XtraBackup」页面说明:

With the introduction of Percona XtraBackup 8.0, Percona XtraBackup 2.4 will continue to support MySQL and Percona Server 5.6 and 5.7 databases. Due to the new MySQL redo log and data dictionary formats the Percona XtraBackup 8.0.x versions will only be compatible with MySQL 8.0.x and the upcoming Percona Server for MySQL 8.0.x

由于我们使用 MySQL 5.7 数据库,所以我们选择 Percona XtraBackup 2.4 版本。

CentOS release 6.5 (Final) and Percona XtraBackup 2.4

# 03/12/2020 # Installing Percona XtraBackup on Red Hat Enterprise Linux and CentOS

#!/bin/sh

yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

yum install percona-xtrabackup-24

Debian GNU/Linux 8.2 (jessie) and Percona XtraBackup 2.4

# 03/12/2020 # Installing Percona XtraBackup on Debian and Ubuntu

#!/bin/sh

cd /tmp
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb # /etc/apt/sources.list.d/percona-release.list

apt-get update
apt-get install percona-xtrabackup-24

Kali GNU/Linux Rolling and Installing from Source Code

# 03/12/2020 # Compiling and Installing from Source Code mysql-cluster-gpl-7.6.13/cmake/install_layout.cmake What is CMake equivalent of 'configure --prefix=DIR && make all install '?

#!/bin/sh

################################################################################
# 安装依赖
################################################################################
apt-get install build-essential flex bison automake autoconf \
   libtool cmake libaio-dev libncurses-dev zlib1g-dev \
   libev-dev libcurl4-gnutls-dev vim-common

# 官方使用 libgcrypt11-dev 包,根据自己需要调整
# 编译能否通过,以及编译之后能否正常使用,“就要看你的运气了”
apt-get install libgcrypt20-dev  

# 官方使用 mysql-client 包,而我使用 MariaDB,因此无需安装

################################################################################
# 检出仓库,并编译安装
################################################################################
git clone https://github.com/percona/percona-xtrabackup.git # 03/12/2020 2.46 GiB
cd percona-xtrabackup
git checkout 2.4

# cmake -DBUILD_CONFIG=xtrabackup_release -DWITH_MAN_PAGES=OFF && make -j4
# 依据我们的情况进行调整
ALL_PROXY="socks5://127.0.0.1:1080" cmake -DBUILD_CONFIG=xtrabackup_release \
    -DWITH_MAN_PAGES=OFF \
    -DCMAKE_INSTALL_PREFIX:PATH=/opt/xtrabackup/xtrabackup-2.4 \
    -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/opt/xtrabackup/boost/

make -j2 && make install

相关文件

# repoquery -l percona-xtrabackup-24
/usr/bin/innobackupex # 指向 xtrabackup 的软链接,未来将会废弃,建议使用 xtrabackup 命令
/usr/bin/xbcloud
/usr/bin/xbcloud_osenv
/usr/bin/xbcrypt
/usr/bin/xbstream
/usr/bin/xtrabackup
/usr/lib64/xtrabackup/plugin/keyring_file.so
/usr/lib64/xtrabackup/plugin/keyring_vault.so
/usr/share/doc/percona-xtrabackup-24-2.4.18
/usr/share/doc/percona-xtrabackup-24-2.4.18/COPYING
/usr/share/man/man1/innobackupex.1.gz
/usr/share/man/man1/xbcrypt.1.gz
/usr/share/man/man1/xbstream.1.gz
/usr/share/man/man1/xtrabackup.1.gz

附加说明

如何安装是个人的自由,但是我们仍然建议有仓库绝对优先使用仓库安装。

相关文档

Percona XtraBackup User Manual



Backlinks: 00.INDEX

ToC

版本选择

CentOS release 6.5 (Final) and Percona XtraBackup 2.4

Debian GNU/Linux 8.2 (jessie) and Percona XtraBackup 2.4

Kali GNU/Linux Rolling and Installing from Source Code

相关文件

附加说明

相关文档