diff options
author | Einhard Leichtfuß <alguien@respiranto.de> | 2018-10-08 20:18:00 +0200 |
---|---|---|
committer | Einhard Leichtfuß <alguien@respiranto.de> | 2018-10-08 20:18:00 +0200 |
commit | 29d9742bd7a7b634d5bb9b06e173007cf7466c24 (patch) | |
tree | 19c8e18e6c3baed2b4ff21bff9af545130c1445d | |
parent | c276a1b04c4bed91d96c443346bc1f404a6e13a4 (diff) |
Apply generic filter after specific filter
Also:
- Remove `-vv'.
- Add progress bar.
-rw-r--r-- | TODO | 2 | ||||
-rwxr-xr-x | rsync-backup.sh | 15 |
2 files changed, 10 insertions, 7 deletions
@@ -12,9 +12,11 @@ - Delete 'too new' symlinks in by_number. - Per dirpath rsync_args. - Allow resuming of backups. + `- See rsync's `--ignore-existing' flag - Shell completion of configured backup paths. # -- PROBLEMS -- # +- rsync bug: https://bugzilla.samba.org/show_bug.cgi?id=13445 - Permissions. `- Suppress error output by 2>/dev/null. `- Save errors in a var by 'var="`cmd 2>&1`"'. 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 } |