阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Percona XtraBackup 安装介绍篇

175次阅读
没有评论

共计 38289 个字符,预计需要花费 96 分钟才能阅读完成。

XtraBackup 介绍

XtraBackup 是 Percona 公司的开源项目,用以实现类似 Innodb 官方的热备份工具 InnoDB Hot Backup 的功能,它支持在线热备份(备份时不影响数据读写)。到目前为止,最新的版本为 Percona XtraBackup 2.4.7.

XtraBackup 有很多功能和优点:例如支持全备、增量备份、部分备份;支持压缩备份;备份不影响数据读写、事务等,但是也有缺陷不足:例如不支持脱机备份、不支持直接备份到磁带设备、不支持 Cloud Back,MyISAM 的备份也会阻塞。不过这些小瑕疵不影响 XtraBackup 成为一款流行的 MySQL 备份工具。另外,请注意 XtraBackup 只支持 Linux 平台,不支持 Windows 平台。

下面是 XtraBackup 的官方文档的介绍资料:

Percona XtraBackup is the worlds only open-source, free MySQL hot backup software that performs non-blocking

backups for InnoDB and XtraDB databases. With Percona XtraBackup, you can achieve the following benefits:

• Backups that complete quickly and reliably

• Uninterrupted transaction processing during backups

• Savings on disk space and network bandwidth

• Automatic backup verification

• Higher uptime due to faster restore time

Percona XtraBackup makes MySQL hot backups for all versions of Percona Server, MySQL, and MariaDB. It performs

streaming, compressed, and incremental MySQL backups.

Percona XtraBackup works with MySQL, MariaDB, and Percona Server. It supports completely non-blocking backups

of InnoDB, XtraDB, and HailDB storage engines. In addition, it can back up the following storage engines by briefly

pausing writes at the end of the backup: MyISAM, Merge, and Archive, including partitioned tables, triggers, and

database options.

Percona  XtraBackup的特征:

 

Features

Percona  XtraBackup

License

GPL

Pirce

Free

Streaming and encryption formats

Open source

Supported MySQL flavors

MySQL, Percona Server, MariaDB, Percona XtraDB Cluster, MariaDB Supported

Supported operating systems

Linux

Non-blocking InnoDB backups

Yes

Blocking MyISAM backups

Yes

Incremental backups

Yes

Full compressed backups

Yes

Incremental compressed backups

Yes

Fast incremental backups

Yes

Incremental backups with archived logs feature in Percona Server

Yes

Incremental backups with REDO log only

 

Backup locks

Yes

Encrypted backups

Yes

Streaming backups

Yes

Parallel local backups

Yes

Parallel compression

Yes

Parallel encryption

Yes

Parallel apply-log

Yes

Parallel copy-back

 

Partial backups

Yes

Partial backups of individual partitions

Yes

Throttling

Yes

Backup image validation

 

Point-in-time recovery support

Yes

Safe slave backups

Yes

Compact backups

Yes

Buffer pool state backups

Yes

Individual tables export

Yes

Individual partitions export

Yes

Restoring tables to a different server

Yes

Data & index file statistics

Yes

InnoDB secondary indexes defragmentation

Yes

rsync support to minimize lock time

Yes

Improved FTWRL handlin

Yes

Backup history table

 

Backup progress table

 

Backup to tape media managers

 

Cloud backups support

 

External graphical user interfaces to backup/recovery Zmanda Recovery

Zmanda Recovery Manager for MySQL

 

XtraBackup 下载

 

XtraBackup 可以从官方链接 https://www.percona.com/downloads/XtraBackup/LATEST/ 下载你需要的稳定版本。到目前为止,XtraBackup 最新的版本为 Percona-XtraBackup-2.4.7。这个链接也提供 Percona XtraBackup Documentation 相关文档下载。下载的时候,注意版本与平台信息。

  Percona XtraBackup 的源码放在 Github 上,地址为https://github.com/percona/percona-xtrabackup.git

  Percona XtraBackup 的文档地址:

        https://www.percona.com/doc/percona-xtrabackup/2.2/index.html

        https://www.percona.com/doc/percona-xtrabackup/2.3/index.html

        https://www.percona.com/doc/percona-xtrabackup/2.4/index.html

 

XtraBackup 安装 

Percona XtraBackup 的安装方式总体来说有下面三种,我们下面简单的介绍一下。然后都具体都练练手。

Installing Percona XtraBackup from Repositories (recommended)

Installing Percona XtraBackup from Downloaded rpm or apt Packages

Compiling and Installing from Source Code 

1:Installing Percona XtraBackup from Repositories  

Installing Percona XtraBackup on Red Hat Enterprise Linux and CentOS 

下面我测试的环境为 CentOS Linux release 7.2.1511 (Core),安装 Percona XtraBackup 2.4 为例:

步骤 1:Install the Percona repository

[test@mylnx06 ~]$ sudo yum install https://www.percona.com/downloads/percona-release/RedHat/latest/percona-release-0.1-4.noarch.rpm
[sudo] password for test:
/usr/local/bin/aad-login failed: exit code 1
Loaded plugins: fastestmirror, langpacks
percona-release-0.1-4.noarch.rpm                         | 6.4 kB     00:00   
Examining /var/tmp/yum-root-02R3Gm/percona-release-0.1-4.noarch.rpm: percona-release-0.1-4.noarch
Marking /var/tmp/yum-root-02R3Gm/percona-release-0.1-4.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package percona-release.noarch 0:0.1-4 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package            Arch      Version    Repository                        Size
================================================================================
Installing:
percona-release    noarch    0.1-4      /percona-release-0.1-4.noarch    5.8 k
Transaction Summary
================================================================================
Install  1 Package
Total size: 5.8 k
Installed size: 5.8 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : percona-release-0.1-4.noarch                                 1/1
  Verifying  : percona-release-0.1-4.noarch                                 1/1
