mirror of
https://github.com/deajan/obackup.git
synced 2025-02-05 19:03:50 +01:00
Revert "Fixed sql dry mode output and compression level"
This reverts commit 7ee1872718
.
This commit is contained in:
parent
7ee1872718
commit
c2b64d9479
@ -16,14 +16,11 @@ UNDER WORK
|
|||||||
|
|
||||||
- Commands like cp should have their stderr redirected to log file
|
- Commands like cp should have their stderr redirected to log file
|
||||||
- Mysqldump must be checked for not telling success if a table is damaged (also check for event table error)
|
- Mysqldump must be checked for not telling success if a table is damaged (also check for event table error)
|
||||||
- Mysqldump commands error msg must be logged
|
|
||||||
|
|
||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
---------
|
---------
|
||||||
|
|
||||||
- Fixed ignoring compression level in conf file
|
|
||||||
- Fixed dry mode sql backup output
|
|
||||||
- Prevented triggering TrapError if there are no child processes to terminate on TrapQuit
|
- Prevented triggering TrapError if there are no child processes to terminate on TrapQuit
|
||||||
- Improved mysql debug logs
|
- Improved mysql debug logs
|
||||||
- Prevent creation of backup-id less log file when DEBUG is set
|
- Prevent creation of backup-id less log file when DEBUG is set
|
||||||
|
17
obackup.sh
17
obackup.sh
@ -5,7 +5,7 @@
|
|||||||
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=1.84RC4
|
PROGRAM_VERSION=1.84RC4
|
||||||
PROGRAM_BUILD=2112201401
|
PROGRAM_BUILD=2811201403
|
||||||
|
|
||||||
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
|
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
|
||||||
if ! type -p "$BASH" > /dev/null
|
if ! type -p "$BASH" > /dev/null
|
||||||
@ -791,7 +791,7 @@ function BackupDatabase
|
|||||||
LogError "Connectivity test failed. Stopping current task."
|
LogError "Connectivity test failed. Stopping current task."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dry_sql_cmd="$SSH_CMD mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1"
|
dry_sql_cmd="$SSH_CMD mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 > /dev/null 2>&1"
|
||||||
sql_cmd="$SSH_CMD mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS > $LOCAL_SQL_STORAGE/$1.sql$COMPRESSION_EXTENSION"
|
sql_cmd="$SSH_CMD mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS > $LOCAL_SQL_STORAGE/$1.sql$COMPRESSION_EXTENSION"
|
||||||
elif [ "$REMOTE_BACKUP" == "yes" ] && [ "$COMPRESSION_REMOTE" == "yes" ]
|
elif [ "$REMOTE_BACKUP" == "yes" ] && [ "$COMPRESSION_REMOTE" == "yes" ]
|
||||||
then
|
then
|
||||||
@ -801,19 +801,19 @@ function BackupDatabase
|
|||||||
LogError "Connectivity test failed. Stopping current task."
|
LogError "Connectivity test failed. Stopping current task."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dry_sql_cmd="$SSH_CMD \"mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS\""
|
dry_sql_cmd="$SSH_CMD \"mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS\" > /dev/null 2>&1"
|
||||||
sql_cmd="$SSH_CMD \"mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS\" > $LOCAL_SQL_STORAGE/$1.sql$COMPRESSION_EXTENSION"
|
sql_cmd="$SSH_CMD \"mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS\" > $LOCAL_SQL_STORAGE/$1.sql$COMPRESSION_EXTENSION"
|
||||||
else
|
else
|
||||||
dry_sql_cmd="mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS"
|
dry_sql_cmd="mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS > /dev/null 2>&1"
|
||||||
sql_cmd="mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS > $LOCAL_SQL_STORAGE/$1.sql$COMPRESSION_EXTENSION"
|
sql_cmd="mysqldump -u $SQL_USER --skip-lock-tables --single-transaction --database $1 $COMPRESSION_PROGRAM $COMPRESSION_OPTIONS > $LOCAL_SQL_STORAGE/$1.sql$COMPRESSION_EXTENSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
LogDebug "SQL_CMD: $sql_cmd"
|
||||||
|
|
||||||
if [ $dryrun -ne 1 ]
|
if [ $dryrun -ne 1 ]
|
||||||
then
|
then
|
||||||
LogDebug "SQL_CMD: $sql_cmd"
|
|
||||||
eval "$sql_cmd 2>&1"
|
eval "$sql_cmd 2>&1"
|
||||||
else
|
else
|
||||||
LogDebug "SQL_CMD: $dry_sql_cmd"
|
|
||||||
eval "$dry_sql_cmd"
|
eval "$dry_sql_cmd"
|
||||||
fi
|
fi
|
||||||
exit $?
|
exit $?
|
||||||
@ -1289,10 +1289,7 @@ function Init
|
|||||||
RSYNC_ARGS=$RSYNC_ARGS" --force"
|
RSYNC_ARGS=$RSYNC_ARGS" --force"
|
||||||
|
|
||||||
## Set compression executable and extension
|
## Set compression executable and extension
|
||||||
if [ "$COMPRESSION_LEVEL" == "" ]
|
COMPRESSION_LEVEL=9
|
||||||
then
|
|
||||||
COMPRESSION_LEVEL=9
|
|
||||||
fi
|
|
||||||
if type -p xz > /dev/null 2>&1
|
if type -p xz > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
COMPRESSION_PROGRAM="| xz -$COMPRESSION_LEVEL"
|
COMPRESSION_PROGRAM="| xz -$COMPRESSION_LEVEL"
|
||||||
|
Loading…
Reference in New Issue
Block a user