From bda19b3822d09b5b0f60c045f8bce71d0306b3a4 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 18 Aug 2016 12:58:05 +0200 Subject: [PATCH] Finally fixed all space related errors --- dev/n_obackup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index f04b68b..9811de2 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -29,7 +29,7 @@ PARTIAL_DIR=".obackup_workdir_partial" # $FILE_RECURSIVE_BACKUP_TASKS, list of directories to backup, computed from config file recursive list # $FILE_RECURSIVE_EXCLUDED_TASKS, list of all directories excluded from recursive list # $FILE_SIZE_LIST_LOCAL, list of all directories to include in GetDirectoriesSize, enclosed by escaped doublequotes for local command -# $FILE_SIZE_LIST_LOCAL, list of all directories to include in GetDirectoriesSize, enclosed by escaped singlequotes for remote command +# $FILE_SIZE_LIST_REMOTE, list of all directories to include in GetDirectoriesSize, enclosed by escaped singlequotes for remote command CAN_BACKUP_SQL=1 CAN_BACKUP_FILES=1 @@ -839,7 +839,7 @@ function Rsync { local rsync_cmd if [ "$KEEP_ABSOLUTE_PATHS" == "yes" ]; then - file_storage_path="$(dirname $FILE_STORAGE/${backup_directory#/})" + file_storage_path=$(dirname "$FILE_STORAGE/${backup_directory#/}") else file_storage_path="$FILE_STORAGE" fi @@ -860,10 +860,12 @@ function Rsync { _CreateDirectoryLocal "$file_storage_path" CheckConnectivity3rdPartyHosts CheckConnectivityRemoteHost + backup_directory=$(EscapeSpaces "$backup_directory") rsync_cmd="$(type -p $RSYNC_EXECUTABLE) $RSYNC_ARGS $RSYNC_DRY_ARG $RSYNC_ATTR_ARGS $RSYNC_TYPE_ARGS $RSYNC_NO_RECURSE_ARGS --stats $RSYNC_DELETE $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE --rsync-path=\"$RSYNC_PATH\" -e \"$RSYNC_SSH_CMD\" \"$REMOTE_USER@$REMOTE_HOST:$backup_directory\" \"$file_storage_path\" > $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID 2>&1" elif [ "$BACKUP_TYPE" == "push" ]; then CheckConnectivity3rdPartyHosts CheckConnectivityRemoteHost + file_storage_path=$(EscapeSpaces "$file_storage_path") _CreateDirectoryRemote "$file_storage_path" rsync_cmd="$(type -p $RSYNC_EXECUTABLE) $RSYNC_ARGS $RSYNC_DRY_ARG $RSYNC_ATTR_ARGS $RSYNC_TYPE_ARGS $RSYNC_NO_RECURSE_ARGS --stats $RSYNC_DELETE $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE --rsync-path=\"$RSYNC_PATH\" -e \"$RSYNC_SSH_CMD\" \"$backup_directory\" \"$REMOTE_USER@$REMOTE_HOST:$file_storage_path\" > $RUN_DIR/$PROGRAM.${FUNCNAME[0]}.$SCRIPT_PID 2>&1" fi