innobackupex安装 详解

最近做mysql数据库备份,尝试热备,使用了innobackupex ,总结一下安装的过程。


  首先下载安装包:http://www.percona.com/downloads/XtraBackup/。根据系统下载对应的安装包,我的是ubuntu16,所以下载的percona-xtrabackup-24_2.4.8-1.xenial_amd64.deb
  

  1. 执行 sudo dpkg -i percona-xtrabackup-24_2.4.8-1.xenial_amd64.deb
     其中dpkg -i是deb 文件的执行命令。 语句执行后应该会报错,不用担心 ,缺少依赖了,错误如下:
     
Selecting previously unselected package percona-xtrabackup-24.
(Reading database ... 65953 files and directories currently installed.)
Preparing to unpack percona-xtrabackup-24_2.4.8-1.xenial_amd64.deb ...
Unpacking percona-xtrabackup-24 (2.4.8-1.xenial) ...
dpkg: dependency problems prevent configuration of percona-xtrabackup-24:
percona-xtrabackup-24 depends on libdbd-mysql-perl; however:
Package libdbd-mysql-perl is not installed.
percona-xtrabackup-24 depends on libcurl3 (>= 7.16.3); however:
Package libcurl3 is not installed.
percona-xtrabackup-24 depends on libev4 (>= 1:4.04); however:
Package libev4 is not installed.

dpkg: error processing package percona-xtrabackup-24 (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
percona-xtrabackup-24

2.根据报错提示,尝试安装缺少的依赖包,执行了语句: sudo apt-get install libev4:
语句执行后仍然报错:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
percona-xtrabackup-24 : Depends: libdbd-mysql-perl but it is not going to be installed
Depends: libcurl3 (>= 7.16.3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

3. 继续根据报错提示执行 语句:sudo apt-get -f install
这条语句执行后,依赖补全了。
4.sudo dpkg -i percona-xtrabackup-24_2.4.8-1.xenial_amd64.deb
再次执行安装语句,安装成功了。


后面的文章再加上备份的脚本及执行的相关内容。

你可能感兴趣的:(innobackup,mysql,数据库,备份,mysql)