Installed:
  percona-release.noarch 0:0.1-4                                               
Complete!

RHEL/Centos 5 不支持从远程位置直接安装软件包,因此您需要首先下载软件包,然后用 rpm 手动安装

$ wget http://www.percona.com/downloads/percona-release/redhat/0.1-4/\
percona-release-0.1-4.noarch.rpm
$ rpm -ivh percona-release-0.1-4.noarch.rpm

安装完成后,你就能在 /etc/yum.repos.d 下看到一个 percona-release.repo 文件。

步骤 2:测试 Repository, 确保 Percona XtraBackup 相关包已经在 Repository 中。

[test@mylnx06 ~]$ yum list | grep percona-xtrabackup
percona-xtrabackup-24.x86_64               2.4.7-2.el7                 @percona-release-x86_64
percona-xtrabackup.x86_64                  2.3.8-1.el7                 percona-release-x86_64
percona-xtrabackup-22.x86_64               2.2.13-1.el7                percona-release-x86_64
percona-xtrabackup-22-debuginfo.x86_64     2.2.13-1.el7                percona-release-x86_64
percona-xtrabackup-24-debuginfo.x86_64     2.4.7-2.el7                 percona-release-x86_64
percona-xtrabackup-debuginfo.x86_64        2.3.8-1.el7                 percona-release-x86_64
percona-xtrabackup-test.x86_64             2.3.8-1.el7                 percona-release-x86_64
percona-xtrabackup-test-22.x86_64          2.2.13-1.el7                percona-release-x86_64
percona-xtrabackup-test-24.x86_64          2.4.7-2.el7                 percona-release-x86_64

步骤 3:安装 Percona XtraBackup 包。

[test@mylnx06 ~]$ yum install percona-xtrabackup-24
[root@GETAZDEVLNX005 ~]#yum install percona-xtrabackup-24
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package percona-xtrabackup-24.x86_64 0:2.4.7-2.el7 will be installed
--> Processing Dependency: perl(DBD::mysql) for package: percona-xtrabackup-24-2.4.7-2.el7.x86_64
--> Processing Dependency: perl(Digest::MD5) for package: percona-xtrabackup-24-2.4.7-2.el7.x86_64
--> Processing Dependency: libev.so.4()(64bit) for package: percona-xtrabackup-24-2.4.7-2.el7.x86_64
--> Running transaction check
---> Package libev.x86_64 0:4.15-6.el7 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed
---> Package perl-Digest-MD5.x86_64 0:2.52-3.el7 will be installed
--> Processing Dependency: perl(Digest::base) >= 1.00 for package: perl-Digest-MD5-2.52-3.el7.x86_64
--> Running transaction check
---> Package perl-Digest.noarch 0:1.17-245.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================
Package                         Arch        Version        Repository                Size
===========================================================================================
Installing:
percona-xtrabackup-24           x86_64      2.4.7-2.el7    percona-release-x86_64   7.4 M
Installing for dependencies:
libev                           x86_64      4.15-6.el7     extras                    44 k
perl-DBD-MySQL                  x86_64      4.023-5.el7    base                     140 k
perl-Digest                     noarch      1.17-245.el7   base                      23 k
perl-Digest-MD5                 x86_64      2.52-3.el7     base                      30 k
Transaction Summary
===========================================================================================
Install  1 Package (+4 Dependent packages)
Total download size: 7.6 M
Installed size: 31 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): libev-4.15-6.el7.x86_64.rpm                                   |  44 kB  00:00:00   
(2/5): perl-Digest-1.17-245.el7.noarch.rpm                           |  23 kB  00:00:00   
(3/5): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm                         | 140 kB  00:00:00   
(4/5): perl-Digest-MD5-2.52-3.el7.x86_64.rpm                         |  30 kB  00:00:00   
warning: /var/cache/yum/x86_64/7/percona-release-x86_64/packages/percona-xtrabackup-24-2.4.7-2.el7.x86_64.rpm:
Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY=============    -  ] 1.1 MB/s | 6.0 MB  00:00:01 ETA
Public key for percona-xtrabackup-24-2.4.7-2.el7.x86_64.rpm is not installed
(5/5): percona-xtrabackup-24-2.4.7-2.el7.x86_64.rpm                  | 7.4 MB  00:00:04   
------------------------------------------------------- 
Total                                                       1.9 MB/s | 7.6 MB  00:00:04   
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
Importing GPG key 0xCD2EFD2A:
Userid     : "Percona MySQL Development Team <mysql-dev@percona.com>"
Fingerprint: 430b df5c 56e7 c94e 848e e60c 1c4c bdcd cd2e fd2a
Package    : percona-release-0.1-4.noarch (@/percona-release-0.1-4.noarch)
From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libev-4.15-6.el7.x86_64                                                         1/5
  Installing : perl-DBD-MySQL-4.023-5.el7.x86_64                                               2/5
  Installing : perl-Digest-1.17-245.el7.noarch                                                 3/5
  Installing : perl-Digest-MD5-2.52-3.el7.x86_64                                               4/5
  Installing : percona-xtrabackup-24-2.4.7-2.el7.x86_64                                        5/5
  Verifying  : percona-xtrabackup-24-2.4.7-2.el7.x86_64                                        1/5
  Verifying  : perl-Digest-1.17-245.el7.noarch                                                 2/5
  Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                                               3/5
  Verifying  : perl-Digest-MD5-2.52-3.el7.x86_64                                               4/5
  Verifying  : libev-4.15-6.el7.x86_64                                                         5/5
