Fixed exclude list bug, now ccollect is working as expected

This commit is contained in:
Nico Schottelius 2005-12-08 11:28:16 +01:00
parent 8447c83165
commit 421daf2f66
2 changed files with 11 additions and 11 deletions

8
TODO
View file

@ -1,6 +1,10 @@
- write a manpage - write a manpage
- implement verbosity - implement verbosity
o per source (-v to rsync)
o general, very verbose (set -x) o general, very verbose (set -x)
- implement general log - implement general log
- implement source specific backup - implement source specific log
- implement parallel execution
DONE
- implement verbosity
o per source (-v to rsync)

View file

@ -210,9 +210,7 @@ while [ "$i" -lt "$no_shares" ]; do
# exclude # exclude
if [ -f "$c_exclude" ]; then if [ -f "$c_exclude" ]; then
while read tmp; do EXCLUDE="--exclude-from=$c_exclude"
EXCLUDE="$EXCLUDE --exclude=\"$tmp\""
done < "$c_exclude"
fi fi
# verbose # verbose
@ -252,7 +250,7 @@ while [ "$i" -lt "$no_shares" ]; do
# only copy if a directory exists # only copy if a directory exists
if [ "$last_dir" ]; then 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" cp $VERBOSE -al "$last_dir" "$destination_dir"
else else
mkdir "$destination_dir" mkdir "$destination_dir"
@ -268,10 +266,8 @@ while [ "$i" -lt "$no_shares" ]; do
# options stolen shameless from rsnapshot # options stolen shameless from rsnapshot
# #
echo rsync -a --delete --numeric-ids --relative --delete-excluded \ rsync -a $VERBOSE --delete --numeric-ids --relative --delete-excluded \
$EXCLUDE $VERBOSE $EXCLUDE "$source" "$destination_dir" "$EXCLUDE" $EXCLUDE "$source" "$destination_dir"
rsync -a --delete --numeric-ids --relative --delete-excluded \
$EXCLUDE $VERBOSE $EXCLUDE "$source" "$destination_dir"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
errecho "rsync failed, backup most likely broken" errecho "rsync failed, backup most likely broken"