diff --git a/CONFIGURATION b/CONFIGURATION index f69d4d5..10af477 100644 --- a/CONFIGURATION +++ b/CONFIGURATION @@ -10,25 +10,43 @@ ccollect.sh, Nico Schottelius, 2005-12-07 0. Runtime options ccollect looks for its configuration in /etc/ccollect or, if set, in -the directory specified in $CCOLLECT_CONF. +the directory specified by $CCOLLECT_CONF +(use CCOLLECT_CONF=/your/config/dir ccollect.sh on the shell). + +When you start ccollect, you have either to specify which intervall +to backup (daily, weekly, yearly; you can specify the names yourself, see below). + +The intervall is used to specify how many backups to keep. There are also some self explaining parameters you can pass to ccollect, simply use "ccollect.sh --help" for info. -The "intervall" is used to know how many backups to keep. -------------------------------------------------------------------------------- 1. General configuration -The general configuration can be found below $CCOLLECT_CONF/defaults or /etc/ccollect/defaults. +The general configuration can be found below $CCOLLECT_CONF/defaults or +/etc/ccollect/defaults. All options specified here are valid for +all source definitions, if the values are not overwritten in the source +configuration. + +All configuration entries are plain-text files. + 1.2. Intervall definition -Below this directory should be: +The intervall definition can be found below $CCOLLECT_CONF/defaults/intervalls/ or +/etc/ccollect/defaults/intervalls. + +Every file below this directory specifies an intervall. The name of the file is the +name of the intervall: intervalls/ - The number in this file tells ccollect how many versions to keep. +The content of this file should be a single line containing a number. +This number defines how many versions of this intervall to keep. + +STOPPED HERE. -------------------------------------------------------------------------------- 2. Source configuration @@ -45,3 +63,60 @@ Additionally a source may have the following files: - verbose whether to be verbose - exclude excludes for rsync. One exclude specification on each line + + + + +-------------------------------------------------------------------------------- +$CCOLLECT_CONF/ + -> Directories, which are so called 'backup-definitions' + + $dir/ + source -> file with the source + destination -> link to the destination + exclude -> \n seperated + + +-------------------------------------------------------------------------------- + source - a rsync compatible source (one liner) + + For instance: + + backup_user@foreign_host:/home/server/video + + or + + rsync://[USER@]HOST[:PORT]/SRC + + Have a look at rsync(1). + +-------------------------------------------------------------------------------- + verbose - should we log verbose or silent + + If this file exists in the source specification -v will be passed to rsync. + +-------------------------------------------------------------------------------- + exclude - a new line seperated list of paths to exclude + +-------------------------------------------------------------------------------- + destination - a link to the destination directory + +-------------------------------------------------------------------------------- + intervalls/ - subdirectory of source or defaults + + Each file below this directory describe an intervalls. +-------------------------------------------------------------------------------- + log - link to file we should log to + + If a backup source exists (the cconfig dir exists) all logs for this + source will be written to this file. General errors and errors of + non existent or broken configuration will be logged to stderr. + + I do not think it is senseful to have one logfile for all sources, as + the sources can be backuped in parallel and you would not be able to + distinguish the different log processes very good then. + + If you REALLY REALLY REALLY want to have all in one logfile, simply + link all "log" entries to the same file, output will be appended. +-------------------------------------------------------------------------------- + diff --git a/README b/README index 580abaf..c380de2 100644 --- a/README +++ b/README @@ -17,57 +17,3 @@ ccollect was inspired by rsnapshot [1], which had some problems: [0]: ccollect: http://linux.schottelius.org/ccollect/ [1]: rsnapshot: htt://www.rsnapshot.org/ [2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ - --------------------------------------------------------------------------------- -$CCOLLECT_CONF/ - -> Directories, which are so called 'backup-definitions' - - $dir/ - source -> file with the source - destination -> link to the destination - exclude -> \n seperated - - --------------------------------------------------------------------------------- - source - a rsync compatible source (one liner) - - For instance: - - backup_user@foreign_host:/home/server/video - - or - - rsync://[USER@]HOST[:PORT]/SRC - - Have a look at rsync(1). - --------------------------------------------------------------------------------- - verbose - should we log verbose or silent - - If this file exists in the source specification -v will be passed to rsync. - --------------------------------------------------------------------------------- - exclude - a new line seperated list of paths to exclude - --------------------------------------------------------------------------------- - destination - a link to the destination directory - --------------------------------------------------------------------------------- - intervalls/ - subdirectory of source or defaults - - Each file below this directory describe an intervalls. --------------------------------------------------------------------------------- - log - link to file we should log to - - If a backup source exists (the cconfig dir exists) all logs for this - source will be written to this file. General errors and errors of - non existent or broken configuration will be logged to stderr. - - I do not think it is senseful to have one logfile for all sources, as - the sources can be backuped in parallel and you would not be able to - distinguish the different log processes very good then. - - If you REALLY REALLY REALLY want to have all in one logfile, simply - link all "log" entries to the same file, output will be appended. --------------------------------------------------------------------------------- - diff --git a/ccollect.sh b/ccollect.sh index a305ad1..b207a6d 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -283,7 +283,7 @@ while [ "$i" -lt "$no_shares" ]; do "$EXCLUDE" "$source" "$destination_dir" if [ $? -ne 0 ]; then - errecho "rsync failed, backup most likely broken" + errecho "rsync failed, backup may be broken (see rsync errors)" continue fi