亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

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

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

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

漯河市| 砀山县| 博爱县| 师宗县| 安顺市| 修水县| 青河县| 淮阳县| 克拉玛依市| 密云县| 安乡县| 芮城县| 平江县| 皋兰县| 舟山市| 永福县| 镇远县| 顺义区| 海淀区| 鲜城| 望都县| 望奎县| 梧州市| 阿勒泰市| 康平县| 河间市| 贡山| 同心县| 乐山市| 九龙坡区| 汝南县| 高密市| 竹山县| 克什克腾旗| 芦溪县| 乌审旗| 洱源县| 政和县| 米易县| 新民市| 西峡县|