Installed:
  percona-xtrabackup-24.x86_64 0:2.4.7-2.el7                                                                                                                                                                                                                   
Dependency Installed:
  libev.x86_64 0:4.15-6.el7                             
  perl-DBD-MySQL.x86_64 0:4.023-5.el7                             
  perl-Digest.noarch 0:1.17-245.el7                             
  perl-Digest-MD5.x86_64 0:2.52-3.el7                             
Complete!

Installing Percona XtraBackup from Percona apt repository 

下面我测试的环境为 Ubuntu 16.04.1 LTS,安装 Percona XtraBackup 2.4 为例:

1:从 Percona 官方网址获取 repository packages:

mylnx02@mylnx02:~$  wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb

–2017-02-28 11:57:52–  https://repo.percona.com/apt/percona-release_0.1-4.xenial_all.deb

Resolving repo.percona.com (repo.percona.com)… 74.121.199.234

Connecting to repo.percona.com (repo.percona.com)|74.121.199.234|:443… connected.

HTTP request sent, awaiting response… 200 OK

Length: 6394 (6.2K) [application/octet-stream]

Saving to: percona-release_0.1-4.xenial_all.deb

percona-release_0.1-4.xenial_all.deb        100%[==================>]  6.24K  –.-KB/s    in 0s     

2017-02-28 11:57:53 (157 MB/s) – percona-release_0.1-4.xenial_all.deb saved [6394/6394]

2:用 dpkg 安装下载的 package 包文件

 

mylnx02@mylnx02:~$ sudo dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb

Selecting previously unselected package percona-release.

(Reading database … 76835 files and directories currently installed.)

Preparing to unpack percona-release_0.1-4.xenial_all.deb …

Unpacking percona-release (0.1-4.xenial) …

Setting up percona-release (0.1-4.xenial) …

mylnx02@azrlnx02:~$

3:update the local cache

mylnx02@mylnx02:~$ sudo apt-get update

Hit:1 http://azure.archive.ubuntu.com/ubuntu xenial InRelease

Get:2 http://azure.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]

Get:3 http://azure.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]

Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease             

Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]   

Get:6 http://repo.percona.com/apt xenial InRelease [15.9 kB]                 

Get:7 http://repo.percona.com/apt xenial/main Sources [5,387 B]               

Get:8 http://repo.percona.com/apt xenial/main amd64 Packages [19.1 kB] 

Fetched 347 kB in 1s (212 kB/s)   

Reading package lists… Done

N: Ignoring file ’50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension

mylnx02@azrlnx02:~$

4:安装 Percona XtraBackup 包 percona-xtrabackup-24

 

