From 1b4319b827b697f25ca70abf82d39a0ebfd98bed Mon Sep 17 00:00:00 2001 From: zwotzie Date: Fri, 16 Aug 2019 13:44:27 +0200 Subject: =?UTF-8?q?move=20rsync=20flag=20--compress=20to=20ssh=20section.?= =?UTF-8?q?=20It=20will=20be=20used=20only=20if=20de=E2=80=A6=20(#159)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * move rsync flag --compress to ssh section. It will be used only if destination is accessed via ssh * fix identation, use tabs only --- rsync_tmbackup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index b629d5f..9900282 100755 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -227,7 +227,7 @@ AUTO_DELETE_LOG="1" EXPIRATION_STRATEGY="1:1 30:7 365:30" AUTO_EXPIRE="1" -RSYNC_FLAGS="-D --compress --numeric-ids --links --hard-links --one-file-system --itemize-changes --times --recursive --perms --owner --group --stats --human-readable" +RSYNC_FLAGS="-D --numeric-ids --links --hard-links --one-file-system --itemize-changes --times --recursive --perms --owner --group --stats --human-readable" while :; do case $1 in @@ -246,6 +246,7 @@ while :; do --rsync-get-flags) shift echo $RSYNC_FLAGS + echo "if using remote drive over SSH, --compress will be added" exit ;; --rsync-set-flags) @@ -463,6 +464,7 @@ while : ; do CMD="rsync" if [ -n "$SSH_CMD" ]; then + $RSYNC_FLAGS="$RSYNC_FLAGS --compress" if [ -n "$ID_RSA" ] ; then CMD="$CMD -e 'ssh -p $SSH_PORT -i $ID_RSA -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'" else -- cgit v1.2.3