From 823c6034dbe638cb81746403a1003838397dd2b1 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 15 Mar 2020 23:23:05 +0100 Subject: [PATCH] Fixed double sql backup on errro --- dev/n_obackup.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index ee4f91f..cdf64ee 100644 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -7,7 +7,7 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2019 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.1-dev-postRC1 -PROGRAM_BUILD=2019080901 +PROGRAM_BUILD=2020031501 IS_STABLE=true CONFIG_FILE_REVISION_REQUIRED=2.1 @@ -1052,10 +1052,8 @@ function _BackupDatabaseLocalToLocal { if [ -s "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP" ]; then if [ $_DRYRUN == false ]; then _LOGGER_SILENT=true Logger "Command was [$sqlCmd]." "WARN" - eval "$sqlCmd" & else _LOGGER_SILENT=true Logger "Command was [$drySqlCmd]." "WARN" - eval "$drySqlCmd" & fi Logger "Truncated error output:\n$(head -c16384 $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP)" "ERROR" # Dirty fix for mysqldump return code not honored @@ -1101,10 +1099,8 @@ function _BackupDatabaseLocalToRemote { if [ -s "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP" ]; then if [ $_DRYRUN == false ]; then _LOGGER_SILENT=true Logger "Command was [$sqlCmd]." "WARN" - eval "$sqlCmd" & else _LOGGER_SILENT=true Logger "Command was [$drySqlCmd]." "WARN" - eval "$drySqlCmd" & fi Logger "Truncated error output:\n$(head -c16384 $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP)" "ERROR" # Dirty fix for mysqldump return code not honored @@ -1150,10 +1146,8 @@ function _BackupDatabaseRemoteToLocal { if [ -s "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP" ]; then if [ $_DRYRUN == false ]; then _LOGGER_SILENT=true Logger "Command was [$sqlCmd]." "WARN" - eval "$sqlCmd" & else _LOGGER_SILENT=true Logger "Command was [$drySqlCmd]." "WARN" - eval "$drySqlCmd" & fi Logger "Truncated error output:\n$(head -c16384 $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP)" "ERROR" # Dirty fix for mysqldump return code not honored