mylnx02@mylnx02:~$ sudo apt-get install percona-xtrabackup-24
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following additional packages will be installed:
  libdbd-mysql-perl libdbi-perl libev4 libmysqlclient20
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libev4 libmysqlclient20 percona-xtrabackup-24
0 upgraded, 5 newly installed, 0 to remove and 72 not upgraded.
Need to get 6,063 kB/7,699 kB of archives.
After this operation, 39.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://azure.archive.ubuntu.com/ubuntu xenial/universe amd64 libev4 amd64 1:4.22-1 [26.3 kB]
Get:2 http://repo.percona.com/apt xenial/main amd64 percona-xtrabackup-24 amd64 2.4.6-1.xenial [6,037 kB]
Fetched 6,063 kB in 3s (1,909 kB/s)                 
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
Selecting previously unselected package libdbi-perl.
(Reading database ... 76841 files and directories currently installed.)
Preparing to unpack .../libdbi-perl_1.634-1build1_amd64.deb ...
Unpacking libdbi-perl (1.634-1build1) ...
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack .../libmysqlclient20_5.7.17-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.17-0ubuntu0.16.04.1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.033-1ubuntu0.1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Selecting previously unselected package libev4.
Preparing to unpack .../libev4_1%3a4.22-1_amd64.deb ...
Unpacking libev4 (1:4.22-1) ...
Selecting previously unselected package percona-xtrabackup-24.
Preparing to unpack .../percona-xtrabackup-24_2.4.6-1.xenial_amd64.deb ...
Unpacking percona-xtrabackup-24 (2.4.6-1.xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Setting up libdbi-perl (1.634-1build1) ...
Setting up libmysqlclient20:amd64 (5.7.17-0ubuntu0.16.04.1) ...
Setting up libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Setting up libev4 (1:4.22-1) ...
Setting up percona-xtrabackup-24 (2.4.6-1.xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
mylnx02@mylnx02:~$  innobackupex -v
innobackupex version 2.4.6 Linux (x86_64) (revision id: 54967d1)

2:Installing Percona XtraBackup from Downloaded rpm or apt Packages

1:使用 yum localinstall package 从本机目录安装软件包

[root@mylnx13 ~]#wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.4/\
> binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.4-1.el7.x86_64.rpm
[root@mylnx13 ~]#yum localinstall percona-xtrabackup-24-2.4.4-1.el7.x86_64.rpm

2:原始的 rpm 安装方式

 这里测试环境,下载的是 Percona-XtraBackup-2.2.12-r8726828-el5-x86_64-bundle.tar 安装包。在安装之前最好安装一些其他额外组件,例如 perl-DBD-MySQL 等。否则你会遇到一些杂七杂八的问题。例如

perl(DBD::mysql) is needed by percona-xtrabackup-2.2.12-1.el5.x86_64

[root@DB-Server tmp]# rpm -ivh percona-xtrabackup-2.2.12-1.el5.x86_64.rpm

warning: percona-xtrabackup-2.2.12-1.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a

error: Failed dependencies:

        perl(DBD::mysql) is needed by percona-xtrabackup-2.2.12-1.el5.x86_64

[root@DB-Server ~]# yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr \
                    bison libtool ncurses5-devel
[root@DB-Server ~]# yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL

 

[root@MySQLDB005 tmp]# tar -xf Percona-XtraBackup-2.2.12-r8726828-el5-x86_64-bundle.tar
[root@MySQLDB005 tmp]# rpm -ivh percona-xtrabackup-2.2.12-1.el5.x86_64.rpm
warning: percona-xtrabackup-2.2.12-1.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a
Preparing...                ########################################### [100%]
   1:percona-xtrabackup     ########################################### [100%]
[root@MySQLDB005 tmp]#  

更多详情见请继续阅读下一页的精彩内容:http://www.linuxidc.com/Linux/2017-07/145638p2.htm

3:Compiling and Installing from Source Code

Percona Xtrabackup 的源码位于 github 上,URL 链接为 https://github.com/percona/percona-xtrabackup 你可以下载,也可以使用 git 命令下载源码。源码安装的具体过程如下所示:

1:如果没有安装 git,则需先安装 git 包

[root@mylnx005 ~]# sudo yum install git

2:使用 git clone 获取相关源码

# git clone https://github.com/percona/percona-xtrabackup.git

Percona XtraBackup 安装介绍篇

# cd percona-xtrabackup/

# git checkout 2.4

3:安装相关依赖包

# yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf \

bison libtool ncurses-devel libgcrypt-devel libev-devel libcurl-devel \

vim-common

# cmake -DBUILD_CONFIG=xtrabackup_release -DWITH_MAN_PAGES=OFF && make –j4

Percona XtraBackup 安装介绍篇

如上所示,在使用 cmake 编译时,遇到了错误,可以用如下方法解决。

# mkdir -p /usr/local/boost

# cd /usr/local/boost

# wget http://www.sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz

# tar -xvzf boost_1_59_0.tar.gz

# rm boost_1_59_0.tar.gz

继续编译,增加参数(红色部分)

#cmake -DBUILD_CONFIG=xtrabackup_release \

          -DWITH_MAN_PAGES=OFF \

          -DWITH_BOOST=/usr/local/boost \

          && make -j4

Percona XtraBackup 安装介绍篇

# make install

# /usr/local/xtrabackup/bin/innobackupex –version

innobackupex version 2.4.7 Linux (x86_64) (revision id: 5b42862)

XtraBackup 卸载

 Xtrabackup 的卸载相对来说比较简单,这里从简的介绍一下。

1:apt packages 安装方式的卸载

root@mylnx02:~# sudo apt-get remove percona-xtrabackup-24

Reading package lists… Done

Building dependency tree     

Reading state information… Done

The following packages were automatically installed and are no longer required:

  libdbd-mysql-perl libdbi-perl libev4 libmysqlclient20

Use ‘sudo apt autoremove’ to remove them.

The following packages will be REMOVED:

  percona-xtrabackup-24

0 upgraded, 0 newly installed, 1 to remove and 75 not upgraded.

After this operation, 32.1 MB disk space will be freed.

Do you want to continue? [Y/n] y

(Reading database … 77053 files and directories currently installed.)

Removing percona-xtrabackup-24 (2.4.6-1.xenial) …

Processing triggers for man-db (2.7.5-1) …

N: Ignoring file ’50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension

2:YUM 安装方式的卸载

[root@mylnx13 ~]#yum list | grep percona

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository CentOSplus is listed more than once in the configuration

Repository contrib is listed more than once in the configuration

percona-xtrabackup.x86_64                  2.2.12-1.el6                installed

percona-xtrabackup-debuginfo.x86_64        2.2.12-1.el6                installed

[root@mylnx13 ~]#

[root@mylnx13 ~]#yum remove percona-xtrabackup
Loaded plugins: fastestmirror, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package percona-xtrabackup.x86_64 0:2.2.12-1.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package               Arch          Version          Repository             Size
===================================================================================
Removing:
percona-xtrabackup    x86_64        2.2.12-1.el6       installed             18 M
Transaction Summary
====================================================================================
Remove        1 Package(s)
Installed size: 18 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
  Erasing    : percona-xtrabackup-2.2.12-1.el6.x86_64                       1/1
Loading mirror speeds from cached hostfile
  Verifying  : percona-xtrabackup-2.2.12-1.el6.x86_64                       1/1
Removed:
  percona-xtrabackup.x86_64 0:2.2.12-1.el6                                     
Complete!
[root@mylnx13 ~]#
[root@mylnx13 ~]#yum remove percona-xtrabackup-debuginfo.x86_64 
Loaded plugins: fastestmirror, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package percona-xtrabackup-debuginfo.x86_64 0:2.2.12-1.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package                         Arch      Version           Repository    Size
================================================================================
Removing:
percona-xtrabackup-debuginfo    x86_64    2.2.12-1.el6      installed     96 M
Transaction Summary
================================================================================
Remove        1 Package(s)
Installed size: 96 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
  Erasing    : percona-xtrabackup-debuginfo-2.2.12-1.el6.x86_64             1/1
Loading mirror speeds from cached hostfile
  Verifying  : percona-xtrabackup-debuginfo-2.2.12-1.el6.x86_64             1/1
Removed:
  percona-xtrabackup-debuginfo.x86_64 0:2.2.12-1.el6                           
Complete!

操作系统:CentOS Linux release 7.2.1511 (Core)

[root@GETAZDEVLNX005 ~]#yum list installed | grep percona
percona-release.noarch           0.1-4                          @/percona-release-0.1-4.noarch
percona-xtrabackup-24.x86_64     2.4.7-2.el7                    @percona-release-x86_64
[root@GETAZDEVLNX005 ~]#yum remove percona-xtrabackup
Loaded plugins: fastestmirror, langpacks
No Match for argument: percona-xtrabackup
No Packages marked for removal
[root@GETAZDEVLNX005 ~]#yum remove percona-xtrabackup-24
[root@GETAZDEVLNX005 ~]#yum list installed | grep percona
percona-release.noarch           0.1-4                          @/percona-release-0.1-4.noarch
[root@GETAZDEVLNX005 ~]#

3:rpm 安装方式的卸载

[root@DB-Server ~]# rpm -qa | grep percona

percona-xtrabackup-24-2.4.5-1.el7.x86_64

[root@DB-Server ~]# rpm -ev percona-xtrabackup-24-2.4.5-1.el7.x86_64

4:Source Code 安装方式的卸载

[root@mylnx005 ~]# ls -lrt /usr/local/xtrabackup/
total 8
drwxr-xr-x.  2 root root 4096 Jun  2 03:04 bin
drwxr-xr-x. 14 root root 4096 Jun  2 03:06 xtrabackup-test
[root@mylnx005 ~]# whereis xtrabackup
xtrabackup: /usr/local/xtrabackup
[root@mylnx005 ~]# rm -rf /usr/local/xtrabackup/
[root@mylnx005 ~]# whereis xtrabackup

Percona XtraBackup 的安装、卸载、以及介绍篇就写到这,如果需要了解更多细节,建议参考官方文档,例如 Percona-XtraBackup-2.4.6.pdf,后续将展开介绍 XtraBackup 备份还原篇、原理分析篇。

更多 XtraBackup 相关教程见以下内容

MySQL 管理之使用 XtraBackup 进行热备 http://www.linuxidc.com/Linux/2014-04/99671.htm

使用 Xtrabackup 进行 MySQL 备份  http://www.linuxidc.com/Linux/2016-11/137734.htm

MySQL 开源备份工具 Xtrabackup 备份部署 http://www.linuxidc.com/Linux/2013-06/85627.htm

MySQL Xtrabackup 备份和恢复 http://www.linuxidc.com/Linux/2011-12/50275.htm

Percona Xtrabackup 安装  http://www.linuxidc.com/Linux/2016-11/137735.htm

使用 XtraBackup 备份 MySQL 数据库  http://www.linuxidc.com/Linux/2016-12/138688.htm

使用 Xtrabackup 进行 MySQL 数据库全备和全备还原  http://www.linuxidc.com/Linux/2016-11/137736.htm

XtraBackup 备份原理和实战详解  http://www.linuxidc.com/Linux/2017-04/142477.htm

Percona XtraBackup 实现全备 & 增量备份与恢复  http://www.linuxidc.com/Linux/2017-03/142380.htm

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-07/145638.htm

XtraBackup 介绍

XtraBackup 是 Percona 公司的开源项目,用以实现类似 Innodb 官方的热备份工具 InnoDB Hot Backup 的功能,它支持在线热备份(备份时不影响数据读写)。到目前为止,最新的版本为 Percona XtraBackup 2.4.7.

XtraBackup 有很多功能和优点:例如支持全备、增量备份、部分备份;支持压缩备份;备份不影响数据读写、事务等,但是也有缺陷不足:例如不支持脱机备份、不支持直接备份到磁带设备、不支持 Cloud Back,MyISAM 的备份也会阻塞。不过这些小瑕疵不影响 XtraBackup 成为一款流行的 MySQL 备份工具。另外,请注意 XtraBackup 只支持 Linux 平台,不支持 Windows 平台。

下面是 XtraBackup 的官方文档的介绍资料:

Percona XtraBackup is the worlds only open-source, free MySQL hot backup software that performs non-blocking

backups for InnoDB and XtraDB databases. With Percona XtraBackup, you can achieve the following benefits:

• Backups that complete quickly and reliably

• Uninterrupted transaction processing during backups

• Savings on disk space and network bandwidth

• Automatic backup verification

• Higher uptime due to faster restore time

Percona XtraBackup makes MySQL hot backups for all versions of Percona Server, MySQL, and MariaDB. It performs

streaming, compressed, and incremental MySQL backups.

Percona XtraBackup works with MySQL, MariaDB, and Percona Server. It supports completely non-blocking backups

of InnoDB, XtraDB, and HailDB storage engines. In addition, it can back up the following storage engines by briefly

pausing writes at the end of the backup: MyISAM, Merge, and Archive, including partitioned tables, triggers, and

database options.

Percona  XtraBackup的特征:

 

Features

Percona  XtraBackup

License

GPL

Pirce

Free

Streaming and encryption formats

Open source

Supported MySQL flavors

MySQL, Percona Server, MariaDB, Percona XtraDB Cluster, MariaDB Supported

Supported operating systems

Linux

Non-blocking InnoDB backups

Yes

Blocking MyISAM backups

Yes

Incremental backups

Yes

Full compressed backups

Yes

Incremental compressed backups

Yes

Fast incremental backups

Yes

Incremental backups with archived logs feature in Percona Server

Yes

Incremental backups with REDO log only

 

Backup locks

Yes

Encrypted backups

Yes

Streaming backups

Yes

Parallel local backups

Yes

Parallel compression

Yes

Parallel encryption

Yes

Parallel apply-log

Yes

Parallel copy-back

 

Partial backups

Yes

Partial backups of individual partitions

Yes

Throttling

Yes

Backup image validation

 

Point-in-time recovery support

Yes

Safe slave backups

Yes

Compact backups

Yes

Buffer pool state backups

Yes

Individual tables export

Yes

Individual partitions export

Yes

Restoring tables to a different server

Yes

Data & index file statistics

Yes

InnoDB secondary indexes defragmentation

Yes

rsync support to minimize lock time

Yes

Improved FTWRL handlin

Yes

Backup history table

 

Backup progress table

 

Backup to tape media managers

 

Cloud backups support

 

External graphical user interfaces to backup/recovery Zmanda Recovery

Zmanda Recovery Manager for MySQL

 

XtraBackup 下载

 

XtraBackup 可以从官方链接 https://www.percona.com/downloads/XtraBackup/LATEST/ 下载你需要的稳定版本。到目前为止,XtraBackup 最新的版本为 Percona-XtraBackup-2.4.7。这个链接也提供 Percona XtraBackup Documentation 相关文档下载。下载的时候,注意版本与平台信息。

  Percona XtraBackup 的源码放在 Github 上,地址为https://github.com/percona/percona-xtrabackup.git

  Percona XtraBackup 的文档地址:

        https://www.percona.com/doc/percona-xtrabackup/2.2/index.html

        https://www.percona.com/doc/percona-xtrabackup/2.3/index.html

        https://www.percona.com/doc/percona-xtrabackup/2.4/index.html

 

XtraBackup 安装 

Percona XtraBackup 的安装方式总体来说有下面三种,我们下面简单的介绍一下。然后都具体都练练手。

Installing Percona XtraBackup from Repositories (recommended)

Installing Percona XtraBackup from Downloaded rpm or apt Packages

Compiling and Installing from Source Code 

1:Installing Percona XtraBackup from Repositories  

Installing Percona XtraBackup on Red Hat Enterprise Linux and CentOS 

下面我测试的环境为 CentOS Linux release 7.2.1511 (Core),安装 Percona XtraBackup 2.4 为例:

步骤 1:Install the Percona repository

[test@mylnx06 ~]$ sudo yum install https://www.percona.com/downloads/percona-release/RedHat/latest/percona-release-0.1-4.noarch.rpm
[sudo] password for test:
/usr/local/bin/aad-login failed: exit code 1
Loaded plugins: fastestmirror, langpacks
percona-release-0.1-4.noarch.rpm                         | 6.4 kB     00:00   
Examining /var/tmp/yum-root-02R3Gm/percona-release-0.1-4.noarch.rpm: percona-release-0.1-4.noarch
Marking /var/tmp/yum-root-02R3Gm/percona-release-0.1-4.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package percona-release.noarch 0:0.1-4 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package            Arch      Version    Repository                        Size
================================================================================
Installing:
percona-release    noarch    0.1-4      /percona-release-0.1-4.noarch    5.8 k
Transaction Summary
================================================================================
Install  1 Package
Total size: 5.8 k
Installed size: 5.8 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : percona-release-0.1-4.noarch                                 1/1
  Verifying  : percona-release-0.1-4.noarch                                 1/1
Installed:
  percona-release.noarch 0:0.1-4                                               
Complete!

RHEL/Centos 5 不支持从远程位置直接安装软件包,因此您需要首先下载软件包,然后用 rpm 手动安装

$ wget http://www.percona.com/downloads/percona-release/redhat/0.1-4/\
percona-release-0.1-4.noarch.rpm
$ rpm -ivh percona-release-0.1-4.noarch.rpm

安装完成后,你就能在 /etc/yum.repos.d 下看到一个 percona-release.repo 文件。

步骤 2:测试 Repository, 确保 Percona XtraBackup 相关包已经在 Repository 中。

[test@mylnx06 ~]$ yum list | grep percona-xtrabackup
percona-xtrabackup-24.x86_64               2.4.7-2.el7                 @percona-release-x86_64
percona-xtrabackup.x86_64                  2.3.8-1.el7                 percona-release-x86_64
percona-xtrabackup-22.x86_64               2.2.13-1.el7                percona-release-x86_64
percona-xtrabackup-22-debuginfo.x86_64     2.2.13-1.el7                percona-release-x86_64
percona-xtrabackup-24-debuginfo.x86_64     2.4.7-2.el7                 percona-release-x86_64
percona-xtrabackup-debuginfo.x86_64        2.3.8-1.el7                 percona-release-x86_64
percona-xtrabackup-test.x86_64             2.3.8-1.el7                 percona-release-x86_64
percona-xtrabackup-test-22.x86_64          2.2.13-1.el7                percona-release-x86_64
percona-xtrabackup-test-24.x86_64          2.4.7-2.el7                 percona-release-x86_64

步骤 3:安装 Percona XtraBackup 包。

[test@mylnx06 ~]$ yum install percona-xtrabackup-24
[root@GETAZDEVLNX005 ~]#yum install percona-xtrabackup-24
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package percona-xtrabackup-24.x86_64 0:2.4.7-2.el7 will be installed
--> Processing Dependency: perl(DBD::mysql) for package: percona-xtrabackup-24-2.4.7-2.el7.x86_64
--> Processing Dependency: perl(Digest::MD5) for package: percona-xtrabackup-24-2.4.7-2.el7.x86_64
--> Processing Dependency: libev.so.4()(64bit) for package: percona-xtrabackup-24-2.4.7-2.el7.x86_64
--> Running transaction check
---> Package libev.x86_64 0:4.15-6.el7 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed
---> Package perl-Digest-MD5.x86_64 0:2.52-3.el7 will be installed
--> Processing Dependency: perl(Digest::base) >= 1.00 for package: perl-Digest-MD5-2.52-3.el7.x86_64
--> Running transaction check
---> Package perl-Digest.noarch 0:1.17-245.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================
Package                         Arch        Version        Repository                Size
===========================================================================================
Installing:
percona-xtrabackup-24           x86_64      2.4.7-2.el7    percona-release-x86_64   7.4 M
Installing for dependencies:
libev                           x86_64      4.15-6.el7     extras                    44 k
perl-DBD-MySQL                  x86_64      4.023-5.el7    base                     140 k
perl-Digest                     noarch      1.17-245.el7   base                      23 k
perl-Digest-MD5                 x86_64      2.52-3.el7     base                      30 k
Transaction Summary
===========================================================================================
Install  1 Package (+4 Dependent packages)
Total download size: 7.6 M
Installed size: 31 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): libev-4.15-6.el7.x86_64.rpm                                   |  44 kB  00:00:00   
(2/5): perl-Digest-1.17-245.el7.noarch.rpm                           |  23 kB  00:00:00   
(3/5): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm                         | 140 kB  00:00:00   
(4/5): perl-Digest-MD5-2.52-3.el7.x86_64.rpm                         |  30 kB  00:00:00   
warning: /var/cache/yum/x86_64/7/percona-release-x86_64/packages/percona-xtrabackup-24-2.4.7-2.el7.x86_64.rpm:
Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY=============    -  ] 1.1 MB/s | 6.0 MB  00:00:01 ETA
Public key for percona-xtrabackup-24-2.4.7-2.el7.x86_64.rpm is not installed
(5/5): percona-xtrabackup-24-2.4.7-2.el7.x86_64.rpm                  | 7.4 MB  00:00:04   
------------------------------------------------------- 
Total                                                       1.9 MB/s | 7.6 MB  00:00:04   
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
Importing GPG key 0xCD2EFD2A:
Userid     : "Percona MySQL Development Team <mysql-dev@percona.com>"
Fingerprint: 430b df5c 56e7 c94e 848e e60c 1c4c bdcd cd2e fd2a
Package    : percona-release-0.1-4.noarch (@/percona-release-0.1-4.noarch)
From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libev-4.15-6.el7.x86_64                                                         1/5
  Installing : perl-DBD-MySQL-4.023-5.el7.x86_64                                               2/5
  Installing : perl-Digest-1.17-245.el7.noarch                                                 3/5
  Installing : perl-Digest-MD5-2.52-3.el7.x86_64                                               4/5
  Installing : percona-xtrabackup-24-2.4.7-2.el7.x86_64                                        5/5
  Verifying  : percona-xtrabackup-24-2.4.7-2.el7.x86_64                                        1/5
  Verifying  : perl-Digest-1.17-245.el7.noarch                                                 2/5
  Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                                               3/5
  Verifying  : perl-Digest-MD5-2.52-3.el7.x86_64                                               4/5
  Verifying  : libev-4.15-6.el7.x86_64                                                         5/5
