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