mirror of
https://github.com/deajan/obackup.git
synced 2024-11-12 19:03:42 +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"
|
||||
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
||||
PROGRAM_VERSION=2.1-dev
|
||||
PROGRAM_BUILD=2017010206
|
||||
PROGRAM_BUILD=2017010207
|
||||
IS_STABLE=no
|
||||
|
||||
# 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
|
||||
$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'" \
|
||||
$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 #### TrapError SUBSET ####
|
||||
include #### RemoteLogger SUBSET ####
|
||||
|
||||
cmd="du -cs $dirList | tail -n1 | cut -f1"
|
||||
RemoteLogger "cmd: $cmd" "DEBUG"
|
||||
eval "$cmd"
|
||||
ENDSSH
|
||||
# $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