aboutsummaryrefslogtreecommitdiff
path: root/rsync-backup.sh
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2018-10-08 20:18:00 +0200
committerEinhard Leichtfuß <alguien@respiranto.de>2018-10-08 20:18:00 +0200
commit29d9742bd7a7b634d5bb9b06e173007cf7466c24 (patch)
tree19c8e18e6c3baed2b4ff21bff9af545130c1445d /rsync-backup.sh
parentc276a1b04c4bed91d96c443346bc1f404a6e13a4 (diff)
Apply generic filter after specific filter
Also: - Remove `-vv'. - Add progress bar.
Diffstat (limited to 'rsync-backup.sh')
-rwxr-xr-xrsync-backup.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/rsync-backup.sh b/rsync-backup.sh
index ae094ea..8f278c5 100755
--- a/rsync-backup.sh
+++ b/rsync-backup.sh
@@ -25,10 +25,10 @@ RSYNC=rsync
typeset -a rsync_args
typeset -a rsync_inc_args
typeset -A bakpath
-typeset filter_file_all
+typeset filter_file_all # Applied after specific filter.
typeset -A filter_file
-# Default arguments for rsync.
+# Default arguments for rsync (-rptoglHS, --timeout, --info).
rsync_args=(
--recursive
--perms --times --owner --group
@@ -37,7 +37,8 @@ rsync_args=(
--hard-links
--sparse
--timeout=60
- -vv
+ #-vv
+ --info=progress2
)
# Supplemental arguments for rsync; only used when an actual incremental
@@ -122,14 +123,14 @@ function get_args
fi
filter_args=()
- if test -v filter_file_all -a -f "$filter_file_all"
- then
- filter_args=("--filter=merge ${filter_file_all}")
- fi
if test -v filter_file[$dirpath] && test -f "${filter_file[$dirpath]}"
then
filter_args+=("--filter=merge ${filter_file[$dirpath]}")
fi
+ if test -v filter_file_all -a -f "$filter_file_all"
+ then
+ filter_args+=("--filter=merge ${filter_file_all}")
+ fi
}