innobackupex的流备份【转】

并行备份

innobackupex -p123123 --parallel=8 /backup

节流备份(节省IO)

innobackupex -p123123 --throttle=200 /backup

压缩备份

innobackupex -p123123 --compress /backup
innobackupex -p123123 --compress --compress-threads=8 /backup
innobackupex -p123123 --parallel=8 --compress --compress-threads=8 /backup
# 解压
wget http://www.quicklz.com/qpress-11-linux-x64.tar

# ls
qpress
# mv qpress /usr/local/bin/

qpress -d test.qp ./
for bf in `find . -iname "*.qp"`; do qpress -d $bf $(dirname $bf) && rm $bf; done
innobackupex --decompress /backup/2013-08-01_11-24-04/
innobackupex --parallel=4 --decompress 2017-04-11_11-50-31/

流备份

# tar格式流备份
innobackupex -p123123 --stream=tar /backup

innobackupex -p123123 --stream=tar /backup > /backup/back.tar
tar -ixvf /backup/back.tar

innobackupex -p123123 --stream=tar /backup | gzip > /backup/fullback.tar.gz

innobackupex -p123123 --stream=tar /tmp | ssh root@192.168.1.120  "cat - > /backup/bak.tar"

# 备份到远程主机
- [1] 免密登录
- [2] innobackupex -p123123 --stream=tar /tmp | ssh root@192.168.1.120  "cat - > /backup/bak.tar"
- [3] innobackupex -p123123 --stream=tar /tmp | ssh root@192.168.1.120  "gzip > /backup/dateFullBak.tar.gz";

# xbstream格式流备份
innobackupex -p123123 --stream=xbstream ./ > /backup/fullbak.xbstream
innobackupex -p123123 --stream=xbstream --compress ./ > /backup/fullbak.xbstream

xbstream -x < bakup.xbstream
xbstream -x -C /backup/zsythink/ < fullbak.xbstream

备份到远程主机
> innobackupex -p123123 --stream=xbstream --compress /tmp | ssh root@192.168.1.120 "xbstream -x -C /backup/datafull"
 

转自

17、xtrabackup 常用备份功能与选项 - 侃豺小哥 - 博客园 https://www.cnblogs.com/kcxg/p/10382507.html

MySQL物理备份基本操作 - weixin_33869377的博客 - CSDN博客 https://blog.csdn.net/weixin_33869377/article/details/86997034

「转」xtrabackup新版详细说明 - billy鹏 - 博客园 https://www.cnblogs.com/billyxp/p/5305676.html

原文地址:https://www.cnblogs.com/paul8339/p/10562867.html