In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. xbstream stream, local folder can be created by itself, remote folder must exist
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 stream, the peer machine needs to decompress and clean up the compressed file
192.168.56.15xtrabackup --decompress --target-dir=/tmp/find /tmp/ -name "*.qp" |xargs rm -f
3. Xbstream stream peer needs to install software
3.1 xtrabackup
3.2 qpress-11-linux-x64.tar
4, script, Monday is fully prepared, the rest are additional
[root@es1 chkpoint]# cat backup.sh#!/ bin/bashLOCALDIR=/data/backupCHECKPIONTDIR=$LOCALDIR/chkpointREMOTEDIR=/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 ] ;thenecho "No lsn info, start a full backup"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 1ficase $WEEKDAY in#determine the value of variable 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 does not support backup at present. Attention is needed for compression and decompression. tar-xizvf *.tar.gz is required.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
To implement Automatic Memory Management (AMM), you set the following parameters:When you try to sta
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.