innodb的mysql物理备份_mysql物理备份工具xtrabackup第一天----实战安装

###############IT--小哥原创,如有雷同,纯属抄袭#################

1、xtrabackup简介

Xtrabackup是一个对InnoDB做数据备份的工具,支持在线热备份(备份时

不影响数据读写),是商业备份工具InnoDB Hotbackup的一个很好的替代品。  Xtrabackup有两个主要的工具:xtrabackup、innobackupex  (1)xtrabackup只能备份InnoDB和XtraDB两种数据表,而不能备份MyISAM数据表  (2)innobackupex-1.5.1则封装了xtrabackup,是一个脚本封装,所以能同时备份处理innodb和myisam,但在处理myisam时需要加一个读锁

2、xtrabackup的安装

2.1 安装配置

配置数据存储的目录

[[email protected] ~]# cat /etc/my.cnf |grep datadir

datadir=/var/lib/mysql

2.2 xtrabackup之二进制安装

wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.3.3/binary/redhat/6/x86_64/Percona-XtraBackup-2.3.3-r525ca7d-el6-x86_64-bundle.tar

[[email protected] opt]# tar xf Percona-XtraBackup-2.3.3-r525ca7d-el6-x86_64-bundle.tar

percona-xtrabackup-2.3.3-1.el6.x86_64.rpm

Percona-XtraBackup-2.3.3-r525ca7d-el6-x86_64-bundle.tar

percona-xtrabackup-debuginfo-2.3.3-1.el6.x86_64.rpm

percona-xtrabackup-test-2.3.3-1.el6.x86_64.rpm

安装必须的libev.so库

[[email protected] ~]# rpm -ivh libev-4.03-3.el6.x86_64.rpm

warning: libev-4.03-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY

Preparing...                ########################################### [100%]

1:libev                  ########################################### [100%]

[[email protected] ~]# rpm -qa libev

libev-4.03-3.el6.x86_64

[[email protected] opt]#  rpm -ivh percona-xtrabackup-2.3.3-1.el6.x86_64.rpm

Preparing...                ########################################### [100%]

1:percona-xtrabackup     ########################################### [100%]

[[email protected] opt]#  rpm -ivh percona-xtrabackup-debuginfo-2.3.3-1.el6.x86_64.rpm

Preparing...                ########################################### [100%]

1:percona-xtrabackup-debu########################################### [100%]

###############IT--小哥原创,如有雷同,纯属抄袭#################

###############IT--小哥原创,如有雷同,纯属抄袭#################

###############IT--小哥原创,如有雷同,纯属抄袭#################

2.3 xtrabackup之yum安装

2.3.1 Install the Percona repository

2.3.2 Testing the repository

[[email protected] ~]# yum list | grep percona

……

percona-xtrabackup-22.x86_64                2.2.13-1.el6                percona-xtrabackup.x86_64                   2.3.3-1.el6                 percona-xtrabackup-20.x86_64                2.0.8-587.rhel6             percona-xtrabackup-20-debuginfo.x86_64      2.0.8-587.rhel6             percona-xtrabackup-20-test.x86_64           2.0.8-587.rhel6             percona-xtrabackup-21.x86_64                2.1.9-746.rhel6             percona-xtrabackup-21-debuginfo.x86_64                                2.1.9-746.rhel6

percona-xtrabackup-22-debuginfo.x86_64                                   2.2.13-1.el6

percona-xtrabackup-debuginfo.x86_64        2.3.3-1.el6                 percona-xtrabackup-test.x86_64                                            2.3.3-1.el6

percona-xtrabackup-test-21.x86_64           2.1.9-746.rhel6             percona-xtrabackup-test-22.x86_64                                        2.2.13-1.el6

……

2.3.3 Install the packages

[[email protected] ~]# yum install percona-xtrabackup-22

2.3.4 check tish packages

[[email protected] ~]# rpm -qa percona-xtrabackup-22

percona-xtrabackup-22-2.2.13-1.el6.x86_64

2.4 xtrabackup安装错误总结

2.4.1 xtrabackup安装错误

错误一:

报错如下:

[[email protected] opt]# rpm -ivh percona-xtrabackup-2.3.3-1.el6.x86_64.rpm

warning: percona-xtrabackup-2.3.3-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-2.3.3-1.el6.x86_64

perl(DBD::mysql) is needed by percona-xtrabackup-2.3.3-1.el6.x86_64

原因:

缺少安装必须的libev.so.4库。

缺少perl。

错误二:

报错如下:

[[email protected] opt]#  rpm -ivh percona-xtrabackup-test-2.3.3-1.el6.x86_64.rpm

error: Failed dependencies:

/usr/bin/mysql is needed by percona-xtrabackup-test-2.3.3-1.el6.x86_64

解决:

ln -s /application/mysql/bin/mysql /usr/bin/mysql

export PATH=/application/mysql/bin:$PATH

###############IT--小哥原创,如有雷同,纯属抄袭#################

原文:http://402753795.blog.51cto.com/10788998/1729496

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值