ITPub博客

首页 > 数据库 > MySQL > xtrabackup安装

xtrabackup安装

原创 MySQL 作者:steven_hua 时间:2016-09-02 10:21:30 0 删除 编辑

方法1、安装xtrabackup工具, 直接安装缺少依赖包
https://www.percona.com/downloads/XtraBackup/
[root@localhost src]# wget -c https://www.percona.com/downloads/XtraBackup/Percona-

XtraBackup-2.4.4/binary/redhat/6/x86_64/percona-xtrabackup-24-2.4.4-1.el6.x86_64.rpm

[root@localhost src]# rpm -ivh percona-xtrabackup-24-2.4.4-1.el6.x86_64.rpm
warning: percona-xtrabackup-24-2.4.4-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID

cd2efd2a: NOKEY
error: Failed dependencies:
        libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.4-1.el6.x86_64
        perl(DBD::mysql) is needed by percona-xtrabackup-24-2.4.4-1.el6.x86_64

 libev 在yum的扩展库中,
 yum -y install perl perl-devel libaio libaio-devel

 因为使用perl的编写脚本,应先安装
  yum -y install perl-Time-HiRes
 yum -y install perl-DBD-MySQL



方法2.先安装 Percona的yum库:

yum install https://www.percona.com/redir/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm

yum list | grep percona

yum install percona-xtrabackup-24
error: Failed dependencies:
        libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.4-1.el6.x86_64

wget -c ftp://rpmfind.net/linux/dag/redhat/el6/en/x86_64/dag/RPMS/libev-4.15-1.el6.rf.x86_64.rpm

rpm -ivh libev-4.15-1.el6.rf.x86_64.rpm

yum install percona-xtrabackup-24   

3  权限:
grant reload, process, lock tables,replication client on *.* to 'backup'@'localhost' identified by 'backup' ; 
flush privileges;

备份目录:
# mkdir -p /backup/{config,full,incremental}
         config:   存放my.cnf    可以直接将文件复制到config目录下
                   cp /etc/my.cnf  /backup/config/3306.cnf
         full:     全备份目录
         incremental:增量备份目录


安装完成!


4.参考
http://www.cnblogs.com/olinux/p/5207887.html
http://www.cnblogs.com/jiangwenju/p/4919482.html


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/807718/viewspace-2124385/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: monitoring_rman
请登录后发表评论 登录
全部评论

注册时间:2008-05-16

  • 博文量
    117
  • 访问量
    190325