Installed:
  percona-xtrabackup-24.x86_64 0:2.4.7-2.el7                                                                                                                                                                                                                   
Dependency Installed:
  libev.x86_64 0:4.15-6.el7                             
  perl-DBD-MySQL.x86_64 0:4.023-5.el7                             
  perl-Digest.noarch 0:1.17-245.el7                             
  perl-Digest-MD5.x86_64 0:2.52-3.el7                             
Complete!

Installing Percona XtraBackup from Percona apt repository 

下面我测试的环境为 Ubuntu 16.04.1 LTS,安装 Percona XtraBackup 2.4 为例:

1:从 Percona 官方网址获取 repository packages:

mylnx02@mylnx02:~$  wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb

–2017-02-28 11:57:52–  https://repo.percona.com/apt/percona-release_0.1-4.xenial_all.deb

Resolving repo.percona.com (repo.percona.com)… 74.121.199.234

Connecting to repo.percona.com (repo.percona.com)|74.121.199.234|:443… connected.

HTTP request sent, awaiting response… 200 OK

Length: 6394 (6.2K) [application/octet-stream]

Saving to: percona-release_0.1-4.xenial_all.deb

percona-release_0.1-4.xenial_all.deb        100%[==================>]  6.24K  –.-KB/s    in 0s     

