mirror of
https://github.com/deajan/obackup.git
synced 2024-11-14 19:53:42 +01:00
Fixed double sql backup on errro
This commit is contained in:
parent
30ea816a71
commit
823c6034db
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user