From 083b5e4d06533475c9a25216d70749b2a4771e6a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 24 Jan 2006 21:46:49 +0100 Subject: [PATCH] Added support for summary --- ccollect.sh | 19 +++++++++++++------ doc/ccollect.html | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 27385e2..1f3d4e0 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -15,8 +15,8 @@ CPOSTEXEC="$CDEFAULTS/post_exec" TMP=$(mktemp /tmp/$(basename $0).XXXXXX) WE=$(basename $0) -VERSION=0.3 -RELEASE="2006-01-22" +VERSION=0.3.1 +RELEASE="2006-XX-XX" # # unset parallel execution @@ -206,6 +206,7 @@ while [ "$i" -lt "$no_shares" ]; do c_verbose="$backup/verbose" c_vverbose="$backup/very_verbose" c_rsync_extra="$backup/rsync_options" + c_summary="$backup/summary" c_pre_exec="$backup/pre_exec" c_post_exec="$backup/post_exec" @@ -239,12 +240,13 @@ while [ "$i" -lt "$no_shares" ]; do fi # - # standard rsync options + # unset possible options # - VERBOSE="" - VVERBOSE="" EXCLUDE="" RSYNC_EXTRA="" + SUMMARY="" + VERBOSE="" + VVERBOSE="" # # next configuration checks @@ -289,6 +291,11 @@ while [ "$i" -lt "$no_shares" ]; do VERBOSE="-v" fi + # Output a summary + if [ -f "$c_summary" ]; then + SUMMARY="--stats" + fi + # MORE verbosity, includes standard verbosity if [ -f "$c_vverbose" ]; then VERBOSE="-v" @@ -349,7 +356,7 @@ while [ "$i" -lt "$no_shares" ]; do echo "Transferring files..." - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE \ + rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ --delete --numeric-ids --relative --delete-excluded \ "$source" "$destination_dir" diff --git a/doc/ccollect.html b/doc/ccollect.html index 3354076..87cea26 100644 --- a/doc/ccollect.html +++ b/doc/ccollect.html @@ -749,7 +749,7 @@ srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*