2017-02-28 11:57:53 (157 MB/s) – percona-release_0.1-4.xenial_all.deb saved [6394/6394]

2:用 dpkg 安装下载的 package 包文件

 

mylnx02@mylnx02:~$ sudo dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb

Selecting previously unselected package percona-release.

(Reading database … 76835 files and directories currently installed.)

Preparing to unpack percona-release_0.1-4.xenial_all.deb …

Unpacking percona-release (0.1-4.xenial) …

Setting up percona-release (0.1-4.xenial) …

mylnx02@azrlnx02:~$

3:update the local cache

mylnx02@mylnx02:~$ sudo apt-get update

Hit:1 http://azure.archive.ubuntu.com/ubuntu xenial InRelease

Get:2 http://azure.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]

Get:3 http://azure.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]

Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease             

Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]   

Get:6 http://repo.percona.com/apt xenial InRelease [15.9 kB]                 

Get:7 http://repo.percona.com/apt xenial/main Sources [5,387 B]               

Get:8 http://repo.percona.com/apt xenial/main amd64 Packages [19.1 kB] 

Fetched 347 kB in 1s (212 kB/s)   

Reading package lists… Done

N: Ignoring file ’50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension

mylnx02@azrlnx02:~$

4:安装 Percona XtraBackup 包 percona-xtrabackup-24

 

