diff --git a/restore-mysql-daily b/restore-mysql-daily index fd24b59..a43468e 100644 --- a/restore-mysql-daily +++ b/restore-mysql-daily @@ -45,7 +45,7 @@ while [[ $# -gt 0 ]]; do case $1 in -d|--dry-run) DRY_RUN=true - CMD='echo -e "\t$(tput setaf 3)EXECUTE: $(tput sgr 0)"'; echo + CMD="echo -e \t$(tput setaf 3)EXECUTE: $(tput sgr 0)"; echo shift 1 ;; -a|--archive) @@ -163,7 +163,7 @@ echo -e "\nrestoring" START=$(date +%s) echo -e "\n--START: $(date +%F\ %T)\nrestoring most recent backups from $ARCHPATH" -echo -e "\tstopping replication\n"; +echo -e "\tstopping replication"; $CMD mysql -e "STOP SLAVE;" NEWDATE=$(ls -1r "$ARCHPATH" | head -1) @@ -172,9 +172,9 @@ NEWPATH="$ARCHPATH$NEWDATE/$SUBDIR" if [[ $FULLRESTORE == false ]]; then OLDDATE=$(ls -1rt "$ARCHPATH" | head -1) OLDPATH="$ARCHPATH$OLDDATE/$SUBDIR" - echo -e "compartive restoration selected:\n\tfiles from:\t'$NEWDATE'\n\tcompared to:\t'$OLDDATE'" + echo -e "\n\ncompartive restoration selected:\n\tfiles from:\t'$NEWDATE'\n\tcompared to:\t'$OLDDATE'" else - echo "full restorion selected: comparisons will not be made, all non-excluded databases will be restored" + echo "\n\nfull restorion selected: comparisons will not be made, all non-excluded databases will be restored" fi echo -e "\nfinding files in '$NEWPATH*.gz'"