/>
[root@timesten mysqlbin]# rpm -ivh percona-xtrabackup-2.2.9-5067.el5.x86_64.rpm
warning: percona-xtrabackup-2.2.9-5067.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.9-5067.el5.x86_64
++缺少包DBD-MySQL, 配置一个本地yum源
[root@timesten mysqlbin]# vi /etc/yum.repos.d/local.repo
[local]
name=localdisk
baseurl=file:///mnt/cdrom/Server
gpgcheck=0
enabled=1
[root@timesten mysqlbin]# yum install perl-DBD-MySQL
[root@timesten mysqlbin]# rpm -ivh percona-xtrabackup-2.2.9-5067.el5.x86_64.rpm
warning: percona-xtrabackup-2.2.9-5067.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a
Preparing... ########################################### [100%]
1:percona-xtrabackup ########################################### [100%]
[root@timesten mysqlbin]# rpm -ql percona-xtrabackup
/usr/bin/innobackupex
/usr/bin/xbcrypt
/usr/bin/xbstream
/usr/bin/xtrabackup
/usr/share/doc/percona-xtrabackup-2.2.9
/usr/share/doc/percona-xtrabackup-2.2.9/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
[root@timesten mysqlbin]#
XtraBackup中主要包含了三个工具
xtrabackup:支持innodb存储引擎表,xtradb存储引擎表
innobackupex:支持innodb存储引擎表、xtradb存储引擎表、myisam存储引擎表。
xbstream:流备份工具,用于减少备份和传输过程中的IO
[root@timesten mysqlbin]# cat /etc/my.cnf
basedir = /opt/mysql
datadir = /opt/mysql/data
port = 3306
server_id = 1
socket = /var/lib/mysql/mysql.sock
[root@timesten mysqlbin]#
数据库的完整备份
innobackupex --defaults-file=/etc/my.cnf --user=root --password='oracle' /tmp/mysql
InnoDB备份,使备份可用
innobackupex --apply-log /tmp/mysql/2015-07-10_15-03-38 (步骤一备份完成后会产生2015-06-15_14-57-24目录)
阅读(1755) | 评论(0) | 转发(0) |