2022-11-03 14:10:41
This commit is contained in:
@@ -37,6 +37,7 @@ for FILE in $NEWDATE/backup_data/*.gz; do
|
||||
|
||||
if [[ "${SKIPDBS[*]}" =~ ${FILE%%.*} ]]; then echo -e "\t-- skipping $FILE";continue; fi;
|
||||
if [[ "${SETPOSDB}" =~ ${FILE%%.*} ]]; then echo -e "\t-- recognized $FILE for master position and log file";SETPOSFILE=$FILE; fi;
|
||||
|
||||
if [[ ! -z $OLDDATE ]]; then
|
||||
OLDSIZE=$(stat -c %s $OLDDATE/backup_data/$FILE)
|
||||
else
|
||||
@@ -64,7 +65,9 @@ if [[ -z $SETPOSFILE ]]; then
|
||||
mysql -e $SETPOS
|
||||
fi
|
||||
|
||||
echo -e "restarting replication"
|
||||
mysql -e "START SLAVE"
|
||||
|
||||
END=$(date +%s)
|
||||
EXCTIME=$(expr $END - $START)
|
||||
printf 'total runtime: %02dh:%02dm:%02ds\n' $((EXCTIME/3600)) $((EXCTIME%3600/60)) $((EXCTIME%60)
|
||||
|
||||
Reference in New Issue
Block a user