mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 07:03:54 +01:00
Fixed wrong file size fetched remotely
This commit is contained in:
parent
6a51acbb49
commit
643ede6524
@ -7,7 +7,7 @@ PROGRAM="obackup"
|
|||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=2.1-dev
|
PROGRAM_VERSION=2.1-dev
|
||||||
PROGRAM_BUILD=2017010206
|
PROGRAM_BUILD=2017010207
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
# Execution order #__WITH_PARANOIA_DEBUG
|
# Execution order #__WITH_PARANOIA_DEBUG
|
||||||
@ -599,13 +599,12 @@ function _GetDirectoriesSizeRemote {
|
|||||||
# Error output is different from stdout because not all files in list may fail at once
|
# Error output is different from stdout because not all files in list may fail at once
|
||||||
$SSH_CMD env _DEBUG="'$_DEBUG'" env _PARANOIA_DEBUG="'$_PARANOIA_DEBUG'" env _LOGGER_SILENT="'$_LOGGER_SILENT'" env _LOGGER_VERBOSE="'$_LOGGER_VERBOSE'" env _LOGGER_PREFIX="'$_LOGGER_PREFIX'" env _LOGGER_ERR_ONLY="'$_LOGGER_ERR_ONLY'" \
|
$SSH_CMD env _DEBUG="'$_DEBUG'" env _PARANOIA_DEBUG="'$_PARANOIA_DEBUG'" env _LOGGER_SILENT="'$_LOGGER_SILENT'" env _LOGGER_VERBOSE="'$_LOGGER_VERBOSE'" env _LOGGER_PREFIX="'$_LOGGER_PREFIX'" env _LOGGER_ERR_ONLY="'$_LOGGER_ERR_ONLY'" \
|
||||||
env PROGRAM="'$PROGRAM'" env SCRIPT_PID="'$SCRIPT_PID'" TSTAMP="'$TSTAMP'" \
|
env PROGRAM="'$PROGRAM'" env SCRIPT_PID="'$SCRIPT_PID'" TSTAMP="'$TSTAMP'" \
|
||||||
$COMMAND_SUDO' bash -s' << 'ENDSSH' > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP" 2> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP" &
|
dirList="'$dirList'" $COMMAND_SUDO' bash -s' << 'ENDSSH' > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID.$TSTAMP" 2> "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.error.$SCRIPT_PID.$TSTAMP" &
|
||||||
include #### DEBUG SUBSET ####
|
include #### DEBUG SUBSET ####
|
||||||
include #### TrapError SUBSET ####
|
include #### TrapError SUBSET ####
|
||||||
include #### RemoteLogger SUBSET ####
|
include #### RemoteLogger SUBSET ####
|
||||||
|
|
||||||
cmd="du -cs $dirList | tail -n1 | cut -f1"
|
cmd="du -cs $dirList | tail -n1 | cut -f1"
|
||||||
RemoteLogger "cmd: $cmd" "DEBUG"
|
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
ENDSSH
|
ENDSSH
|
||||||
# $cmd will return 0 even if some errors found, so we need to check if there is an error output
|
# $cmd will return 0 even if some errors found, so we need to check if there is an error output
|
||||||
|
Loading…
Reference in New Issue
Block a user