91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

xtrabackup 遠程流備份腳本

發布時間:2020-07-30 21:01:57 來源:網絡 閱讀:957 作者:xingzhehxiang 欄目:MySQL數據庫

1、xbstream 流,本地文件夾可以自己創建,異地文件夾必須存在

?innobackupex?--host=127.0.0.1??--post=3306?--stream=xbstream??--compress?/root/backup/?|?ssh?root@192.168.56.15?"xbstream?-x?-C?/tmp/"

2、xbstream 流,對端機器需要解壓并清理壓縮文件

192.168.56.15
xtrabackup?--decompress?--target-dir=/tmp/
find?/tmp/?-name?"*.qp"?|xargs??rm?-f

3、xbstream 流對端需要安裝軟件

3.1 xtrabackup

3.2 qpress-11-linux-x64.tar


4、腳本,周一全備,其它都是增備

[root@es1?chkpoint]#?cat?backup.sh
#!/bin/bash

LOCALDIR=/data/backup
CHECKPIONTDIR=$LOCALDIR/chkpoint
REMOTEDIR=/tmp/


WEEKDAY=`date?+%u`
INTERVARNUM=`expr?$WEEKDAY?-?1`
TISHWEEKFULL=`date?-d?"$INTERVARNUM?day?ago"?+%F`
TODAY=`date?+%F`

ssh?root@192.168.56.19?"mkdir?-p?/$REMOTEDIR/$TISHWEEKFULL"
ssh?root@192.168.56.19?"mkdir?-p?/$REMOTEDIR/$TISHWEEKFULL/$TODAY"


if?[?!?-f?$CHECKPIONTDIR/xtrabackup_checkpoints?]?;then

echo?"沒有lsn信息,開始一次全備"

innobackupex?--host=127.0.0.1?--history??--post=3306?--stream=xbstream???--compress?--extra-lsndir=$CHECKPIONTDIR??$LOCALDIR?|ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/"
exit?1
fi


case?$WEEKDAY?in
#判斷變量WEEKDAY的值
????"1")

????innobackupex?--host=127.0.0.1?--history??--post=3306?--stream=xbstream???--compress?--extra-lsndir=$CHECKPIONTDIR??$LOCALDIR?|ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/"????????;;
????"2")

???????innobackupex?--host=127.0.0.1??--post=3306?--stream=xbstream??--history?????--incremental?--extra-lsndir=$CHECKPIONTDIR??--incremental-basedir=$CHECKPIONTDIR???--compress?$LOCALDIR?|?ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/$TODAY"

????????;;
????????"3")

???????innobackupex?--host=127.0.0.1??--post=3306?--stream=xbstream??--history?????--incremental?--extra-lsndir=$CHECKPIONTDIR??--incremental-basedir=$CHECKPIONTDIR???--compress?$LOCALDIR?|?ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/$TODAY"

????????;;
????"4")

???????innobackupex?--host=127.0.0.1??--post=3306?--stream=xbstream??--history?????--incremental?--extra-lsndir=$CHECKPIONTDIR??--incremental-basedir=$CHECKPIONTDIR???--compress?$LOCALDIR?|?ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/$TODAY"

????????;;
????????"5")

???????innobackupex?--host=127.0.0.1??--post=3306?--stream=xbstream??--history?????--incremental?--extra-lsndir=$CHECKPIONTDIR??--incremental-basedir=$CHECKPIONTDIR???--compress?$LOCALDIR?|?ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/$TODAY"

????????;;
????????"3")

???????innobackupex?--host=127.0.0.1??--post=3306?--stream=xbstream??--history?????--incremental?--extra-lsndir=$CHECKPIONTDIR??--incremental-basedir=$CHECKPIONTDIR???--compress?$LOCALDIR?|?ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/$TODAY"

????????;;
????"4")

???????innobackupex?--host=127.0.0.1??--post=3306?--stream=xbstream??--history?????--incremental?--extra-lsndir=$CHECKPIONTDIR??--incremental-basedir=$CHECKPIONTDIR???--compress?$LOCALDIR?|?ssh?root@192.168.56.19?"xbstream?-x?-C?/$REMOTEDIR/$TISHWEEKFULL/$TODAY"

????????;;

esac



5、tar 目前不支持增備,壓縮解壓需要注意,需要tar -xizvf? *.tar.gz

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

昭苏县| 八宿县| 元谋县| 株洲县| 穆棱市| 景德镇市| 前郭尔| 正蓝旗| 沙雅县| 屯留县| 高唐县| 南丰县| 万荣县| 侯马市| 朝阳县| 根河市| 应城市| 绥化市| 屏东县| 墨脱县| 台中市| 登封市| 泰顺县| 龙山县| 新化县| 岳阳市| 华坪县| 曲沃县| 抚州市| 竹北市| 上思县| 通海县| 铁岭县| 分宜县| 夏邑县| 泰宁县| 汕头市| 驻马店市| 新晃| 河南省| 东丰县|