使用xbstream 备份到远程服务器

##xbstream 备份到远程服务器
innobackupex \
--defaults-file="/export/servers/mysql/etc/my.cnf" \
--host="localhost" \
--port= \
--user="backuper" \
--password="backup@123" \
--stream=xbstream "/export/mysql_backup/" \
| ssh root@10.0.0.2 \
"gzip ->/export/mysql_backup/mysql_backup.gz" ## 由于备份文件使用xbstream和gzip进行两次压缩,因此需要进行两次解压
## 第一次使用gzip解压备份
gzip -d mysql_backup.gz ##第二次使用xbstream解压gzip
xbstream -x < mysql_backup

使用tar备份到远程服务器

##tar备份到远程服务器
innobackupex \
--defaults-file="/export/servers/mysql/etc/my.cnf" \
--host="localhost" \
--port= \
--user="backuper" \
--password="backup@123" \
--stream=tar "/export/mysql_backup/" \
| ssh root@10.0.0.2 \
"gzip ->/export/mysql_backup/mysql_backup.tar.gz" ##使用tar解压
tar -ixzvf mysql_backup.tar.gz

本地限速备份(使用PV限速)

## 备份到/export/mysql_backup/full
## 使用tar进行流备份,限速后再使用tar -x 解压
cd /export/mysql_backup/full innobackupex \
--defaults-file="/export/servers/mysql/etc/my.cnf" \
--host="localhost" \
--port= \
--user="backuper" \
--password="backup@123" \
--stream=tar \
"/export/mysql_backup/tmp/" |pv -q -L50m | tar -x

最新文章

  1. 如何解决wow.js与fullpage的兼容性
  2. android的单击监听事件
  3. 【吐槽】VS2012的安装项目只能用InstallShield Limited Edition
  4. winform程序重启
  5. asp.net mvc 简单文件下载
  6. C++STL之迭代器
  7. Selenium1(RC)与Selenium2(WebDriver)的概念介绍
  8. JNI-入门之一
  9. fedora21发布与新功能介绍(附fedora21安装教程与fedora21下载地址)
  10. UVA 185(暴力DFS)
  11. HP P2055d激光打印机PCL XL error的解决
  12. (原)ubuntu16中编译boost1.61.0库
  13. Cocos2d-x layout (二)
  14. Linux磁盘分区,目录树,文件系统的关系(转)
  15. 初次接触 Android Studio FAQ
  16. ehcache与redis的比较与应用场景分析(转)
  17. 创建局域网yum服务器
  18. i3wm 调节音量
  19. SQL server分离和附加数据库
  20. Android 自定义ImageView支持缩放,拖拽,方便复用

热门文章

  1. Linux下打开超大文件的方法
  2. mysql-connector-java(6.0以上)的时差问题
  3. 《精通CSS第3版》(6)内容布局(定位+水平布局)
  4. (5)Flask项目会员登录页
  5. CNeo编程语言概述
  6. Swift编程语言中如何实现自定义类型的for-in循环(基于Swift 2.2)
  7. excel VBA 密码设置问题
  8. 【linux学习笔记七】关机重启命令
  9. [LeetCode] 257. Binary Tree Paths 二叉树路径
  10. Azure上部署Barracuda WAF集群 --- 2