percona xtrabackup 之一 setup

os: centos 7.4
db: mysql 5.7
dbbackup: xtrabackup 2.4.9

xtrabackup是一款优秀的mysql开源备份(物理备份)工具,是由percona公司开发的。

下载

官网下载
https://www.percona.com/software/mysql-database/percona-xtrabackup
https://www.percona.com/downloads/XtraBackup/LATEST/

也有git的支持
https://github.com/percona/percona-xtrabackup

文档
https://www.percona.com/doc/percona-xtrabackup/LATEST/index.html
https://www.percona.com/doc/percona-xtrabackup/2.4/index.html
Percona-XtraBackup-2.4.9.pdf

安装

主要有几种方式
1)yum Repositories方式
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
yum list|grep -i percona
yum install percona-xtrabackup-24.x86_64

2)手动rpm包安装
Percona-XtraBackup-2.4.9-ra467167cdd4-el7-x86_64-bundle.tar

3)二进制的方式
percona-xtrabackup-2.4.9-Linux-x86_64.tar.gz

4)源码编译
percona-xtrabackup-2.4.9.tar.gz

5)git方式,越来越多的项目提供git支持了
https://github.com/percona/percona-xtrabackup.git
https://github.com/percona/percona-xtrabackup

本次采用手动rpm方式

# yum install cmake openssl-devel libaio libaio-devel automake autoconf \
bison libtool ncurses-devel libgcrypt-devel libev-devel libcurl-devel zlib-devel \
vim-common libev

# cd /tmp/xtrabackup
# tar -xvf ./Percona-XtraBackup-2.4.9-ra467167cdd4-el7-x86_64-bundle.tar
# rpm -ivh ./percona-xtrabackup-24-2.4.9-1.el7.x86_64.rpm

至此,xtrabackup就算安装好了,下面来简述如何备份和还原,更灵活的用法计划再写几篇xtrabackup专题blog

# which innobackupex 
/usr/bin/innobackupex
# which xtrabackup 
/usr/bin/xtrabackup
# ls -l /usr/bin/innobackupex 
lrwxrwxrwx 1 root root 10 Mar 26 21:06 /usr/bin/innobackupex -> xtrabackup

可以看到 innobackupex 是到 xtrabackup 的软链

# innobackupex --help 
# xtrabackup --help

这两个的输出还是不太一样innobackupex --help 有这样一句描述

NOTICE: ‘innobackupex’ is deprecated, please switch to ‘xtrabackup’

所以还是安心使用 xtrabackup

Percona XtraBackup is a set of following tools:
innobackupex 
innobackupex is the symlink for xtrabackup. innobackupex still supports all features and
syntax as 2.2 version did, but is now deprecated and will be removed in next major release.

xtrabackup 
a compiled C binary that provides functionality to backup a whole MySQL database instance with MyISAM, InnoDB, and XtraDB tables.

xbcrypt 
utility used for encrypting and decrypting backup files.

xbstream 
utility that allows streaming and extracting files to/from the xbstream format.

xbcloud 
utility used for downloading and uploading full or part of xbstream archive from/to cloud.

After Percona XtraBackup 2.3 release the recommend way to take the backup is using the xtrabackup script. More
information on script options can be found in how to use xtrabackup.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数据库人生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值