From 421daf2f6668230f666699743b31477cfe16a54f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 8 Dec 2005 11:28:16 +0100 Subject: [PATCH] Fixed exclude list bug, now ccollect is working as expected --- TODO | 8 ++++++-- ccollect.sh | 14 +++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/TODO b/TODO index 3e2a61c..5c783a9 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,10 @@ - write a manpage - implement verbosity - o per source (-v to rsync) o general, very verbose (set -x) - implement general log -- implement source specific backup +- implement source specific log +- implement parallel execution + +DONE +- implement verbosity + o per source (-v to rsync) diff --git a/ccollect.sh b/ccollect.sh index fcdd1c7..537ff7c 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -210,9 +210,7 @@ while [ "$i" -lt "$no_shares" ]; do # exclude if [ -f "$c_exclude" ]; then - while read tmp; do - EXCLUDE="$EXCLUDE --exclude=\"$tmp\"" - done < "$c_exclude" + EXCLUDE="--exclude-from=$c_exclude" fi # verbose @@ -252,7 +250,7 @@ while [ "$i" -lt "$no_shares" ]; do # only copy if a directory exists if [ "$last_dir" ]; then - echo cp -al "$last_dir" "$destination_dir" + # echo cp -al "$last_dir" "$destination_dir" cp $VERBOSE -al "$last_dir" "$destination_dir" else mkdir "$destination_dir" @@ -267,11 +265,9 @@ while [ "$i" -lt "$no_shares" ]; do # the rsync part # options stolen shameless from rsnapshot # - - echo rsync -a --delete --numeric-ids --relative --delete-excluded \ - $EXCLUDE $VERBOSE $EXCLUDE "$source" "$destination_dir" - rsync -a --delete --numeric-ids --relative --delete-excluded \ - $EXCLUDE $VERBOSE $EXCLUDE "$source" "$destination_dir" + + rsync -a $VERBOSE --delete --numeric-ids --relative --delete-excluded \ + "$EXCLUDE" $EXCLUDE "$source" "$destination_dir" if [ $? -ne 0 ]; then errecho "rsync failed, backup most likely broken"