diff --git a/restore-mysql-daily b/restore-mysql-daily index 303844e..cab4427 100644 --- a/restore-mysql-daily +++ b/restore-mysql-daily @@ -179,17 +179,18 @@ fi echo "\nfinding files in '$NEWPATH*.gz'" for FILE in $NEWPATH*.gz; do + STARTLOOP=$(date +%s) + FILE=$(basename $FILE) + echo -e "\n$(date +%F\ %T) | $FILE:" + if [[ "${SETPOSDB}" =~ ${FILE%%.*} ]]; then echo -e "\t-- recognized $FILE for master position and log file" SETPOSFILE=$(realpath $FILE) SETPOSSTMT=$(zcat $SETPOSFILE | head -40 | grep MASTER | sed 's/-- //') echo -e "\n$SETPOSSTMT\n" - exit + exit 2 fi - FILE=$(basename $FILE) - STARTLOOP=$(date +%s) - echo -e "\n$(date +%F\ %T) | $FILE:" - + exit 1 if [[ "${SKIPDBS[*]}" =~ ${FILE%%.*} ]]; then echo -e "\t-- skipping $FILE";continue; fi;