1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-15 04:03:41 +01:00

Updated RSYNC_ARGS to recursive and non recursive styles

This commit is contained in:
deajan 2018-09-30 13:51:06 +02:00
parent 33fff1c5a2
commit c56b1d6031

View File

@ -7,8 +7,8 @@
#### OFUNCTIONS FULL SUBSET #### #### OFUNCTIONS FULL SUBSET ####
#### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MINI SUBSET ####
_OFUNCTIONS_VERSION=2.3.0-beta1 _OFUNCTIONS_VERSION=2.3.0-RC1
_OFUNCTIONS_BUILD=2018080801 _OFUNCTIONS_BUILD=2018093001
#### _OFUNCTIONS_BOOTSTRAP SUBSET #### #### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true _OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END #### #### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -2120,8 +2120,8 @@ function InitRemoteOSDependingSettings {
REMOTE_STAT_CTIME_MTIME_CMD="stat -c \\\"%n;%Z;%Y\\\"" REMOTE_STAT_CTIME_MTIME_CMD="stat -c \\\"%n;%Z;%Y\\\""
fi fi
## Set rsync default arguments ## Set rsync default arguments (complete with -r or -d depending on recursivity later)
RSYNC_ARGS="-rltD -8" RSYNC_DEFAULT_ARGS="ltD -8"
if [ "$_DRYRUN" == true ]; then if [ "$_DRYRUN" == true ]; then
RSYNC_DRY_ARG="-n" RSYNC_DRY_ARG="-n"
DRY_WARNING="/!\ DRY RUN " DRY_WARNING="/!\ DRY RUN "
@ -2159,43 +2159,46 @@ function InitRemoteOSDependingSettings {
fi fi
if [ "$RSYNC_COMPRESS" == "yes" ]; then if [ "$RSYNC_COMPRESS" == "yes" ]; then
if [ "$LOCAL_OS" != "MacOSX" ] && [ "$REMOTE_OS" != "MacOSX" ]; then if [ "$LOCAL_OS" != "MacOSX" ] && [ "$REMOTE_OS" != "MacOSX" ]; then
RSYNC_ARGS=$RSYNC_ARGS" -zz --skip-compress=gz/xz/lz/lzma/lzo/rz/jpg/mp3/mp4/7z/bz2/rar/zip/sfark/s7z/ace/apk/arc/cab/dmg/jar/kgb/lzh/lha/lzx/pak/sfx" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -zz --skip-compress=gz/xz/lz/lzma/lzo/rz/jpg/mp3/mp4/7z/bz2/rar/zip/sfark/s7z/ace/apk/arc/cab/dmg/jar/kgb/lzh/lha/lzx/pak/sfx"
else else
Logger "Disabling compression skips on synchronization on [$LOCAL_OS] due to lack of support." "NOTICE" Logger "Disabling compression skips on synchronization on [$LOCAL_OS] due to lack of support." "NOTICE"
fi fi
fi fi
if [ "$COPY_SYMLINKS" == "yes" ]; then if [ "$COPY_SYMLINKS" == "yes" ]; then
RSYNC_ARGS=$RSYNC_ARGS" -L" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -L"
fi fi
if [ "$KEEP_DIRLINKS" == "yes" ]; then if [ "$KEEP_DIRLINKS" == "yes" ]; then
RSYNC_ARGS=$RSYNC_ARGS" -K" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -K"
fi fi
if [ "$RSYNC_OPTIONAL_ARGS" != "" ]; then if [ "$RSYNC_OPTIONAL_ARGS" != "" ]; then
RSYNC_ARGS=$RSYNC_ARGS" "$RSYNC_OPTIONAL_ARGS RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" "$RSYNC_OPTIONAL_ARGS
fi fi
if [ "$PRESERVE_HARDLINKS" == "yes" ]; then if [ "$PRESERVE_HARDLINKS" == "yes" ]; then
RSYNC_ARGS=$RSYNC_ARGS" -H" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -H"
fi fi
if [ "$CHECKSUM" == "yes" ]; then if [ "$CHECKSUM" == "yes" ]; then
RSYNC_TYPE_ARGS=$RSYNC_TYPE_ARGS" --checksum" RSYNC_TYPE_ARGS=$RSYNC_TYPE_ARGS" --checksum"
fi fi
if [ "$BANDWIDTH" != "" ] && [ "$BANDWIDTH" != "0" ]; then if [ "$BANDWIDTH" != "" ] && [ "$BANDWIDTH" != "0" ]; then
RSYNC_ARGS=$RSYNC_ARGS" --bwlimit=$BANDWIDTH" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --bwlimit=$BANDWIDTH"
fi fi
if [ "$PARTIAL" == "yes" ]; then if [ "$PARTIAL" == "yes" ]; then
RSYNC_ARGS=$RSYNC_ARGS" --partial --partial-dir=\"$PARTIAL_DIR\"" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --partial --partial-dir=\"$PARTIAL_DIR\""
RSYNC_PARTIAL_EXCLUDE="--exclude=\"$PARTIAL_DIR\"" RSYNC_PARTIAL_EXCLUDE="--exclude=\"$PARTIAL_DIR\""
fi fi
if [ "$DELTA_COPIES" != "no" ]; then if [ "$DELTA_COPIES" != "no" ]; then
RSYNC_ARGS=$RSYNC_ARGS" --no-whole-file" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --no-whole-file"
else else
RSYNC_ARGS=$RSYNC_ARGS" --whole-file" RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --whole-file"
fi fi
# Set compression options again after we know what remote OS we are dealing with # Set compression options again after we know what remote OS we are dealing with
SetCompression SetCompression
RSYNC_DEFAULT_ARGS="-r $RSYNC_DEFAULT_ARGS"
RSYNC_DEFAULT_NONRECURSIVE_ARGS="-d $RSYNC_DEFAULT_ARGS"
} }
## IFS debug function ## IFS debug function