mylnx02@mylnx02:~$ sudo apt-get install percona-xtrabackup-24
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following additional packages will be installed:
  libdbd-mysql-perl libdbi-perl libev4 libmysqlclient20
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libev4 libmysqlclient20 percona-xtrabackup-24
0 upgraded, 5 newly installed, 0 to remove and 72 not upgraded.
Need to get 6,063 kB/7,699 kB of archives.
After this operation, 39.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://azure.archive.ubuntu.com/ubuntu xenial/universe amd64 libev4 amd64 1:4.22-1 [26.3 kB]
Get:2 http://repo.percona.com/apt xenial/main amd64 percona-xtrabackup-24 amd64 2.4.6-1.xenial [6,037 kB]
Fetched 6,063 kB in 3s (1,909 kB/s)                 
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
Selecting previously unselected package libdbi-perl.
(Reading database ... 76841 files and directories currently installed.)
Preparing to unpack .../libdbi-perl_1.634-1build1_amd64.deb ...
Unpacking libdbi-perl (1.634-1build1) ...
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack .../libmysqlclient20_5.7.17-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.17-0ubuntu0.16.04.1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.033-1ubuntu0.1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Selecting previously unselected package libev4.
Preparing to unpack .../libev4_1%3a4.22-1_amd64.deb ...
Unpacking libev4 (1:4.22-1) ...
Selecting previously unselected package percona-xtrabackup-24.
Preparing to unpack .../percona-xtrabackup-24_2.4.6-1.xenial_amd64.deb ...
Unpacking percona-xtrabackup-24 (2.4.6-1.xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Setting up libdbi-perl (1.634-1build1) ...
Setting up libmysqlclient20:amd64 (5.7.17-0ubuntu0.16.04.1) ...
Setting up libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Setting up libev4 (1:4.22-1) ...
Setting up percona-xtrabackup-24 (2.4.6-1.xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
mylnx02@mylnx02:~$  innobackupex -v
innobackupex version 2.4.6 Linux (x86_64) (revision id: 54967d1)

2:Installing Percona XtraBackup from Downloaded rpm or apt Packages

1:使用 yum localinstall package 从本机目录安装软件包

[root@mylnx13 ~]#wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.4/\
> binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.4-1.el7.x86_64.rpm
[root@mylnx13 ~]#yum localinstall percona-xtrabackup-24-2.4.4-1.el7.x86_64.rpm

2:原始的 rpm 安装方式

 这里测试环境,下载的是 Percona-XtraBackup-2.2.12-r8726828-el5-x86_64-bundle.tar 安装包。在安装之前最好安装一些其他额外组件,例如 perl-DBD-MySQL 等。否则你会遇到一些杂七杂八的问题。例如

perl(DBD::mysql) is needed by percona-xtrabackup-2.2.12-1.el5.x86_64

[root@DB-Server tmp]# rpm -ivh percona-xtrabackup-2.2.12-1.el5.x86_64.rpm

warning: percona-xtrabackup-2.2.12-1.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a

error: Failed dependencies:

        perl(DBD::mysql) is needed by percona-xtrabackup-2.2.12-1.el5.x86_64

[root@DB-Server ~]# yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bzr \
                    bison libtool ncurses5-devel
[root@DB-Server ~]# yum -y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL

 

[root@MySQLDB005 tmp]# tar -xf Percona-XtraBackup-2.2.12-r8726828-el5-x86_64-bundle.tar
[root@MySQLDB005 tmp]# rpm -ivh percona-xtrabackup-2.2.12-1.el5.x86_64.rpm
warning: percona-xtrabackup-2.2.12-1.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a
Preparing...                ########################################### [100%]
   1:percona-xtrabackup     ########################################### [100%]
[root@MySQLDB005 tmp]#  

更多详情见请继续阅读下一页的精彩内容:http://www.linuxidc.com/Linux/2017-07/145638p2.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计38289字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中