diff --git a/ccollect.sh b/ccollect.sh index f3322f9..e001af5 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -193,6 +193,7 @@ while [ "$i" -lt "$no_shares" ]; do c_dest="$backup/destination" c_exclude="$backup/exclude" c_verbose="$backup/verbose" + c_vverbose="$backup/very_verbose" c_rsync_extra="$backup/rsync_options" echo "Beginning to backup this source ..." @@ -227,6 +228,7 @@ while [ "$i" -lt "$no_shares" ]; do # standard rsync options # VERBOSE="" + VVERBOSE="" EXCLUDE="" RSYNC_EXTRA="" @@ -259,11 +261,16 @@ while [ "$i" -lt "$no_shares" ]; do RSYNC_EXTRA="$(cat "$c_rsync_extra")" fi - # verbose + # verbosity for rsync if [ -f "$c_verbose" ]; then VERBOSE="-v" fi + # verbosity for cp + if [ -f "$c_vverbose" ]; then + VVERBOSE="-v" + fi + # # check if maximum number of backups is reached, if so remove # @@ -281,7 +288,7 @@ while [ "$i" -lt "$no_shares" ]; do while read to_remove; do dir="$to_remove" echo "Removing $dir ..." - rm -rf "$dir" + rm $VVERBOSE -rf "$dir" done < "$TMP" fi @@ -300,10 +307,10 @@ while [ "$i" -lt "$no_shares" ]; do # only copy if a directory exists if [ "$last_dir" ]; then echo "Hard linking..." - cp -al $VERBOSE "$last_dir" "$destination_dir" + cp -al $VVERBOSE "$last_dir" "$destination_dir" else echo "Creating $destination_dir" - mkdir "$destination_dir" + mkdir $VVERBOSE "$destination_dir" fi if [ $? -ne 0 ]; then diff --git a/doc/ccollect.html b/doc/ccollect.html index bc6cee6..2028ab7 100644 --- a/doc/ccollect.html +++ b/doc/ccollect.html @@ -263,7 +263,7 @@ div.exampleblock-content { Nico Schottelius
<nico-linux-ccollect__@__schottelius.org>
version 0.2.2, -for ccollect 0.2, Initial Version 2005-01-13 +for ccollect 0.2, Initial Version from 2005-01-13
@@ -563,10 +563,17 @@ waste resources, but your backup will be complete.

6. F.A.Q.

-

6.1. What happens, if one backup is broken / empty?

+

6.1. What happens, if one backup is broken or empty?

Let us assume, that one backup failed (connection broke or hard disk had some failures). So we've one backup in our history, which is incomplete.

The next time you use ccollect, it will transfer the missing files

+

6.2. When backing up from localhost the destination is also included. Is this a bug?

+

No. ccollect passes your source definition directly to rsync. It +does not try to analyze it. So it actually does not know if a source +comes from local harddisk or from a remote server. And it does not want +to. When you backup from the local harddisk (which is perhaps not +even a good idea when thinking of security) add the destination +to source/exclude. (Daniel Aubry reported this problem)

7. Examples

@@ -648,7 +655,7 @@ srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* diff --git a/doc/ccollect.text b/doc/ccollect.text index 9bdf19b..ef197f6 100644 --- a/doc/ccollect.text +++ b/doc/ccollect.text @@ -313,8 +313,8 @@ waste resources, but your backup will be complete. F.A.Q. ------ -What happens, if one backup is broken / empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +What happens, if one backup is broken or empty? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Let us assume, that one backup failed (connection broke or hard disk had some failures). So we've one backup in our history, which is incomplete. @@ -322,6 +322,17 @@ some failures). So we've one backup in our history, which is incomplete. The next time you use `ccollect`, it will transfer the missing files +When backing up from localhost the destination is also included. Is this a bug? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +No. `ccollect` passes your source definition directly to `rsync`. It +does not try to analyze it. So it actually does not know if a source +comes from local harddisk or from a remote server. And it does not want +to. When you backup from the local harddisk (which is perhaps not +even a good idea when thinking of security) add the `destination` +to 'source/exclude'. (Daniel Aubry reported this problem) + + Examples --------