diff --git a/software/ccollect/download.mdwn b/software/ccollect/download.mdwn index 8762270a..509036ac 100644 --- a/software/ccollect/download.mdwn +++ b/software/ccollect/download.mdwn @@ -10,77 +10,24 @@ Additionally, the following other git ressources are available: * [Mirror at github](http://github.com/telmich/ccollect/tree/master) ## Releases - * [[ccollect-0.8.tar.bz2]] - ([browse source](ccollect-0.8)) - ([[Changes|ccollect-0.8/doc/changes/0.8]]) - ([[RPM|ccollect-0.8-0.noarch.rpm]]) - + * [[ccollect-0.8.tar.bz2]] ([[RPM|ccollect-0.8-0.noarch.rpm]]) * ccollect-0.7.1.tar.bz2 - (browse source) - (Changes) - * ccollect-0.7.0.tar.bz2 - (browse source) - (Changes) - * ccollect-0.6.2.tar.bz2 - (browse source) - (Changes) - * ccollect-0.6.1.tar.bz2 - (browse source) - (Changes) - * ccollect-0.6.tar.bz2 - (browse source) - (Changes) - * ccollect-0.5.2.tar.bz2 - (browse source) - (Changes) - * ccollect-0.5.1.tar.bz2 - (browse source) - (Changes) - * ccollect-0.5.tar.bz2 - (browse source) - (Changes) - * ccollect-0.4.2.tar.bz2 - (browse source) - (Changes) - * ccollect-0.4.1.tar.bz2 - (browse source) - (Changes) - * ccollect-0.4.tar.bz2 - (browse source) - (Changes) - * ccollect-0.3.3.tar.bz2 - (browse source) - (Changes) - * ccollect-0.3.2.tar.bz2 - (browse source) - (Changes) - * ccollect-0.3.1.tar.bz2 - (browse source) - (Changes) - * ccollect-0.3.tar.bz2 - (browse source) - (Changes) - * ccollect-0.2.tar.bz2 - (browse source) - (Changes) - * ccollect-0.1.tar.bz2 - (browse source) ### Gentoo diff --git a/software/ccollect/download/ccollect-0.1/.gitignore b/software/ccollect/download/ccollect-0.1/.gitignore deleted file mode 100644 index a688c2f6..00000000 --- a/software/ccollect/download/ccollect-0.1/.gitignore +++ /dev/null @@ -1 +0,0 @@ -conf/sources/*/destination/* diff --git a/software/ccollect/download/ccollect-0.1/CONFIGURATION b/software/ccollect/download/ccollect-0.1/CONFIGURATION deleted file mode 100644 index f69d4d54..00000000 --- a/software/ccollect/download/ccollect-0.1/CONFIGURATION +++ /dev/null @@ -1,47 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-07 --------------------------------------------------------------------------------- - -0. Runtime options -1. General configuration -2. Source configuration - --------------------------------------------------------------------------------- -0. Runtime options - -ccollect looks for its configuration in /etc/ccollect or, if set, in -the directory specified in $CCOLLECT_CONF. - -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. - -1.2. Intervall definition - -Below this directory should be: - - intervalls/ - - The number in this file tells ccollect how many versions to keep. - --------------------------------------------------------------------------------- -2. Source configuration - -Each source configuration exists below $CCOLLECT_CONF/sources/$name. -The name describes the source. - -Each source has at least - - - source (a text file containing the path to backup) - - destination (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - verbose whether to be verbose - - exclude excludes for rsync. One exclude specification on each line diff --git a/software/ccollect/download/ccollect-0.1/HOW_IT_LOOKS_LIKE_WHEN_YOU_SAVE_SPACE b/software/ccollect/download/ccollect-0.1/HOW_IT_LOOKS_LIKE_WHEN_YOU_SAVE_SPACE deleted file mode 100644 index ff7bf23b..00000000 --- a/software/ccollect/download/ccollect-0.1/HOW_IT_LOOKS_LIKE_WHEN_YOU_SAVE_SPACE +++ /dev/null @@ -1,11 +0,0 @@ -Hard links are such a nice thing ;-) - -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 diff --git a/software/ccollect/download/ccollect-0.1/INSTALL b/software/ccollect/download/ccollect-0.1/INSTALL deleted file mode 100644 index 82d48080..00000000 --- a/software/ccollect/download/ccollect-0.1/INSTALL +++ /dev/null @@ -1,5 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-08 --------------------------------------------------------------------------------- - -Simply copy it to a directory in your $PATH. diff --git a/software/ccollect/download/ccollect-0.1/README b/software/ccollect/download/ccollect-0.1/README deleted file mode 100644 index 580abaf3..00000000 --- a/software/ccollect/download/ccollect-0.1/README +++ /dev/null @@ -1,73 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which had some problems: - - configuration parameters had to be TAB seperated - - you could not specify exclude lists differently for every source - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -[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/software/ccollect/download/ccollect-0.1/REQUIREMENTS b/software/ccollect/download/ccollect-0.1/REQUIREMENTS deleted file mode 100644 index c6222836..00000000 --- a/software/ccollect/download/ccollect-0.1/REQUIREMENTS +++ /dev/null @@ -1,12 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 (updated: 2005-12-07) -Requirements --------------------------------------------------------------------------------- - -ccollect needs the following packages: - - - a bourne shell (/bin/sh) compatible shell - - bc - - cp with support for hard links (cp -al is used) - - rsync - - ssh if you want to use rsync over ssh diff --git a/software/ccollect/download/ccollect-0.1/TODO b/software/ccollect/download/ccollect-0.1/TODO deleted file mode 100644 index 92375f3f..00000000 --- a/software/ccollect/download/ccollect-0.1/TODO +++ /dev/null @@ -1,11 +0,0 @@ -- write a manpage -- write a simple manual -- implement verbosity - o general, very verbose (set -x) -- implement general log -- implement source specific log -- implement parallel execution - -DONE -- implement verbosity - o per source (-v to rsync) diff --git a/software/ccollect/download/ccollect-0.1/ccollect.sh b/software/ccollect/download/ccollect-0.1/ccollect.sh deleted file mode 100644 index 6dd02c1d..00000000 --- a/software/ccollect/download/ccollect-0.1/ccollect.sh +++ /dev/null @@ -1,288 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: - - -# -# temporary as long as inofficial -# -CCOLLECT_CONF=$HOME/crsnapshot/conf - - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -WE=$(basename $0) - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -# -# errors! -# -errecho() -{ - echo "|E> Error: $@" >&2 -} - - -# -# Tell how to use us -# -usage() -{ - echo "$WE: [args] " - echo "" - echo " Nico Schottelius (nico-linux-ccollect schottelius.org) - 2005-12-06" - echo "" - echo " Backup data pseudo incremental" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parellize backup process" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/." - echo "" - exit 0 -} - -# -# need at least intervall and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# Filter arguments -# - -INTERVALL=$1; shift - -i=1 -no_shares=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval share_${no_shares}=\"$arg\" - no_shares=$[$no_shares+1] - else - case $arg in - -a|--all) - ALL=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval share_${no_shares}=\"$arg\" - no_shares=$[$no_shares+1] - ;; - esac - fi - - i=$[$i+1] -done - - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_shares=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd $CSOURCES; - ls > "$TMP" - - while read tmp; do - eval share_${no_shares}=\"$tmp\" - no_shares=$[$no_shares+1] - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_shares" -lt 1 ]; then - usage -else - echo "/o> $WE: Beginning backup using intervall $INTERVALL" -fi - -# -# check default configuration -# - -D_FILE_INTERVALL="$CDEFAULTS/intervalls/$INTERVALL" -D_INTERVALL=$(cat $D_FILE_INTERVALL 2>/dev/null) - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_shares" ]; do - - # - # Standard locations - # - eval name=\$share_${i} - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - c_verbose="$backup/verbose" - - echo "/=> Beginning to backup \"$name\" ..." - i=$[$i+1] - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - errecho "Source \"$name\" does not exist." - continue - fi - if [ ! -d "$backup" ]; then - errecho "\"$name\" is not a cconfig-directory. Skipping." - continue - fi - - # - # intervall definiition: First try source specific, fallback to default - # - c_intervall="$(cat "$backup/intervalls/$INTERVALL" 2>/dev/null)" - - if [ -z "$c_intervall" ]; then - c_intervall=$D_INTERVALL - - if [ -z "$c_intervall" ]; then - errecho "Default and source specific intervall missing. Skipping." - continue - fi - fi - - # - # standard rsync options - # - VERBOSE="" - EXCLUDE="" - - # - # next configuration checks - # - if [ ! -f "$c_source" ]; then - echo "|-> Source description $c_source is not a file. Skipping." - continue - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "|-> Skipping: Source $c_source is not readable" - continue - fi - fi - - if [ ! -d "$c_dest" ]; then - errecho "Destination $c_dest does not link to a directory. Skipping" - continue - fi - - # exclude - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # verbose - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVALL.$DATE - count=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | wc -l) - echo "|-> $count backup(s) already exist, keeping $c_intervall backup(s)." - - if [ "$count" -ge "$c_intervall" ]; then - substract=$(echo $c_intervall - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "|-> Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVALL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "|-> Removing $dir ..." - rm -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$(date +%Y-%m-%d-%H:%M) - destination_dir="$c_dest/${INTERVALL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | sort -n | tail -n 1) - - # only copy if a directory exists - if [ "$last_dir" ]; then - # echo cp -al "$last_dir" "$destination_dir" - cp $VERBOSE -al "$last_dir" "$destination_dir" - else - mkdir "$destination_dir" - fi - - if [ $? -ne 0 ]; then - errecho "Creating/cloning backup directory failed. Skipping backup." - continue - fi - - # - # the rsync part - # options stolen shameless from rsnapshot - # - - 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" - continue - fi - - echo "\=> Successfully finished backup of \"$name\"." -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" = 1 ]; then - wait -fi - -rm -f "$TMP" -echo "\o> Finished $WE." diff --git a/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.1/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/fehler b/software/ccollect/download/ccollect-0.1/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/share2/exclude b/software/ccollect/download/ccollect-0.1/conf/sources/share2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/share2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/share2/intervalls/daily b/software/ccollect/download/ccollect-0.1/conf/sources/share2/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/share2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/share2/source b/software/ccollect/download/ccollect-0.1/conf/sources/share2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/share2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.1/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.1/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/destination b/software/ccollect/download/ccollect-0.1/conf/sources/testshare/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/exclude b/software/ccollect/download/ccollect-0.1/conf/sources/testshare/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/intervalls/daily b/software/ccollect/download/ccollect-0.1/conf/sources/testshare/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/source b/software/ccollect/download/ccollect-0.1/conf/sources/testshare/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.1/conf/sources/testshare/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.1/release.sh b/software/ccollect/download/ccollect-0.1/release.sh deleted file mode 100644 index 4305fb4e..00000000 --- a/software/ccollect/download/ccollect-0.1/release.sh +++ /dev/null @@ -1 +0,0 @@ -tar cvfj ccollect-0.1.tar.bz2 --exclude=.git --exclude="conf/sources/*/destination/*" ccollect-0.1 diff --git a/software/ccollect/download/ccollect-0.2/.gitignore b/software/ccollect/download/ccollect-0.2/.gitignore deleted file mode 100644 index be216436..00000000 --- a/software/ccollect/download/ccollect-0.2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -conf/sources/*/destination/* -doc/old diff --git a/software/ccollect/download/ccollect-0.2/Makefile b/software/ccollect/download/ccollect-0.2/Makefile deleted file mode 100644 index 877a399a..00000000 --- a/software/ccollect/download/ccollect-0.2/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf - -prefix=/usr/packages/ccollect-0.2 -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -all: - @echo "Nothing to make, make install." - -documentation: - @asciidoc -n -o doc/ccollect.html doc/ccollect.text - -install: - $(INSTALL) -D -m 0755 -s $(CCOLLECT) $(destination) - $(LN) $(destination) $(path_destination) diff --git a/software/ccollect/download/ccollect-0.2/README b/software/ccollect/download/ccollect-0.2/README deleted file mode 100644 index 014f6179..00000000 --- a/software/ccollect/download/ccollect-0.2/README +++ /dev/null @@ -1,22 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml - -ccollect was inspired by rsnapshot [1], which had some problems: - - configuration parameters had to be TAB seperated - - you could not specify exclude lists differently for every source - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: htt://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.2/ccollect.sh b/software/ccollect/download/ccollect-0.2/ccollect.sh deleted file mode 100644 index f3322f9e..00000000 --- a/software/ccollect/download/ccollect-0.2/ccollect.sh +++ /dev/null @@ -1,344 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -WE=$(basename $0) -VERSION=0.2 -RELEASE="2006-01-13" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s/^/\[$name\] /" -} - -# -# Tell how to use us -# -usage() -{ - echo "$WE: [args] " - echo "" - echo " Nico Schottelius (nico-linux-ccollect schottelius.org) - 2005-12-06" - echo "" - echo " Backup data pseudo incremental" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parellize backup process" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/." - echo "" - echo " Version: $VERSION ($RELEASE, Black Friday Release)" - exit 0 -} - -# -# need at least intervall and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "Configuration \"$CCOLLECT_CONF\" not found." - exit 1 -fi - -# -# Filter arguments -# - -INTERVALL=$1; shift - -i=1 -no_shares=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval share_${no_shares}=\"$arg\" - no_shares=$[$no_shares+1] - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval share_${no_shares}=\"$arg\" - no_shares=$[$no_shares+1] - ;; - esac - fi - - i=$[$i+1] -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_shares=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval share_${no_shares}=\"$tmp\" - no_shares=$[$no_shares+1] - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_shares" -lt 1 ]; then - usage -else - echo "==> $WE: Beginning backup using intervall $INTERVALL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVALL="$CDEFAULTS/intervalls/$INTERVALL" -D_INTERVALL=$(cat $D_FILE_INTERVALL 2>/dev/null) - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_shares" ]; do - - # - # Get current share - # - eval name=\$share_${i} - i=$[$i+1] - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - $0 "$INTERVALL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - c_verbose="$backup/verbose" - c_rsync_extra="$backup/rsync_options" - - echo "Beginning to backup this source ..." - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # intervall definition: First try source specific, fallback to default - # - c_intervall="$(cat "$backup/intervalls/$INTERVALL" 2>/dev/null)" - - if [ -z "$c_intervall" ]; then - c_intervall=$D_INTERVALL - - if [ -z "$c_intervall" ]; then - echo "Default and source specific intervall missing. Skipping." - exit 1 - fi - fi - - # - # standard rsync options - # - VERBOSE="" - EXCLUDE="" - RSYNC_EXTRA="" - - # - # next configuration checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # exclude - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # extra options for rsync - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # verbose - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVALL.$DA - count=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | wc -l) - echo "Currently $count backup(s) exist, total keeping $c_intervall backup(s)." - - if [ "$count" -ge "$c_intervall" ]; then - substract=$(echo $c_intervall - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVALL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$(date +%Y-%m-%d-%H:%M) - destination_dir="$c_dest/${INTERVALL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "Hard linking..." - cp -al $VERBOSE "$last_dir" "$destination_dir" - else - echo "Creating $destination_dir" - mkdir "$destination_dir" - fi - - if [ $? -ne 0 ]; then - echo "Creating/cloning backup directory failed. Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync failed, backup may be broken (see rsync errors)" - exit 1 - fi - - echo "Successfully finished backup." - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "Waiting for child jobs to complete..." - wait -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.2/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/fehler b/software/ccollect/download/ccollect-0.2/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.2/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.2/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.2/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.2/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.2/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.2/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.2/doc/CHANGES b/software/ccollect/download/ccollect-0.2/doc/CHANGES deleted file mode 100644 index 0cef1b9d..00000000 --- a/software/ccollect/download/ccollect-0.2/doc/CHANGES +++ /dev/null @@ -1,7 +0,0 @@ -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.2/doc/TODO b/software/ccollect/download/ccollect-0.2/doc/TODO deleted file mode 100644 index a1b9e538..00000000 --- a/software/ccollect/download/ccollect-0.2/doc/TODO +++ /dev/null @@ -1,11 +0,0 @@ -- write a manpage - -DONE -- implement verbosity - o per source (-v to rsync) - o general, very verbose (set -x) -- write a simple manual -- implement parallel execution -- implement general log -- implement source specific log (canceled) -- the name prefix is currently somehow inconsistent diff --git a/software/ccollect/download/ccollect-0.2/doc/ccollect.html b/software/ccollect/download/ccollect-0.2/doc/ccollect.html deleted file mode 100644 index e2bb578e..00000000 --- a/software/ccollect/download/ccollect-0.2/doc/ccollect.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - - -ccollect - Installing, Configuring and Using - - - -
-
-

(pseudo) incremental backup -with different exclude lists -using hardlinks and rsync

-
-
-

1. Introduction

-
-

ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only /bin/sh needs to be -bourne shell compatibel (like dash, zsh or bash).

-

1.1. Why you can only backup TO localhost

-

While thinking about the design of ccollect, I thought about enabling -backup to remote hosts. Though this sounds like a nice feature -(Backup my notebook to the server now.), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers to a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure.

-
-

2. Requirements

-
-

2.1. Installing ccollect

-

For the installation, you need at least - - either cp and chmod or install - - for more comfort: 'make - - for rebuilding the generated documentation: additionally asciidoc

-

2.2. Using ccollect

-
When running ccollect, it requires the following tools installed:
    -
  • -

    -bc -

    -
  • -
  • -

    -cp with support for hard links (cp -al) -

    -
  • -
  • -

    -rsync -

    -
  • -
  • -

    -ssh (if you want to use rsync over ssh, which is recommened for security) -

    -
  • -
-
-

3. Installing

-
-

Either type make install or simply copy it to a directory in your -$PATH and execute chmod 0755 /path/to/ccollect.sh.

-
-

4. Configuring

-
-

4.1. Runtime options

-

ccollect looks for its configuration in /etc/ccollect or, if set, in -the directory specified by the variable $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.

-

4.2. General configuration

-

The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration.

-

All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files.

-

4.2.1. Intervall definition

-

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/<intervall name>.

-

The content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep.

-

Example:

-
-
-
   [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/
-   insgesamt 12
-   -rw-r--r--  1 nico users 3 2005-12-08 10:24 daily
-   -rw-r--r--  1 nico users 3 2005-12-08 11:36 monthly
-   -rw-r--r--  1 nico users 2 2005-12-08 11:36 weekly
-   [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/*
-   28
-   12
-   4
-
-

This means to keep 28 daily backups, 12 monthly backups and 4 weekly.

-

4.3. Source configuration

-

Each source configuration exists below $CCOLLECT_CONF/sources/$name or -/etc/ccollect/sources/$name.

-

The name you choose for the subdirectory describes the source.

-

Each source has at least the following files:

-
    -
  • -

    -source (a text file containing the rsync compatible path to backup) -

    -
  • -
  • -

    -destination (a link to the directory we should backup to) -

    -
  • -
-

Additionally a source may have the following files:

-
    -
  • -

    -verbose whether to be verbose (passes -v to rsync) -

    -
  • -
  • -

    -exclude exclude list for rsync. One exclude specification on each line. -

    -
  • -
  • -

    -`rsync_options' extra options to pass to rsync -

    -
  • -
-

Example:

-
-
-
   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2
-   insgesamt 12
-   lrwxrwxrwx  1 nico users   20 2005-11-17 16:44 destination -> /home/nico/backupdir
-   -rw-r--r--  1 nico users   62 2005-12-07 17:43 exclude
-   drwxr-xr-x  2 nico users 4096 2005-12-07 17:38 intervalls
-   -rw-r--r--  1 nico users   15 2005-11-17 16:44 source
-   [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2/intervalls
-   insgesamt 4
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily
-   5
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source
-   /home/nico/vpn
-
-

4.3.1. Detailled description of "source"

-

source describes a rsync compatible source (one line only).

-

For instance backup_user@foreign_host:/home/server/video. -To use the rsync protocol without the ssh-tunnel, use -rsync::USER@HOST/SRC. For more information have a look at rsync(1).

-

4.3.2. Detailled description of "verbose"

-

verbose tells ccollect that the log should contain verbose messages.

-

If this file exists in the source specification -v will be passed to rsync.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose
-
-

4.3.3. Detailled description of "exclude"

-

exclude specifies a list of paths to exclude. The entries are new line (\n) -seperated.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   something with spaces is not a problem
-
-

4.3.4. Detailled description of "destination"

-

destination must be a link to the destination directory.

-

Example:

-
-
-
   [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination
-   lrwxrwxrwx  1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir
-
-

4.3.5. Detailled description of "intervalls/"

-

When you create a subdirectory intervalls/ within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall.

-

Example:

-
-
-
   [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/
-   insgesamt 8
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   -rw-r--r--  1 nico users 3 2005-12-14 11:33 yearly
-   [11:37] zaphodbeeblebrox:ccollect-0.2% cat  conf/sources/testsource2/intervalls/*
-   5
-   20
-
-

4.3.6. Detailled description of "rsync_options"

-

When you create the file "rsync_options" below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you may specify a rsync-passwordfile for automatic backup over -the rsync-protocoll.

-

Example:

-
-
-
   [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options
-   --password-file=/home/user/backup/protected_password_file
-
-
-

5. Examples

-
-

5.1. A backup host configuration from scratch

-
-
-
srwali01:~# mkdir /etc/ccollect
-srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/
-srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich
-srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich
-srwali01:~# cd /etc/ccollect/
-srwali01:/etc/ccollect# mkdir sources
-srwali01:/etc/ccollect# cd sources/
-srwali01:/etc/ccollect/sources# ls
-srwali01:/etc/ccollect/sources# mkdir local-root
-srwali01:/etc/ccollect/sources# cd local-root/
-srwali01:/etc/ccollect/sources/local-root# echo / > source
-srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> EOF
-srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination
-srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root
-srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root
-/o> ccollect.sh: Beginning backup using intervall taeglich
-/=> Beginning to backup "local-root" ...
-|-> 0 backup(s) already exist, keeping 28 backup(s).
-
-

After that, I added some more sources:

-
-
-
srwali01:~# cd /etc/ccollect/sources
-srwali01:/etc/ccollect/sources# mkdir windos-wl6
-srwali01:/etc/ccollect/sources# cd windos-wl6/
-srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source
-srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination
-srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6
-srwali01:/etc/ccollect/sources/windos-wl6# cd ..
-srwali01:/etc/ccollect/sources# mkdir windos-daten
-srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source
-srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination
-srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten
-
-# Now add some remote source
-srwali01:/etc/ccollect/sources/windos-daten# cd ..
-srwali01:/etc/ccollect/sources# mkdir srwali03
-srwali01:/etc/ccollect/sources# cd srwali03/
-srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> /home
-> EOF
-srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source
-srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination
-srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03
-
-

5.2. Using hard-links requires less disk space

-
-
-
[10:53] srsyg01:sources% du -sh ~/backupdir
-4.6M    /home/nico/backupdir
-[10:53] srsyg01:sources% du -sh ~/backupdir/*
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:52.28456
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28484
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28507
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28531
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28554
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28577
-
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/
-186M    /mnt/hdbackup/wl6/
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588
-
-
- - - diff --git a/software/ccollect/download/ccollect-0.2/doc/ccollect.text b/software/ccollect/download/ccollect-0.2/doc/ccollect.text deleted file mode 100644 index 055d77d5..00000000 --- a/software/ccollect/download/ccollect-0.2/doc/ccollect.text +++ /dev/null @@ -1,312 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -v0.2, 2005-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'zsh' or 'bash'). - - -Why you can only backup TO localhost -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While thinking about the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers *to* a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ - -For the installation, you need at least - - either 'cp' and 'chmod' or 'install - - for more comfort: 'make' - - for rebuilding the generated documentation: additionally 'asciidoc' - - -Using ccollect -~~~~~~~~~~~~~~ -.When running ccollect, it requires the following tools installed: - - `bc` - - `cp` with support for hard links ('cp -al') - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$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. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration. - -All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files. - - -Intervall definition -^^^^^^^^^^^^^^^^^^^^ -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 content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists below '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source has at least the following files: - - - `source` (a text file containing the rsync compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to rsync) - - `exclude` exclude list for rsync. One exclude specification on each line. - - `rsync_options' extra options to pass to rsync - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervalls - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - -Detailled description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a rsync compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the rsync protocol without the ssh-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at rsync(1). - -Detailled description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailled description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are new line (\n) -seperated. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailled description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - - -Detailled description of "intervalls/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create a subdirectory `intervalls/` within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall. - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/* - 5 - 20 --------------------------------------------------------------------------------- - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When you create the file "rsync_options" below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you may specify a rsync-passwordfile for automatic backup over -the rsync-protocoll. - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using intervall taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.2/release.sh b/software/ccollect/download/ccollect-0.2/release.sh deleted file mode 100644 index 62ea10b2..00000000 --- a/software/ccollect/download/ccollect-0.2/release.sh +++ /dev/null @@ -1,19 +0,0 @@ -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" diff --git a/software/ccollect/download/ccollect-0.3.1/.gitignore b/software/ccollect/download/ccollect-0.3.1/.gitignore deleted file mode 100644 index be216436..00000000 --- a/software/ccollect/download/ccollect-0.3.1/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -conf/sources/*/destination/* -doc/old diff --git a/software/ccollect/download/ccollect-0.3.1/COPYING b/software/ccollect/download/ccollect-0.3.1/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.3.1/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.3.1/Makefile b/software/ccollect/download/ccollect-0.3.1/Makefile deleted file mode 100644 index d6fac7d4..00000000 --- a/software/ccollect/download/ccollect-0.3.1/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf - -prefix=/usr/packages/ccollect-0.2 -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=creme.schottelius.org -dir=www/org/schottelius/linux/ccollect -docdir=$(dir)/doc - -# -# End user targets -# -all: - @echo "Nothing to make, make install." - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 -s $(CCOLLECT) $(destination) - -documentation: - @echo "Generating HTML-documentation" - @asciidoc -n -o doc/ccollect.html doc/ccollect.text - -# -# Developer targets -# -update: - @cg-update creme - -push-work: - @cg-push creme - @cg-push main - -publish-doc: documentation - @chmod a+r doc/ccollect.html - @scp doc/ccollect.html doc/ccollect.text $(host):$(docdir) - diff --git a/software/ccollect/download/ccollect-0.3.1/README b/software/ccollect/download/ccollect-0.3.1/README deleted file mode 100644 index c0857d2b..00000000 --- a/software/ccollect/download/ccollect-0.3.1/README +++ /dev/null @@ -1,23 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml - -ccollect was inspired by rsnapshot [1], which had some problems: - - configuration parameters had to be TAB seperated - - you could not specify exclude lists differently for every source - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.3.1/ccollect.sh b/software/ccollect/download/ccollect-0.3.1/ccollect.sh deleted file mode 100644 index 5bbea55b..00000000 --- a/software/ccollect/download/ccollect-0.3.1/ccollect.sh +++ /dev/null @@ -1,402 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.3.1 -RELEASE="2006-XX-XX" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s/^/\[$name\] /" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo "" - echo " On 2005-12-05 ccollect was written by Nico Schottelius." - echo "" - echo " This is version $VERSION, released at ${RELEASE}." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least intervall and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (set \$CCOLLECT_CONF corectly?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVALL=$1; shift -i=1 -no_shares=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_shares=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval share_${no_shares}=\"$tmp\" - no_shares=$(($no_shares+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_shares" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using intervall $INTERVALL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVALL="$CDEFAULTS/intervalls/$INTERVALL" -D_INTERVALL=$(cat $D_FILE_INTERVALL 2>/dev/null) - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." -fi - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_shares" ]; do - - # - # Get current share - # - eval name=\$share_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - $0 "$INTERVALL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - echo "Beginning to backup this source ..." - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # intervall definition: First try source specific, fallback to default - # - c_intervall="$(cat "$backup/intervalls/$INTERVALL" 2>/dev/null)" - - if [ -z "$c_intervall" ]; then - c_intervall=$D_INTERVALL - - if [ -z "$c_intervall" ]; then - echo "Default and source specific intervall missing. Skipping." - exit 1 - fi - fi - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - # - # next configuration checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # pre_exec - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - $c_pre_exec - echo "Finished ${c_pre_exec}." - fi - - # exclude - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # extra options for rsync - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # verbosity for rsync - if [ -f "$c_verbose" ]; then - 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" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVALL.$DA - count=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | wc -l) - echo "Currently $count backup(s) exist, total keeping $c_intervall backup(s)." - - if [ "$count" -ge "$c_intervall" ]; then - substract=$(echo $c_intervall - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVALL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$(date +%Y-%m-%d-%H:%M) - destination_dir="$c_dest/${INTERVALL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "Hard linking..." - cp -al $VVERBOSE "$last_dir" "$destination_dir" - else - echo "Creating $destination_dir" - mkdir $VVERBOSE "$destination_dir" - fi - - if [ $? -ne 0 ]; then - echo "Creating/cloning backup directory failed. Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync failed, backup may be broken (see rsync errors)" - exit 1 - fi - - echo "Successfully finished backup." - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "Executing $c_post_exec ..." - "$c_post_exec" - echo "Finished ${c_post_exec}." - fi - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "Finished ${CPOSTEXEC}." -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.3.1/conf/defaults/post_exec deleted file mode 100644 index 2192fecd..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. -###################################################################### diff --git a/software/ccollect/download/ccollect-0.3.1/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.3.1/conf/defaults/pre_exec deleted file mode 100644 index eb983c8e..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/defaults/pre_exec +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.3.1/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/fehler b/software/ccollect/download/ccollect-0.3.1/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.3.1/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.3.1/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/destination deleted file mode 120000 index 4d5c4a0d..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.3.1/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.3.1/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.3.1/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.3.1/doc/CHANGES b/software/ccollect/download/ccollect-0.3.1/doc/CHANGES deleted file mode 100644 index 7350e0fc..00000000 --- a/software/ccollect/download/ccollect-0.3.1/doc/CHANGES +++ /dev/null @@ -1,17 +0,0 @@ -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.3.1/doc/TODO b/software/ccollect/download/ccollect-0.3.1/doc/TODO deleted file mode 100644 index 7374b26e..00000000 --- a/software/ccollect/download/ccollect-0.3.1/doc/TODO +++ /dev/null @@ -1,34 +0,0 @@ -- update documentation: - - exit pre/post exec -> error codes (after implementation!) - - summary support -> release 0.3.1 -- write mkccollectconfig - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o dialog based? - -- implement pre- and post-exec commands - o what to do with return values? - -- Documentation - - write/generate a manpage - - rsync_options \n seperated - - -DONE -- implement verbosity - o per source (-v to rsync) - o general, very verbose (set -x) -- implement parallel execution -- implement general log -- implement source specific log (canceled) -- the name prefix is currently somehow inconsistent -- Documentation - - rsync_options, example paswd - - write a simple manual - - Hints section - - add note to --exclude=/proc/ vs. --exclude=/proc/* -- implement pre- and post-exec commands - o For the general backup process - o source specific diff --git a/software/ccollect/download/ccollect-0.3.1/doc/ccollect.html b/software/ccollect/download/ccollect-0.3.1/doc/ccollect.html deleted file mode 100644 index 615cf37f..00000000 --- a/software/ccollect/download/ccollect-0.3.1/doc/ccollect.html +++ /dev/null @@ -1,795 +0,0 @@ - - - - - - -ccollect - Installing, Configuring and Using - - - -
-
-

(pseudo) incremental backup -with different exclude lists -using hardlinks and rsync

-
-
-

1. Introduction

-
-

ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only /bin/sh needs to be -bourne shell compatibel (like dash, ksh, zsh, bash, …).

-

1.1. Why you can only backup TO localhost

-

While thinking about the design of ccollect, I thought about enabling -backup to remote hosts. Though this sounds like a nice feature -(Backup my notebook to the server now.), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers to a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure.

-
-

2. Requirements

-
-

2.1. Installing ccollect

-

For the installation, you need at least

-
    -
  • -

    -either cp and chmod or install -

    -
  • -
  • -

    -for more comfort: make -

    -
  • -
  • -

    -for rebuilding the generated documentation: additionally asciidoc -

    -
  • -
-

2.2. Using ccollect

-
Running ccollect requires the following tools installed:
    -
  • -

    -bc -

    -
  • -
  • -

    -cp with support for hard links (cp -al) -

    -
  • -
  • -

    -rsync -

    -
  • -
  • -

    -ssh (if you want to use rsync over ssh, which is recommened for security) -

    -
  • -
-
-

3. Installing

-
-

Either type make install or simply copy it to a directory in your -$PATH and execute chmod 0755 /path/to/ccollect.sh.

-
-

4. Configuring

-
-

4.1. Runtime options

-

ccollect looks for its configuration in /etc/ccollect or, if set, in -the directory specified by the variable $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.

-

4.2. General configuration

-

The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration.

-

All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files.

-

4.2.1. Intervall definition

-

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/<intervall name>.

-

The content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep.

-

Example:

-
-
-
   [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/
-   insgesamt 12
-   -rw-r--r--  1 nico users 3 2005-12-08 10:24 daily
-   -rw-r--r--  1 nico users 3 2005-12-08 11:36 monthly
-   -rw-r--r--  1 nico users 2 2005-12-08 11:36 weekly
-   [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/*
-   28
-   12
-   4
-
-

This means to keep 28 daily backups, 12 monthly backups and 4 weekly.

-

4.2.2. General pre- and post-execution

-

If you add $CCOLLECT_CONF/defaults/pre_exec or -/etc/ccollect/defaults/pre_exec (same with post_exec), ccollect -will start pre_exec before the whole backup process and -post_exec after backup of all sources is done.

-

Example:

-
-
-
[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/
-[13:00] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo '' > /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# cp /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec
-
-

4.3. Source configuration

-

Each source configuration exists below $CCOLLECT_CONF/sources/$name or -/etc/ccollect/sources/$name.

-

The name you choose for the subdirectory describes the source.

-

Each source has at least the following files:

-
    -
  • -

    -source (a text file containing the rsync compatible path to backup) -

    -
  • -
  • -

    -destination (a link to the directory we should backup to) -

    -
  • -
-

Additionally a source may have the following files:

-
    -
  • -

    -verbose whether to be verbose (passes -v to rsync) -

    -
  • -
  • -

    -very_verbose be very verbose (-v also for mkdir, cp, rm) -

    -
  • -
  • -

    -summary create a transfer summary when rsync finished -

    -
  • -
  • -

    -exclude exclude list for rsync. newline (\n) seperated list. -

    -
  • -
  • -

    -rsync_options' extra options to pass to `rsync -

    -
  • -
  • -

    -pre_exec program to execute before backuping this source -

    -
  • -
  • -

    -post_exec program to execute after backuping this source -

    -
  • -
-

Example:

-
-
-
   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2
-   insgesamt 12
-   lrwxrwxrwx  1 nico users   20 2005-11-17 16:44 destination -> /home/nico/backupdir
-   -rw-r--r--  1 nico users   62 2005-12-07 17:43 exclude
-   drwxr-xr-x  2 nico users 4096 2005-12-07 17:38 intervalls
-   -rw-r--r--  1 nico users   15 2005-11-17 16:44 source
-   [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2/intervalls
-   insgesamt 4
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily
-   5
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source
-   /home/nico/vpn
-
-

4.3.1. Detailled description of "source"

-

source describes a rsync compatible source (one line only).

-

For instance backup_user@foreign_host:/home/server/video. -To use the rsync protocol without the ssh-tunnel, use -rsync::USER@HOST/SRC. For more information have a look at rsync(1).

-

4.3.2. Detailled description of "verbose"

-

verbose tells ccollect that the log should contain verbose messages.

-

If this file exists in the source specification -v will be passed to rsync.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose
-
-

4.3.3. Detailled description of "very_verbose"

-

very_verbose tells ccollect that it should log very verbose.

-

If this file exists in the source specification -v will be passed to -rsync, cp, rm and mkdir.

-

Example:

-
-
-
   [23:67] nohost:~% touch conf/sources/testsource1/very_verbose
-
-

4.3.4. Detailled description of "summary"

-

If you create the file summary below the source definition, -ccollect will present you with a nice summary at the end.

-
-
-
backup:~# touch /etc/ccollect/sources/root/summary
-backup:~# ccollect.sh werktags root
-==> ccollect.sh: Beginning backup using intervall werktags <==
-[root] Beginning to backup this source ...
-[root] Currently 3 backup(s) exist, total keeping 50 backup(s).
-[root] Beginning to backup, this may take some time...
-[root] Hard linking...
-[root] Transferring files...
-[root]
-[root] Number of files: 84183
-[root] Number of files transferred: 32
-[root] Total file size: 26234080536 bytes
-[root] Total transferred file size: 9988252 bytes
-[root] Literal data: 9988252 bytes
-[root] Matched data: 0 bytes
-[root] File list size: 3016771
-[root] File list generation time: 1.786 seconds
-[root] File list transfer time: 0.000 seconds
-[root] Total bytes sent: 13009119
-[root] Total bytes received: 2152
-[root]
-[root] sent 13009119 bytes  received 2152 bytes  2891393.56 bytes/sec
-[root] total size is 26234080536  speedup is 2016.26
-[root] Successfully finished backup.
-==> Finished ccollect.sh <==
-
-

You could also combine it with verbose or very_verbose, but they -already print some statistics (but not all / the same as presented by -summary).

-

4.3.5. Detailled description of "exclude"

-

exclude specifies a list of paths to exclude. The entries are new line (\n) -seperated.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   something with spaces is not a problem
-
-

4.3.6. Detailled description of "destination"

-

destination must be a link to the destination directory.

-

Example:

-
-
-
   [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination
-   lrwxrwxrwx  1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir
-
-

4.3.7. Detailled description of "intervalls/"

-

When you create a subdirectory intervalls/ within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall.

-

Example:

-
-
-
   [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/
-   insgesamt 8
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   -rw-r--r--  1 nico users 3 2005-12-14 11:33 yearly
-   [11:37] zaphodbeeblebrox:ccollect-0.2% cat  conf/sources/testsource2/intervalls/*
-   5
-   20
-
-

4.3.8. Detailled description of "rsync_options"

-

When you create the file rsync_options below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("—progress") or which -password-file ("—password-file") -to use for automatic backup over the rsync-protocol.

-

Example:

-
-
-
   [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options
-   --password-file=/home/user/backup/protected_password_file
-
-

4.3.9. Detailled description of "pre_exec" and "post_exec"

-

When you create pre_exec and / or post_exec below your source -configuration, ccollect will execute this command before, -respective after doing the backup for this specific source. -If you want to have pre-/post-exec before and after all -backups, see above for general configuration.

-

Example:

-
-
-
[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec
-#!/bin/sh
-
-# Show whats free before
-df -h
-[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec
-#!/bin/sh
-
-# Show whats free after
-df -h
-
-
-

5. Hints

-
-

5.1. Using rsync protocol without ssh

-

When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify user@host::share in source). You may wish to use -rsync_options to specify a password file to use for automatic backup.

-

Example:

-
-
-
backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source
-backup@webserver::backup-share
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options
---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password
-this_is_the_rsync_password
-
-

This hint was reported by Daniel Aubry.

-

5.2. Not-excluding top-level directories

-

When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/*" or "/mnt/*" -instead ccollect will backup empty directories.

-
- - - -
-
Note
-
-

When those directories contain hidden files -(those beginning with a dot (.)), -they will still be transferred!

-
-
-

This hint was reported by Marcus Wagner.

-

5.3. Re-using already created rsync-backups

-

If you used rsync directly before you use ccollect, you can -use this old backup as initial backup for ccollect: You -simply move it into a subdirectory named "intervall.0".

-

Example:

-
-
-
backup:/home/backup/web1# ls
-bin   dev  etc   initrd  lost+found  mnt  root  srv  usr  vmlinuz
-boot  doc  home  lib     media       opt  sbin  tmp  var  vmlinuz.old
-
-backup:/home/backup/web1# mkdir daily.0
-
-# ignore error about copying to itself
-backup:/home/backup/web1# mv * daily.0 2>/dev/null
-
-backup:/home/backup/web1# ls
-daily.0
-
-

Now you could use /home/backup/web1 as the destination for the backup.

-
- - - -
-
Note
-
-

Do not name the first backup something like "daily.initial", but use -the "0" (or some very low number, at least lower than the current year) -as extension. ccollect uses sort to find the latest backup. ccollect -itself uses intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID. This notation will -always be before "daily.initial", as numbers are earlier in the list -which is produced by sort. So, if you have a directory named "daily.initial", -ccollect will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete.

-
-
-

5.4. Using pre_/post_exec

-

Your pre_/post_exec script does not need to be a script, you can also -use a link to

-
    -
  • -

    -an existing program -

    -
  • -
  • -

    -an already written script -

    -
  • -
-

The only requirement is that it is executable.

-
-

6. F.A.Q.

-
-

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)

-

6.3. Why does ccollect say "Permission denied" with my pre-/postexec script?

-

The most common error is to not give your script the correct -permissions. Try chmod 0755 /etc/ccollect/sources/yoursource/*_exec.

-
-

7. Examples

-
-

7.1. A backup host configuration from scratch

-
-
-
srwali01:~# mkdir /etc/ccollect
-srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/
-srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich
-srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich
-srwali01:~# cd /etc/ccollect/
-srwali01:/etc/ccollect# mkdir sources
-srwali01:/etc/ccollect# cd sources/
-srwali01:/etc/ccollect/sources# ls
-srwali01:/etc/ccollect/sources# mkdir local-root
-srwali01:/etc/ccollect/sources# cd local-root/
-srwali01:/etc/ccollect/sources/local-root# echo / > source
-srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> EOF
-srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination
-srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root
-srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root
-/o> ccollect.sh: Beginning backup using intervall taeglich
-/=> Beginning to backup "local-root" ...
-|-> 0 backup(s) already exist, keeping 28 backup(s).
-
-

After that, I added some more sources:

-
-
-
srwali01:~# cd /etc/ccollect/sources
-srwali01:/etc/ccollect/sources# mkdir windos-wl6
-srwali01:/etc/ccollect/sources# cd windos-wl6/
-srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source
-srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination
-srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6
-srwali01:/etc/ccollect/sources/windos-wl6# cd ..
-srwali01:/etc/ccollect/sources# mkdir windos-daten
-srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source
-srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination
-srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten
-
-# Now add some remote source
-srwali01:/etc/ccollect/sources/windos-daten# cd ..
-srwali01:/etc/ccollect/sources# mkdir srwali03
-srwali01:/etc/ccollect/sources# cd srwali03/
-srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> /home
-> EOF
-srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source
-srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination
-srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03
-
-

7.2. Using hard-links requires less disk space

-
-
-
[10:53] srsyg01:sources% du -sh ~/backupdir
-4.6M    /home/nico/backupdir
-[10:53] srsyg01:sources% du -sh ~/backupdir/*
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:52.28456
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28484
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28507
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28531
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28554
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28577
-
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/
-186M    /mnt/hdbackup/wl6/
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588
-
-
- - - diff --git a/software/ccollect/download/ccollect-0.3.1/doc/ccollect.text b/software/ccollect/download/ccollect-0.3.1/doc/ccollect.text deleted file mode 100644 index 91593473..00000000 --- a/software/ccollect/download/ccollect-0.3.1/doc/ccollect.text +++ /dev/null @@ -1,530 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.3.1, for ccollect 0.3.1, Initial Version from 2005-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup TO localhost -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While thinking about the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers *to* a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ - -For the installation, you need at least - - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools installed: - - `bc` - - `cp` with support for hard links ('cp -al') - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$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. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration. - -All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files. - - -Intervall definition -^^^^^^^^^^^^^^^^^^^^ -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 content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -Example: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# cp /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists below '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source has at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `cp`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperated list. - - `rsync_options' extra options to pass to `rsync` - - - `pre_exec` program to execute before backuping this source - - `post_exec` program to execute after backuping this source - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervalls - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - -Detailled description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at `rsync`(1). - -Detailled description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - -Detailled description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbose. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `cp`, `rm` and `mkdir`. - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - -Detailled description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` below the source definition, -`ccollect` will present you with a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using intervall werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but they -already print some statistics (but not all / the same as presented by -`summary`). - - -Detailled description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are new line (\n) -seperated. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailled description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - - -Detailled description of "intervalls/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create a subdirectory `intervalls/` within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall. - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/* - 5 - 20 --------------------------------------------------------------------------------- - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When you create the file `rsync_options` below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress") or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When you create `pre_exec` and / or `post_exec` below your source -configuration, `ccollect` will execute this command before, -respective after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not-excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'intervall'.0". - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you could use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some very low number, at least lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -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 - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is to not give your script the correct -permissions. Try `chmod 0755 '/etc/ccollect/sources/yoursource/*_exec'`. - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using intervall taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.3.1/release.sh b/software/ccollect/download/ccollect-0.3.1/release.sh deleted file mode 100644 index f5e5642c..00000000 --- a/software/ccollect/download/ccollect-0.3.1/release.sh +++ /dev/null @@ -1,23 +0,0 @@ -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.3.2/.gitignore b/software/ccollect/download/ccollect-0.3.2/.gitignore deleted file mode 100644 index be216436..00000000 --- a/software/ccollect/download/ccollect-0.3.2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -conf/sources/*/destination/* -doc/old diff --git a/software/ccollect/download/ccollect-0.3.2/COPYING b/software/ccollect/download/ccollect-0.3.2/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.3.2/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.3.2/Makefile b/software/ccollect/download/ccollect-0.3.2/Makefile deleted file mode 100644 index d6fac7d4..00000000 --- a/software/ccollect/download/ccollect-0.3.2/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf - -prefix=/usr/packages/ccollect-0.2 -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=creme.schottelius.org -dir=www/org/schottelius/linux/ccollect -docdir=$(dir)/doc - -# -# End user targets -# -all: - @echo "Nothing to make, make install." - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 -s $(CCOLLECT) $(destination) - -documentation: - @echo "Generating HTML-documentation" - @asciidoc -n -o doc/ccollect.html doc/ccollect.text - -# -# Developer targets -# -update: - @cg-update creme - -push-work: - @cg-push creme - @cg-push main - -publish-doc: documentation - @chmod a+r doc/ccollect.html - @scp doc/ccollect.html doc/ccollect.text $(host):$(docdir) - diff --git a/software/ccollect/download/ccollect-0.3.2/README b/software/ccollect/download/ccollect-0.3.2/README deleted file mode 100644 index c0857d2b..00000000 --- a/software/ccollect/download/ccollect-0.3.2/README +++ /dev/null @@ -1,23 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml - -ccollect was inspired by rsnapshot [1], which had some problems: - - configuration parameters had to be TAB seperated - - you could not specify exclude lists differently for every source - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.3.2/ccollect.sh b/software/ccollect/download/ccollect-0.3.2/ccollect.sh deleted file mode 100644 index d8845948..00000000 --- a/software/ccollect/download/ccollect-0.3.2/ccollect.sh +++ /dev/null @@ -1,413 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.3.2 -RELEASE="2006-02-05" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s/^/\[$name\] /" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least intervall and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (set \$CCOLLECT_CONF corectly?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVALL=$1; shift -i=1 -no_shares=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_shares=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval share_${no_shares}=\"$tmp\" - no_shares=$(($no_shares+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_shares" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using intervall $INTERVALL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVALL="$CDEFAULTS/intervalls/$INTERVALL" -D_INTERVALL=$(cat $D_FILE_INTERVALL 2>/dev/null) - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." -fi - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_shares" ]; do - - # - # Get current share - # - eval name=\$share_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - $0 "$INTERVALL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - begin=$(date) - begin_s=$(date +%s) - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # intervall definition: First try source specific, fallback to default - # - c_intervall="$(cat "$backup/intervalls/$INTERVALL" 2>/dev/null)" - - if [ -z "$c_intervall" ]; then - c_intervall=$D_INTERVALL - - if [ -z "$c_intervall" ]; then - echo "Default and source specific intervall missing. Skipping." - exit 1 - fi - fi - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - # - # next configuration checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # pre_exec - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - $c_pre_exec - echo "Finished ${c_pre_exec}." - fi - - # exclude - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # extra options for rsync - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # verbosity for rsync - if [ -f "$c_verbose" ]; then - 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" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVALL.$DA - count=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | wc -l) - echo "Currently $count backup(s) exist, total keeping $c_intervall backup(s)." - - if [ "$count" -ge "$c_intervall" ]; then - substract=$(echo $c_intervall - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVALL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$(date +%Y-%m-%d-%H:%M) - destination_dir="$c_dest/${INTERVALL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "Hard linking..." - cp -al $VVERBOSE "$last_dir" "$destination_dir" - else - echo "Creating $destination_dir" - mkdir $VVERBOSE "$destination_dir" - fi - - if [ $? -ne 0 ]; then - echo "Creating/cloning backup directory failed. Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync reported an error. The backup may be broken (see rsync errors)" - exit 1 - fi - - echo "$(date) Successfully finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$(date) Executing $c_post_exec ..." - "$c_post_exec" - echo "$(date) Finished ${c_post_exec}." - fi - - end_s=$(date +%s) - - full_seconds=$(echo "$end_s - $begin_s" | bc -l) - hours=$(echo $full_seconds / 3600 | bc) - seconds=$(echo "$full_seconds - ($hours * 3600)" | bc) - minutes=$(echo $seconds / 60 | bc) - seconds=$(echo "$seconds - ($minutes * 60)" | bc) - - echo "Backup lasted: ${hours}:$minutes:$seconds (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "Finished ${CPOSTEXEC}." -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.3.2/conf/defaults/post_exec deleted file mode 100644 index 2192fecd..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. -###################################################################### diff --git a/software/ccollect/download/ccollect-0.3.2/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.3.2/conf/defaults/pre_exec deleted file mode 100644 index eb983c8e..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/defaults/pre_exec +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.3.2/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/fehler b/software/ccollect/download/ccollect-0.3.2/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.3.2/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.3.2/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/destination deleted file mode 120000 index 4d5c4a0d..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.3.2/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.3.2/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.3.2/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.3.2/doc/CHANGES b/software/ccollect/download/ccollect-0.3.2/doc/CHANGES deleted file mode 100644 index 5ec56de5..00000000 --- a/software/ccollect/download/ccollect-0.3.2/doc/CHANGES +++ /dev/null @@ -1,20 +0,0 @@ -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.3.2/doc/TODO b/software/ccollect/download/ccollect-0.3.2/doc/TODO deleted file mode 100644 index 25f20789..00000000 --- a/software/ccollect/download/ccollect-0.3.2/doc/TODO +++ /dev/null @@ -1,34 +0,0 @@ -- update documentation: - - exit pre/post exec -> error codes (after implementation!) (in 0.4) -- write mkccollectconfig - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based - -- implement pre- and post-exec commands - o what to do with return values? - -> Check them, abort on error - -- Documentation - - write/generate a manpage - - -DONE -- implement verbosity - o per source (-v to rsync) - o general, very verbose (set -x) -- implement parallel execution -- implement general log -- implement source specific log (canceled) -- the name prefix is currently somehow inconsistent -- Documentation - - rsync_options, example paswd - - write a simple manual - - Hints section - - add note to --exclude=/proc/ vs. --exclude=/proc/* - - rsync_options \n seperated -- implement pre- and post-exec commands - o For the general backup process - o source specific diff --git a/software/ccollect/download/ccollect-0.3.2/doc/ccollect.html b/software/ccollect/download/ccollect-0.3.2/doc/ccollect.html deleted file mode 100644 index 102acfa0..00000000 --- a/software/ccollect/download/ccollect-0.3.2/doc/ccollect.html +++ /dev/null @@ -1,841 +0,0 @@ - - - - - - -ccollect - Installing, Configuring and Using - - - -
-
-

(pseudo) incremental backup -with different exclude lists -using hardlinks and rsync

-
-
-

1. Introduction

-
-

ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only /bin/sh needs to be -bourne shell compatibel (like dash, ksh, zsh, bash, …).

-

1.1. Why you can only backup TO localhost

-

While thinking about the design of ccollect, I thought about enabling -backup to remote hosts. Though this sounds like a nice feature -(Backup my notebook to the server now.), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers to a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure.

-
-

2. Requirements

-
-

2.1. Installing ccollect

-

For the installation, you need at least

-
    -
  • -

    -either cp and chmod or install -

    -
  • -
  • -

    -for more comfort: make -

    -
  • -
  • -

    -for rebuilding the generated documentation: additionally asciidoc -

    -
  • -
-

2.2. Using ccollect

-
Running ccollect requires the following tools installed:
    -
  • -

    -bc -

    -
  • -
  • -

    -cp with support for hard links (cp -al) -

    -
  • -
  • -

    -date -

    -
  • -
  • -

    -rsync -

    -
  • -
  • -

    -ssh (if you want to use rsync over ssh, which is recommened for security) -

    -
  • -
-
-

3. Installing

-
-

Either type make install or simply copy it to a directory in your -$PATH and execute chmod 0755 /path/to/ccollect.sh.

-
-

4. Configuring

-
-

4.1. Runtime options

-

ccollect looks for its configuration in /etc/ccollect or, if set, in -the directory specified by the variable $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.

-

4.2. General configuration

-

The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration.

-

All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files.

-

4.2.1. Intervall definition

-

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/<intervall name>.

-

The content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep.

-

Example:

-
-
-
   [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/
-   insgesamt 12
-   -rw-r--r--  1 nico users 3 2005-12-08 10:24 daily
-   -rw-r--r--  1 nico users 3 2005-12-08 11:36 monthly
-   -rw-r--r--  1 nico users 2 2005-12-08 11:36 weekly
-   [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/*
-   28
-   12
-   4
-
-

This means to keep 28 daily backups, 12 monthly backups and 4 weekly.

-

4.2.2. General pre- and post-execution

-

If you add $CCOLLECT_CONF/defaults/pre_exec or -/etc/ccollect/defaults/pre_exec (same with post_exec), ccollect -will start pre_exec before the whole backup process and -post_exec after backup of all sources is done.

-

The following Example describes how to report free disk space in -human readable format before and after the whole backup process:

-
-
-
[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/
-[13:00] hydrogenium:~# echo '!/bin/sh' >  /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo ''         >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo 'df -h'    >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec
-
-

4.3. Source configuration

-

Each source configuration exists below $CCOLLECT_CONF/sources/$name or -/etc/ccollect/sources/$name.

-

The name you choose for the subdirectory describes the source.

-

Each source has at least the following files:

-
    -
  • -

    -source (a text file containing the rsync compatible path to backup) -

    -
  • -
  • -

    -destination (a link to the directory we should backup to) -

    -
  • -
-

Additionally a source may have the following files:

-
    -
  • -

    -verbose whether to be verbose (passes -v to rsync) -

    -
  • -
  • -

    -very_verbose be very verbose (-v also for mkdir, cp, rm) -

    -
  • -
  • -

    -summary create a transfer summary when rsync finished -

    -
  • -
  • -

    -exclude exclude list for rsync. newline (\n) seperated list. -

    -
  • -
  • -

    -rsync_options' extra options to pass to `rsync -

    -
  • -
  • -

    -pre_exec program to execute before backuping this source -

    -
  • -
  • -

    -post_exec program to execute after backuping this source -

    -
  • -
-

Example:

-
-
-
   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2
-   insgesamt 12
-   lrwxrwxrwx  1 nico users   20 2005-11-17 16:44 destination -> /home/nico/backupdir
-   -rw-r--r--  1 nico users   62 2005-12-07 17:43 exclude
-   drwxr-xr-x  2 nico users 4096 2005-12-07 17:38 intervalls
-   -rw-r--r--  1 nico users   15 2005-11-17 16:44 source
-   [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2/intervalls
-   insgesamt 4
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily
-   5
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source
-   /home/nico/vpn
-
-

4.3.1. Detailled description of "source"

-

source describes a rsync compatible source (one line only).

-

For instance backup_user@foreign_host:/home/server/video. -To use the rsync protocol without the ssh-tunnel, use -rsync::USER@HOST/SRC. For more information have a look at rsync(1).

-

4.3.2. Detailled description of "verbose"

-

verbose tells ccollect that the log should contain verbose messages.

-

If this file exists in the source specification -v will be passed to rsync.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose
-
-

4.3.3. Detailled description of "very_verbose"

-

very_verbose tells ccollect that it should log very verbose.

-

If this file exists in the source specification -v will be passed to -rsync, cp, rm and mkdir.

-

Example:

-
-
-
   [23:67] nohost:~% touch conf/sources/testsource1/very_verbose
-
-

4.3.4. Detailled description of "summary"

-

If you create the file summary below the source definition, -ccollect will present you with a nice summary at the end.

-
-
-
backup:~# touch /etc/ccollect/sources/root/summary
-backup:~# ccollect.sh werktags root
-==> ccollect.sh: Beginning backup using intervall werktags <==
-[root] Beginning to backup this source ...
-[root] Currently 3 backup(s) exist, total keeping 50 backup(s).
-[root] Beginning to backup, this may take some time...
-[root] Hard linking...
-[root] Transferring files...
-[root]
-[root] Number of files: 84183
-[root] Number of files transferred: 32
-[root] Total file size: 26234080536 bytes
-[root] Total transferred file size: 9988252 bytes
-[root] Literal data: 9988252 bytes
-[root] Matched data: 0 bytes
-[root] File list size: 3016771
-[root] File list generation time: 1.786 seconds
-[root] File list transfer time: 0.000 seconds
-[root] Total bytes sent: 13009119
-[root] Total bytes received: 2152
-[root]
-[root] sent 13009119 bytes  received 2152 bytes  2891393.56 bytes/sec
-[root] total size is 26234080536  speedup is 2016.26
-[root] Successfully finished backup.
-==> Finished ccollect.sh <==
-
-

You could also combine it with verbose or very_verbose, but they -already print some statistics (but not all / the same as presented by -summary).

-

4.3.5. Detailled description of "exclude"

-

exclude specifies a list of paths to exclude. The entries are new line (\n) -seperated.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   something with spaces is not a problem
-
-

4.3.6. Detailled description of "destination"

-

destination must be a link to the destination directory.

-

Example:

-
-
-
   [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination
-   lrwxrwxrwx  1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir
-
-

4.3.7. Detailled description of "intervalls/"

-

When you create a subdirectory intervalls/ within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall.

-

Example:

-
-
-
   [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/
-   insgesamt 8
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   -rw-r--r--  1 nico users 3 2005-12-14 11:33 yearly
-   [11:37] zaphodbeeblebrox:ccollect-0.2% cat  conf/sources/testsource2/intervalls/*
-   5
-   20
-
-

4.3.8. Detailled description of "rsync_options"

-

When you create the file rsync_options below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("—progress") or which -password-file ("—password-file") -to use for automatic backup over the rsync-protocol.

-

Example:

-
-
-
   [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options
-   --password-file=/home/user/backup/protected_password_file
-
-

4.3.9. Detailled description of "pre_exec" and "post_exec"

-

When you create pre_exec and / or post_exec below your source -configuration, ccollect will execute this command before, -respective after doing the backup for this specific source. -If you want to have pre-/post-exec before and after all -backups, see above for general configuration.

-

Example:

-
-
-
[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec
-#!/bin/sh
-
-# Show whats free before
-df -h
-[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec
-#!/bin/sh
-
-# Show whats free after
-df -h
-
-
-

5. Hints

-
-

5.1. Using rsync protocol without ssh

-

When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify user@host::share in source). You may wish to use -rsync_options to specify a password file to use for automatic backup.

-

Example:

-
-
-
backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source
-backup@webserver::backup-share
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options
---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password
-this_is_the_rsync_password
-
-

This hint was reported by Daniel Aubry.

-

5.2. Not-excluding top-level directories

-

When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/*" or "/mnt/*" -instead ccollect will backup empty directories.

-
- - - -
-
Note
-
-

When those directories contain hidden files -(those beginning with a dot (.)), -they will still be transferred!

-
-
-

This hint was reported by Marcus Wagner.

-

5.3. Re-using already created rsync-backups

-

If you used rsync directly before you use ccollect, you can -use this old backup as initial backup for ccollect: You -simply move it into a subdirectory named "intervall.0".

-

Example:

-
-
-
backup:/home/backup/web1# ls
-bin   dev  etc   initrd  lost+found  mnt  root  srv  usr  vmlinuz
-boot  doc  home  lib     media       opt  sbin  tmp  var  vmlinuz.old
-
-backup:/home/backup/web1# mkdir daily.0
-
-# ignore error about copying to itself
-backup:/home/backup/web1# mv * daily.0 2>/dev/null
-
-backup:/home/backup/web1# ls
-daily.0
-
-

Now you could use /home/backup/web1 as the destination for the backup.

-
- - - -
-
Note
-
-

Do not name the first backup something like "daily.initial", but use -the "0" (or some very low number, at least lower than the current year) -as extension. ccollect uses sort to find the latest backup. ccollect -itself uses intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID. This notation will -always be before "daily.initial", as numbers are earlier in the list -which is produced by sort. So, if you have a directory named "daily.initial", -ccollect will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete.

-
-
-

5.4. Using pre_/post_exec

-

Your pre_/post_exec script does not need to be a script, you can also -use a link to

-
    -
  • -

    -an existing program -

    -
  • -
  • -

    -an already written script -

    -
  • -
-

The only requirement is that it is executable.

-
-

6. F.A.Q.

-
-

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)

-

6.3. Why does ccollect say "Permission denied" with my pre-/postexec script?

-

The most common error is to not give your script the correct -permissions. Try chmod 0755 /etc/ccollect/sources/yoursource/*_exec`.

-
-

7. Examples

-
-

7.1. A backup host configuration from scratch

-
-
-
srwali01:~# mkdir /etc/ccollect
-srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/
-srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich
-srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich
-srwali01:~# cd /etc/ccollect/
-srwali01:/etc/ccollect# mkdir sources
-srwali01:/etc/ccollect# cd sources/
-srwali01:/etc/ccollect/sources# ls
-srwali01:/etc/ccollect/sources# mkdir local-root
-srwali01:/etc/ccollect/sources# cd local-root/
-srwali01:/etc/ccollect/sources/local-root# echo / > source
-srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> EOF
-srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination
-srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root
-srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root
-/o> ccollect.sh: Beginning backup using intervall taeglich
-/=> Beginning to backup "local-root" ...
-|-> 0 backup(s) already exist, keeping 28 backup(s).
-
-

After that, I added some more sources:

-
-
-
srwali01:~# cd /etc/ccollect/sources
-srwali01:/etc/ccollect/sources# mkdir windos-wl6
-srwali01:/etc/ccollect/sources# cd windos-wl6/
-srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source
-srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination
-srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6
-srwali01:/etc/ccollect/sources/windos-wl6# cd ..
-srwali01:/etc/ccollect/sources# mkdir windos-daten
-srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source
-srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination
-srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten
-
-# Now add some remote source
-srwali01:/etc/ccollect/sources/windos-daten# cd ..
-srwali01:/etc/ccollect/sources# mkdir srwali03
-srwali01:/etc/ccollect/sources# cd srwali03/
-srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> /home
-> EOF
-srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source
-srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination
-srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03
-
-

7.2. Using hard-links requires less disk space

-
-
-
# du (coreutils) 5.2.1
-[10:53] srsyg01:sources% du -sh ~/backupdir
-4.6M    /home/nico/backupdir
-[10:53] srsyg01:sources% du -sh ~/backupdir/*
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:52.28456
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28484
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28507
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28531
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28554
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28577
-
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/
-186M    /mnt/hdbackup/wl6/
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588
-
-

The backup of our main fileserver:

-
-
-
backup:~# df -h /home/backup/srsyg01/
-Filesystem            Size  Used Avail Use% Mounted on
-/dev/mapper/backup--01-srsyg01
-                      591G  451G  111G  81% /home/backup/srsyg01
-backup:~# du -sh /home/backup/srsyg01/*
-432G    /home/backup/srsyg01/daily.2006-01-24-01:00.15990
-432G    /home/backup/srsyg01/daily.2006-01-26-01:00.30152
-434G    /home/backup/srsyg01/daily.2006-01-27-01:00.4596
-435G    /home/backup/srsyg01/daily.2006-01-28-01:00.11998
-437G    /home/backup/srsyg01/daily.2006-01-29-01:00.19115
-437G    /home/backup/srsyg01/daily.2006-01-30-01:00.26405
-438G    /home/backup/srsyg01/daily.2006-01-31-01:00.1148
-439G    /home/backup/srsyg01/daily.2006-02-01-01:00.8321
-439G    /home/backup/srsyg01/daily.2006-02-02-01:00.15383
-439G    /home/backup/srsyg01/daily.2006-02-03-01:00.22567
-16K     /home/backup/srsyg01/lost+found
-backup:~# du --version | head -n1
-du (coreutils) 5.2.1
-
-

Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du:

-
-
-
[8:16] eiche:~# du --version | head -n 1
-du (GNU coreutils) 5.93
-[8:17] eiche:schwarzesloch# du -slh hydrogenium/*
-19G     hydrogenium/durcheinander.0
-18G     hydrogenium/durcheinander.2006-01-17-00:27.13820
-19G     hydrogenium/durcheinander.2006-01-25-23:18.31328
-19G     hydrogenium/durcheinander.2006-01-26-00:11.3332
-[8:22] eiche:schwarzesloch# du -sh hydrogenium/*
-19G     hydrogenium/durcheinander.0
-12G     hydrogenium/durcheinander.2006-01-17-00:27.13820
-1.5G    hydrogenium/durcheinander.2006-01-25-23:18.31328
-200M    hydrogenium/durcheinander.2006-01-26-00:11.3332
-
-

In the second report the sizes include the space the inodes of -the hardlinks allocate.

-
- - - diff --git a/software/ccollect/download/ccollect-0.3.2/doc/ccollect.text b/software/ccollect/download/ccollect-0.3.2/doc/ccollect.text deleted file mode 100644 index 3814c738..00000000 --- a/software/ccollect/download/ccollect-0.3.2/doc/ccollect.text +++ /dev/null @@ -1,573 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.3.1, for ccollect 0.3.1, Initial Version from 2005-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup TO localhost -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While thinking about the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers *to* a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ - -For the installation, you need at least - - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools installed: - - `bc` - - `cp` with support for hard links ('cp -al') - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$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. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration. - -All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files. - - -Intervall definition -^^^^^^^^^^^^^^^^^^^^ -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 content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following Example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists below '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source has at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `cp`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperated list. - - `rsync_options' extra options to pass to `rsync` - - - `pre_exec` program to execute before backuping this source - - `post_exec` program to execute after backuping this source - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervalls - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - -Detailled description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at `rsync`(1). - -Detailled description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - -Detailled description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbose. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `cp`, `rm` and `mkdir`. - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - -Detailled description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` below the source definition, -`ccollect` will present you with a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using intervall werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but they -already print some statistics (but not all / the same as presented by -`summary`). - - -Detailled description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are new line (\n) -seperated. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailled description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - - -Detailled description of "intervalls/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create a subdirectory `intervalls/` within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall. - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/* - 5 - 20 --------------------------------------------------------------------------------- - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When you create the file `rsync_options` below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress") or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When you create `pre_exec` and / or `post_exec` below your source -configuration, `ccollect` will execute this command before, -respective after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not-excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'intervall'.0". - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you could use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some very low number, at least lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -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 - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is to not give your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using intervall taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report the sizes include the space the inodes of -the hardlinks allocate. diff --git a/software/ccollect/download/ccollect-0.3.2/release.sh b/software/ccollect/download/ccollect-0.3.2/release.sh deleted file mode 100644 index f5e5642c..00000000 --- a/software/ccollect/download/ccollect-0.3.2/release.sh +++ /dev/null @@ -1,23 +0,0 @@ -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.3.3/.gitignore b/software/ccollect/download/ccollect-0.3.3/.gitignore deleted file mode 100644 index be216436..00000000 --- a/software/ccollect/download/ccollect-0.3.3/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -conf/sources/*/destination/* -doc/old diff --git a/software/ccollect/download/ccollect-0.3.3/COPYING b/software/ccollect/download/ccollect-0.3.3/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.3.3/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.3.3/Makefile b/software/ccollect/download/ccollect-0.3.3/Makefile deleted file mode 100644 index 2d871844..00000000 --- a/software/ccollect/download/ccollect-0.3.3/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf - -prefix=/usr/packages/ccollect-0.2 -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=creme.schottelius.org -dir=www/org/schottelius/linux/ccollect -docdir=$(dir)/doc - -# -# End user targets -# -all: - @echo "Nothing to make, make install." - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 -s $(CCOLLECT) $(destination) - -documentation: - @echo "Generating HTML-documentation" - @asciidoc -n -o doc/ccollect.html doc/ccollect.text - -# -# Developer targets -# -update: - @cg-update creme - -push-work: - @cg-push creme - @cg-push sygroup - -publish-doc: documentation - @chmod a+r doc/ccollect.html - @scp doc/ccollect.html doc/ccollect.text $(host):$(docdir) - diff --git a/software/ccollect/download/ccollect-0.3.3/README b/software/ccollect/download/ccollect-0.3.3/README deleted file mode 100644 index c0857d2b..00000000 --- a/software/ccollect/download/ccollect-0.3.3/README +++ /dev/null @@ -1,23 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml - -ccollect was inspired by rsnapshot [1], which had some problems: - - configuration parameters had to be TAB seperated - - you could not specify exclude lists differently for every source - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.3.3/ccollect.sh b/software/ccollect/download/ccollect-0.3.3/ccollect.sh deleted file mode 100644 index 3ac02a84..00000000 --- a/software/ccollect/download/ccollect-0.3.3/ccollect.sh +++ /dev/null @@ -1,414 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.3.3 -RELEASE="2006-02-24" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s/^/\[$name\] /" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least intervall and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (set \$CCOLLECT_CONF corectly?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVALL=$1; shift -i=1 -no_shares=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_shares=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval share_${no_shares}=\"$tmp\" - no_shares=$(($no_shares+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_shares" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using intervall $INTERVALL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVALL="$CDEFAULTS/intervalls/$INTERVALL" -D_INTERVALL=$(cat $D_FILE_INTERVALL 2>/dev/null) - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." -fi - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_shares" ]; do - - # - # Get current share - # - eval name=\$share_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - "$0" "$INTERVALL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - begin=$(date) - begin_s=$(date +%s) - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # intervall definition: First try source specific, fallback to default - # - c_intervall="$(cat "$backup/intervalls/$INTERVALL" 2>/dev/null)" - - if [ -z "$c_intervall" ]; then - c_intervall=$D_INTERVALL - - if [ -z "$c_intervall" ]; then - echo "Default and source specific intervall missing. Skipping." - exit 1 - fi - fi - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - # - # next configuration checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # pre_exec - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - $c_pre_exec - echo "Finished ${c_pre_exec}." - fi - - # exclude - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # extra options for rsync - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # verbosity for rsync - if [ -f "$c_verbose" ]; then - 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" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVALL.$DA - count=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | wc -l) - echo -n "Currently $count backup(s) exist(s)," - echo " total keeping $c_intervall backup(s)." - - if [ "$count" -ge "$c_intervall" ]; then - substract=$(echo $c_intervall - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVALL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$(date +%Y-%m-%d-%H:%M) - destination_dir="$c_dest/${INTERVALL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "$(date) Hard linking..." - cp -al $VVERBOSE "$last_dir" "$destination_dir" - else - echo "Creating $destination_dir" - mkdir $VVERBOSE "$destination_dir" - fi - - if [ $? -ne 0 ]; then - echo -n "$(date) Creating/cloning backup directory failed." - echo " Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "$(date) Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync reported an error. The backup may be broken (see rsync errors)" - fi - - echo "$(date) Finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$(date) Executing $c_post_exec ..." - "$c_post_exec" - echo "$(date) Finished ${c_post_exec}." - fi - - end_s=$(date +%s) - - full_seconds=$(echo "$end_s - $begin_s" | bc -l) - hours=$(echo $full_seconds / 3600 | bc) - seconds=$(echo "$full_seconds - ($hours * 3600)" | bc) - minutes=$(echo $seconds / 60 | bc) - seconds=$(echo "$seconds - ($minutes * 60)" | bc) - - echo "Backup lasted: ${hours}:$minutes:$seconds (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "Finished ${CPOSTEXEC}." -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.3.3/conf/defaults/post_exec deleted file mode 100644 index 2192fecd..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. -###################################################################### diff --git a/software/ccollect/download/ccollect-0.3.3/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.3.3/conf/defaults/pre_exec deleted file mode 100644 index eb983c8e..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/defaults/pre_exec +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.3.3/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/fehler b/software/ccollect/download/ccollect-0.3.3/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.3.3/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.3.3/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/destination deleted file mode 120000 index 4d5c4a0d..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.3.3/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.3.3/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.3.3/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.3.3/doc/CHANGES b/software/ccollect/download/ccollect-0.3.3/doc/CHANGES deleted file mode 100644 index e2d0600d..00000000 --- a/software/ccollect/download/ccollect-0.3.3/doc/CHANGES +++ /dev/null @@ -1,23 +0,0 @@ -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.3.3/doc/TODO b/software/ccollect/download/ccollect-0.3.3/doc/TODO deleted file mode 100644 index 25f20789..00000000 --- a/software/ccollect/download/ccollect-0.3.3/doc/TODO +++ /dev/null @@ -1,34 +0,0 @@ -- update documentation: - - exit pre/post exec -> error codes (after implementation!) (in 0.4) -- write mkccollectconfig - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based - -- implement pre- and post-exec commands - o what to do with return values? - -> Check them, abort on error - -- Documentation - - write/generate a manpage - - -DONE -- implement verbosity - o per source (-v to rsync) - o general, very verbose (set -x) -- implement parallel execution -- implement general log -- implement source specific log (canceled) -- the name prefix is currently somehow inconsistent -- Documentation - - rsync_options, example paswd - - write a simple manual - - Hints section - - add note to --exclude=/proc/ vs. --exclude=/proc/* - - rsync_options \n seperated -- implement pre- and post-exec commands - o For the general backup process - o source specific diff --git a/software/ccollect/download/ccollect-0.3.3/doc/ccollect.html b/software/ccollect/download/ccollect-0.3.3/doc/ccollect.html deleted file mode 100644 index 045348df..00000000 --- a/software/ccollect/download/ccollect-0.3.3/doc/ccollect.html +++ /dev/null @@ -1,859 +0,0 @@ - - - - - - -ccollect - Installing, Configuring and Using - - - -
-
-

(pseudo) incremental backup -with different exclude lists -using hardlinks and rsync

-
-
-

1. Introduction

-
-

ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only /bin/sh needs to be -bourne shell compatibel (like dash, ksh, zsh, bash, …).

-

1.1. Why you can only backup TO localhost

-

While thinking about the design of ccollect, I thought about enabling -backup to remote hosts. Though this sounds like a nice feature -(Backup my notebook to the server now.), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers to a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data from them. If someone gets access to one -of the webservers, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure.

-
-

2. Requirements

-
-

2.1. Installing ccollect

-

For the installation, you need at least

-
    -
  • -

    -either cp and chmod or install -

    -
  • -
  • -

    -for more comfort: make -

    -
  • -
  • -

    -for rebuilding the generated documentation: additionally asciidoc -

    -
  • -
-

2.2. Using ccollect

-
Running ccollect requires the following tools installed:
    -
  • -

    -bc -

    -
  • -
  • -

    -cp with support for hard links (cp -al) -

    -
  • -
  • -

    -date -

    -
  • -
  • -

    -rsync -

    -
  • -
  • -

    -ssh (if you want to use rsync over ssh, which is recommened for security) -

    -
  • -
-
-

3. Installing

-
-

Either type make install or simply copy it to a directory in your -$PATH and execute chmod 0755 /path/to/ccollect.sh.

-
-

4. Configuring

-
-

4.1. Runtime options

-

ccollect looks for its configuration in /etc/ccollect or, if set, in -the directory specified by the variable $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.

-

4.2. General configuration

-

The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration.

-

All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files.

-

4.2.1. Intervall definition

-

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/<intervall name>.

-

The content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep.

-

Example:

-
-
-
   [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/
-   insgesamt 12
-   -rw-r--r--  1 nico users 3 2005-12-08 10:24 daily
-   -rw-r--r--  1 nico users 3 2005-12-08 11:36 monthly
-   -rw-r--r--  1 nico users 2 2005-12-08 11:36 weekly
-   [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/*
-   28
-   12
-   4
-
-

This means to keep 28 daily backups, 12 monthly backups and 4 weekly.

-

4.2.2. General pre- and post-execution

-

If you add $CCOLLECT_CONF/defaults/pre_exec or -/etc/ccollect/defaults/pre_exec (same with post_exec), ccollect -will start pre_exec before the whole backup process and -post_exec after backup of all sources is done.

-

The following example describes how to report free disk space in -human readable format before and after the whole backup process:

-
-
-
[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/
-[13:00] hydrogenium:~# echo '#!/bin/sh' >  /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo ''          >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo 'df -h'     >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec
-
-

4.3. Source configuration

-

Each source configuration exists below $CCOLLECT_CONF/sources/$name or -/etc/ccollect/sources/$name.

-

The name you choose for the subdirectory describes the source.

-

Each source has at least the following files:

-
    -
  • -

    -source (a text file containing the rsync compatible path to backup) -

    -
  • -
  • -

    -destination (a link to the directory we should backup to) -

    -
  • -
-

Additionally a source may have the following files:

-
    -
  • -

    -verbose whether to be verbose (passes -v to rsync) -

    -
  • -
  • -

    -very_verbose be very verbose (-v also for mkdir, cp, rm) -

    -
  • -
  • -

    -summary create a transfer summary when rsync finished -

    -
  • -
  • -

    -exclude exclude list for rsync. newline (\n) seperated list. -

    -
  • -
  • -

    -rsync_options extra options to pass to rsync -

    -
  • -
  • -

    -pre_exec program to execute before backuping this source -

    -
  • -
  • -

    -post_exec program to execute after backuping this source -

    -
  • -
-

Example:

-
-
-
   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2
-   insgesamt 12
-   lrwxrwxrwx  1 nico users   20 2005-11-17 16:44 destination -> /home/nico/backupdir
-   -rw-r--r--  1 nico users   62 2005-12-07 17:43 exclude
-   drwxr-xr-x  2 nico users 4096 2005-12-07 17:38 intervalls
-   -rw-r--r--  1 nico users   15 2005-11-17 16:44 source
-   [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2/intervalls
-   insgesamt 4
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily
-   5
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source
-   /home/nico/vpn
-
-

4.3.1. Detailled description of "source"

-

source describes a rsync compatible source (one line only).

-

For instance backup_user@foreign_host:/home/server/video. -To use the rsync protocol without the ssh-tunnel, use -rsync::USER@HOST/SRC. For more information have a look at the manpage -of rsync,rsync(1).

-

4.3.2. Detailled description of "verbose"

-

verbose tells ccollect that the log should contain verbose messages.

-

If this file exists in the source specification -v will be passed to rsync.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose
-
-

4.3.3. Detailled description of "very_verbose"

-

very_verbose tells ccollect that it should log very verbose.

-

If this file exists in the source specification -v will be passed to -rsync, cp, rm and mkdir.

-

Example:

-
-
-
   [23:67] nohost:~% touch conf/sources/testsource1/very_verbose
-
-

4.3.4. Detailled description of "summary"

-

If you create the file summary below the source definition, -ccollect will present you with a nice summary at the end.

-
-
-
backup:~# touch /etc/ccollect/sources/root/summary
-backup:~# ccollect.sh werktags root
-==> ccollect.sh: Beginning backup using intervall werktags <==
-[root] Beginning to backup this source ...
-[root] Currently 3 backup(s) exist, total keeping 50 backup(s).
-[root] Beginning to backup, this may take some time...
-[root] Hard linking...
-[root] Transferring files...
-[root]
-[root] Number of files: 84183
-[root] Number of files transferred: 32
-[root] Total file size: 26234080536 bytes
-[root] Total transferred file size: 9988252 bytes
-[root] Literal data: 9988252 bytes
-[root] Matched data: 0 bytes
-[root] File list size: 3016771
-[root] File list generation time: 1.786 seconds
-[root] File list transfer time: 0.000 seconds
-[root] Total bytes sent: 13009119
-[root] Total bytes received: 2152
-[root]
-[root] sent 13009119 bytes  received 2152 bytes  2891393.56 bytes/sec
-[root] total size is 26234080536  speedup is 2016.26
-[root] Successfully finished backup.
-==> Finished ccollect.sh <==
-
-

You could also combine it with verbose or very_verbose, but they -already print some statistics (but not all / the same as presented by -summary).

-

4.3.5. Detailled description of "exclude"

-

exclude specifies a list of paths to exclude. The entries are new line (\n) -seperated.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   something with spaces is not a problem
-
-

4.3.6. Detailled description of "destination"

-

destination must be a link to the destination directory.

-

Example:

-
-
-
   [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination
-   lrwxrwxrwx  1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir
-
-

To speak truth, this is not fully correct. ccollect will also backup -your data, if destination is a directory. But do you really want to have -a backup below /etc?

-

4.3.7. Detailled description of "intervalls/"

-

When you create a subdirectory intervalls/ within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall.

-

Example:

-
-
-
   [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/
-   insgesamt 8
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   -rw-r--r--  1 nico users 3 2005-12-14 11:33 yearly
-   [11:37] zaphodbeeblebrox:ccollect-0.2% cat  conf/sources/testsource2/intervalls/*
-   5
-   20
-
-

4.3.8. Detailled description of "rsync_options"

-

When you create the file rsync_options below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("—progress") or which -password-file ("—password-file") -to use for automatic backup over the rsync-protocol.

-

Example:

-
-
-
   [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options
-   --password-file=/home/user/backup/protected_password_file
-
-

4.3.9. Detailled description of "pre_exec" and "post_exec"

-

When you create pre_exec and / or post_exec below your source -configuration, ccollect will execute this command before, -respective after doing the backup for this specific source. -If you want to have pre-/post-exec before and after all -backups, see above for general configuration.

-

Example:

-
-
-
[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec
-#!/bin/sh
-
-# Show whats free before
-df -h
-[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec
-#!/bin/sh
-
-# Show whats free after
-df -h
-
-
-

5. Hints

-
-

5.1. Using rsync protocol without ssh

-

When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify user@host::share in source). You may wish to use -rsync_options to specify a password file to use for automatic backup.

-

Example:

-
-
-
backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source
-backup@webserver::backup-share
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options
---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password
-this_is_the_rsync_password
-
-

This hint was reported by Daniel Aubry.

-

5.2. Not-excluding top-level directories

-

When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/*" or "/mnt/*" -instead ccollect will backup empty directories.

-
- - - -
-
Note
-
-

When those directories contain hidden files -(those beginning with a dot (.)), -they will still be transferred!

-
-
-

This hint was reported by Marcus Wagner.

-

5.3. Re-using already created rsync-backups

-

If you used rsync directly before you use ccollect, you can -use this old backup as initial backup for ccollect: You -simply move it into a subdirectory named "intervall.0".

-

Example:

-
-
-
backup:/home/backup/web1# ls
-bin   dev  etc   initrd  lost+found  mnt  root  srv  usr  vmlinuz
-boot  doc  home  lib     media       opt  sbin  tmp  var  vmlinuz.old
-
-backup:/home/backup/web1# mkdir daily.0
-
-# ignore error about copying to itself
-backup:/home/backup/web1# mv * daily.0 2>/dev/null
-
-backup:/home/backup/web1# ls
-daily.0
-
-

Now you could use /home/backup/web1 as the destination for the backup.

-
- - - -
-
Note
-
-

Do not name the first backup something like "daily.initial", but use -the "0" (or some very low number, at least lower than the current year) -as extension. ccollect uses sort to find the latest backup. ccollect -itself uses intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID. This notation will -always be before "daily.initial", as numbers are earlier in the list -which is produced by sort. So, if you have a directory named "daily.initial", -ccollect will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete.

-
-
-

5.4. Using pre_/post_exec

-

Your pre_/post_exec script does not need to be a script, you can also -use a link to

-
    -
  • -

    -an existing program -

    -
  • -
  • -

    -an already written script -

    -
  • -
-

The only requirement is that it is executable.

-
-

6. F.A.Q.

-
-

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

-

Let us assume, that one backup failed (connection broke or the source -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. -This leads to

-
    -
  • -

    -more transferred files -

    -
  • -
  • -

    -much greater disk space usage, as no hardlinks can be used -

    -
  • -
-

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)

-

6.3. Why does ccollect say "Permission denied" with my pre-/postexec script?

-

The most common error is to not give your script the correct -permissions. Try chmod 0755 /etc/ccollect/sources/yoursource/*_exec`.

-
-

7. Examples

-
-

7.1. A backup host configuration from scratch

-
-
-
srwali01:~# mkdir /etc/ccollect
-srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/
-srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich
-srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich
-srwali01:~# cd /etc/ccollect/
-srwali01:/etc/ccollect# mkdir sources
-srwali01:/etc/ccollect# cd sources/
-srwali01:/etc/ccollect/sources# ls
-srwali01:/etc/ccollect/sources# mkdir local-root
-srwali01:/etc/ccollect/sources# cd local-root/
-srwali01:/etc/ccollect/sources/local-root# echo / > source
-srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> EOF
-srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination
-srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root
-srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root
-/o> ccollect.sh: Beginning backup using intervall taeglich
-/=> Beginning to backup "local-root" ...
-|-> 0 backup(s) already exist, keeping 28 backup(s).
-
-

After that, I added some more sources:

-
-
-
srwali01:~# cd /etc/ccollect/sources
-srwali01:/etc/ccollect/sources# mkdir windos-wl6
-srwali01:/etc/ccollect/sources# cd windos-wl6/
-srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source
-srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination
-srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6
-srwali01:/etc/ccollect/sources/windos-wl6# cd ..
-srwali01:/etc/ccollect/sources# mkdir windos-daten
-srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source
-srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination
-srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten
-
-# Now add some remote source
-srwali01:/etc/ccollect/sources/windos-daten# cd ..
-srwali01:/etc/ccollect/sources# mkdir srwali03
-srwali01:/etc/ccollect/sources# cd srwali03/
-srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> /home
-> EOF
-srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source
-srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination
-srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03
-
-

7.2. Using hard-links requires less disk space

-
-
-
# du (coreutils) 5.2.1
-[10:53] srsyg01:sources% du -sh ~/backupdir
-4.6M    /home/nico/backupdir
-[10:53] srsyg01:sources% du -sh ~/backupdir/*
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:52.28456
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28484
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28507
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28531
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28554
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28577
-
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/
-186M    /mnt/hdbackup/wl6/
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588
-
-

The backup of our main fileserver:

-
-
-
backup:~# df -h /home/backup/srsyg01/
-Filesystem            Size  Used Avail Use% Mounted on
-/dev/mapper/backup--01-srsyg01
-                      591G  451G  111G  81% /home/backup/srsyg01
-backup:~# du -sh /home/backup/srsyg01/*
-432G    /home/backup/srsyg01/daily.2006-01-24-01:00.15990
-432G    /home/backup/srsyg01/daily.2006-01-26-01:00.30152
-434G    /home/backup/srsyg01/daily.2006-01-27-01:00.4596
-435G    /home/backup/srsyg01/daily.2006-01-28-01:00.11998
-437G    /home/backup/srsyg01/daily.2006-01-29-01:00.19115
-437G    /home/backup/srsyg01/daily.2006-01-30-01:00.26405
-438G    /home/backup/srsyg01/daily.2006-01-31-01:00.1148
-439G    /home/backup/srsyg01/daily.2006-02-01-01:00.8321
-439G    /home/backup/srsyg01/daily.2006-02-02-01:00.15383
-439G    /home/backup/srsyg01/daily.2006-02-03-01:00.22567
-16K     /home/backup/srsyg01/lost+found
-backup:~# du --version | head -n1
-du (coreutils) 5.2.1
-
-

Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du:

-
-
-
[8:16] eiche:~# du --version | head -n 1
-du (GNU coreutils) 5.93
-[8:17] eiche:schwarzesloch# du -slh hydrogenium/*
-19G     hydrogenium/durcheinander.0
-18G     hydrogenium/durcheinander.2006-01-17-00:27.13820
-19G     hydrogenium/durcheinander.2006-01-25-23:18.31328
-19G     hydrogenium/durcheinander.2006-01-26-00:11.3332
-[8:22] eiche:schwarzesloch# du -sh hydrogenium/*
-19G     hydrogenium/durcheinander.0
-12G     hydrogenium/durcheinander.2006-01-17-00:27.13820
-1.5G    hydrogenium/durcheinander.2006-01-25-23:18.31328
-200M    hydrogenium/durcheinander.2006-01-26-00:11.3332
-
-

In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate.

-
- - - diff --git a/software/ccollect/download/ccollect-0.3.3/doc/ccollect.text b/software/ccollect/download/ccollect-0.3.3/doc/ccollect.text deleted file mode 100644 index b86eddc5..00000000 --- a/software/ccollect/download/ccollect-0.3.3/doc/ccollect.text +++ /dev/null @@ -1,593 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.3.3, for ccollect 0.3.2-0.3.3, Initial Version from 2006-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup TO localhost -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While thinking about the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers *to* a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation, you need at least - - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools installed: - - `bc` - - `cp` with support for hard links ('cp -al') - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$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. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration. - -All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files. - - -Intervall definition -^^^^^^^^^^^^^^^^^^^^ -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 content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists below '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source has at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `cp`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperated list. - - `rsync_options` extra options to pass to `rsync` - - - `pre_exec` program to execute before backuping this source - - `post_exec` program to execute after backuping this source - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervalls - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailled description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`,`rsync`(1). - - -Detailled description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailled description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbose. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `cp`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailled description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` below the source definition, -`ccollect` will present you with a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using intervall werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but they -already print some statistics (but not all / the same as presented by -`summary`). - - -Detailled description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are new line (\n) -seperated. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailled description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To speak truth, this is not fully correct. `ccollect` will also backup -your data, if `destination` is a directory. But do you really want to have -a backup below /etc? - - -Detailled description of "intervalls/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create a subdirectory `intervalls/` within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress") or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` below your source -configuration, `ccollect` will execute this command before, -respective after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not-excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'intervall'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you could use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some very low number, at least lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -What happens, if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume, that one backup failed (connection broke or the source -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. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is to not give your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using intervall taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. diff --git a/software/ccollect/download/ccollect-0.3.3/release.sh b/software/ccollect/download/ccollect-0.3.3/release.sh deleted file mode 100644 index f5e5642c..00000000 --- a/software/ccollect/download/ccollect-0.3.3/release.sh +++ /dev/null @@ -1,23 +0,0 @@ -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.3/.gitignore b/software/ccollect/download/ccollect-0.3/.gitignore deleted file mode 100644 index be216436..00000000 --- a/software/ccollect/download/ccollect-0.3/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -conf/sources/*/destination/* -doc/old diff --git a/software/ccollect/download/ccollect-0.3/COPYING b/software/ccollect/download/ccollect-0.3/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.3/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.3/Makefile b/software/ccollect/download/ccollect-0.3/Makefile deleted file mode 100644 index d6fac7d4..00000000 --- a/software/ccollect/download/ccollect-0.3/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf - -prefix=/usr/packages/ccollect-0.2 -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=creme.schottelius.org -dir=www/org/schottelius/linux/ccollect -docdir=$(dir)/doc - -# -# End user targets -# -all: - @echo "Nothing to make, make install." - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 -s $(CCOLLECT) $(destination) - -documentation: - @echo "Generating HTML-documentation" - @asciidoc -n -o doc/ccollect.html doc/ccollect.text - -# -# Developer targets -# -update: - @cg-update creme - -push-work: - @cg-push creme - @cg-push main - -publish-doc: documentation - @chmod a+r doc/ccollect.html - @scp doc/ccollect.html doc/ccollect.text $(host):$(docdir) - diff --git a/software/ccollect/download/ccollect-0.3/README b/software/ccollect/download/ccollect-0.3/README deleted file mode 100644 index c0857d2b..00000000 --- a/software/ccollect/download/ccollect-0.3/README +++ /dev/null @@ -1,23 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml - -ccollect was inspired by rsnapshot [1], which had some problems: - - configuration parameters had to be TAB seperated - - you could not specify exclude lists differently for every source - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.3/ccollect.sh b/software/ccollect/download/ccollect-0.3/ccollect.sh deleted file mode 100644 index 27385e2a..00000000 --- a/software/ccollect/download/ccollect-0.3/ccollect.sh +++ /dev/null @@ -1,393 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -WE=$(basename $0) -VERSION=0.3 -RELEASE="2006-01-22" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s/^/\[$name\] /" -} - -# -# Tell how to use us -# -usage() -{ - echo "$WE: [args] " - echo "" - echo " Nico Schottelius (nico-linux-ccollect schottelius.org) - 2005-12-06" - echo "" - echo " Backup data pseudo incremental" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parellize backup process" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/." - echo "" - echo " Version: $VERSION ($RELEASE, Grey Sunday Release)" - exit 0 -} - -# -# need at least intervall and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (set \$CCOLLECT_CONF corectly?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVALL=$1; shift -i=1 -no_shares=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval share_${no_shares}=\"$arg\" - no_shares=$(($no_shares+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_shares=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval share_${no_shares}=\"$tmp\" - no_shares=$(($no_shares+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_shares" -lt 1 ]; then - usage -else - echo "==> $WE: Beginning backup using intervall $INTERVALL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVALL="$CDEFAULTS/intervalls/$INTERVALL" -D_INTERVALL=$(cat $D_FILE_INTERVALL 2>/dev/null) - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." -fi - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_shares" ]; do - - # - # Get current share - # - eval name=\$share_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - $0 "$INTERVALL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - c_verbose="$backup/verbose" - c_vverbose="$backup/very_verbose" - c_rsync_extra="$backup/rsync_options" - - c_pre_exec="$backup/pre_exec" - c_post_exec="$backup/post_exec" - - echo "Beginning to backup this source ..." - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # intervall definition: First try source specific, fallback to default - # - c_intervall="$(cat "$backup/intervalls/$INTERVALL" 2>/dev/null)" - - if [ -z "$c_intervall" ]; then - c_intervall=$D_INTERVALL - - if [ -z "$c_intervall" ]; then - echo "Default and source specific intervall missing. Skipping." - exit 1 - fi - fi - - # - # standard rsync options - # - VERBOSE="" - VVERBOSE="" - EXCLUDE="" - RSYNC_EXTRA="" - - # - # next configuration checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # pre_exec - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - $c_pre_exec - echo "Finished ${c_pre_exec}." - fi - - # exclude - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # extra options for rsync - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # verbosity for rsync - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # MORE verbosity, includes standard verbosity - if [ -f "$c_vverbose" ]; then - VERBOSE="-v" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVALL.$DA - count=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | wc -l) - echo "Currently $count backup(s) exist, total keeping $c_intervall backup(s)." - - if [ "$count" -ge "$c_intervall" ]; then - substract=$(echo $c_intervall - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVALL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$(date +%Y-%m-%d-%H:%M) - destination_dir="$c_dest/${INTERVALL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVALL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "Hard linking..." - cp -al $VVERBOSE "$last_dir" "$destination_dir" - else - echo "Creating $destination_dir" - mkdir $VVERBOSE "$destination_dir" - fi - - if [ $? -ne 0 ]; then - echo "Creating/cloning backup directory failed. Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync failed, backup may be broken (see rsync errors)" - exit 1 - fi - - echo "Successfully finished backup." - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "Executing $c_post_exec ..." - "$c_post_exec" - echo "Finished ${c_post_exec}." - fi - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "Finished ${CPOSTEXEC}." -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.3/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.3/conf/defaults/post_exec deleted file mode 100644 index 2192fecd..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. -###################################################################### diff --git a/software/ccollect/download/ccollect-0.3/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.3/conf/defaults/pre_exec deleted file mode 100644 index eb983c8e..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/defaults/pre_exec +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.3/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/fehler b/software/ccollect/download/ccollect-0.3/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.3/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.3/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/destination deleted file mode 120000 index 4d5c4a0d..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.3/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.3/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.3/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.3/doc/CHANGES b/software/ccollect/download/ccollect-0.3/doc/CHANGES deleted file mode 100644 index 5802e099..00000000 --- a/software/ccollect/download/ccollect-0.3/doc/CHANGES +++ /dev/null @@ -1,13 +0,0 @@ -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.3/doc/TODO b/software/ccollect/download/ccollect-0.3/doc/TODO deleted file mode 100644 index 949d7603..00000000 --- a/software/ccollect/download/ccollect-0.3/doc/TODO +++ /dev/null @@ -1,31 +0,0 @@ -- write mkccollectconfig - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o dialog based? - -- implement pre- and post-exec commands - o what to do with return values? - -- Documentation - - write/generate a manpage - - rsync_options \n seperated - - -DONE -- implement verbosity - o per source (-v to rsync) - o general, very verbose (set -x) -- implement parallel execution -- implement general log -- implement source specific log (canceled) -- the name prefix is currently somehow inconsistent -- Documentation - - rsync_options, example paswd - - write a simple manual - - Hints section - - add note to --exclude=/proc/ vs. --exclude=/proc/* -- implement pre- and post-exec commands - o For the general backup process - o source specific diff --git a/software/ccollect/download/ccollect-0.3/doc/ccollect.html b/software/ccollect/download/ccollect-0.3/doc/ccollect.html deleted file mode 100644 index 33540763..00000000 --- a/software/ccollect/download/ccollect-0.3/doc/ccollect.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - - -ccollect - Installing, Configuring and Using - - - -
-
-

(pseudo) incremental backup -with different exclude lists -using hardlinks and rsync

-
-
-

1. Introduction

-
-

ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only /bin/sh needs to be -bourne shell compatibel (like dash, ksh, zsh, bash, …).

-

1.1. Why you can only backup TO localhost

-

While thinking about the design of ccollect, I thought about enabling -backup to remote hosts. Though this sounds like a nice feature -(Backup my notebook to the server now.), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers to a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure.

-
-

2. Requirements

-
-

2.1. Installing ccollect

-

For the installation, you need at least

-
    -
  • -

    -either cp and chmod or install -

    -
  • -
  • -

    -for more comfort: make -

    -
  • -
  • -

    -for rebuilding the generated documentation: additionally asciidoc -

    -
  • -
-

2.2. Using ccollect

-
Running ccollect requires the following tools installed:
    -
  • -

    -bc -

    -
  • -
  • -

    -cp with support for hard links (cp -al) -

    -
  • -
  • -

    -rsync -

    -
  • -
  • -

    -ssh (if you want to use rsync over ssh, which is recommened for security) -

    -
  • -
-
-

3. Installing

-
-

Either type make install or simply copy it to a directory in your -$PATH and execute chmod 0755 /path/to/ccollect.sh.

-
-

4. Configuring

-
-

4.1. Runtime options

-

ccollect looks for its configuration in /etc/ccollect or, if set, in -the directory specified by the variable $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.

-

4.2. General configuration

-

The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration.

-

All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files.

-

4.2.1. Intervall definition

-

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/<intervall name>.

-

The content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep.

-

Example:

-
-
-
   [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/
-   insgesamt 12
-   -rw-r--r--  1 nico users 3 2005-12-08 10:24 daily
-   -rw-r--r--  1 nico users 3 2005-12-08 11:36 monthly
-   -rw-r--r--  1 nico users 2 2005-12-08 11:36 weekly
-   [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/*
-   28
-   12
-   4
-
-

This means to keep 28 daily backups, 12 monthly backups and 4 weekly.

-

4.2.2. General pre- and post-execution

-

If you add $CCOLLECT_CONF/defaults/pre_exec or -/etc/ccollect/defaults/pre_exec (same with post_exec), ccollect -will start pre_exec before the whole backup process and -post_exec after backup of all sources is done.

-

Example:

-
-
-
[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/
-[13:00] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo '' > /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec
-[13:01] hydrogenium:~# cp /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec
-
-

4.3. Source configuration

-

Each source configuration exists below $CCOLLECT_CONF/sources/$name or -/etc/ccollect/sources/$name.

-

The name you choose for the subdirectory describes the source.

-

Each source has at least the following files:

-
    -
  • -

    -source (a text file containing the rsync compatible path to backup) -

    -
  • -
  • -

    -destination (a link to the directory we should backup to) -

    -
  • -
-

Additionally a source may have the following files:

-
    -
  • -

    -verbose whether to be verbose (passes -v to rsync) -

    -
  • -
  • -

    -very_verbose be very verbose (-v also for mkdir, cp, rm) -

    -
  • -
  • -

    -exclude exclude list for rsync. newline (\n) seperated list. -

    -
  • -
  • -

    -rsync_options' extra options to pass to `rsync -

    -
  • -
  • -

    -pre_exec program to execute before backuping this source -

    -
  • -
  • -

    -post_exec program to execute after backuping this source -

    -
  • -
-

Example:

-
-
-
   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2
-   insgesamt 12
-   lrwxrwxrwx  1 nico users   20 2005-11-17 16:44 destination -> /home/nico/backupdir
-   -rw-r--r--  1 nico users   62 2005-12-07 17:43 exclude
-   drwxr-xr-x  2 nico users 4096 2005-12-07 17:38 intervalls
-   -rw-r--r--  1 nico users   15 2005-11-17 16:44 source
-   [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l  conf/sources/testsource2/intervalls
-   insgesamt 4
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily
-   5
-   [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source
-   /home/nico/vpn
-
-

4.3.1. Detailled description of "source"

-

source describes a rsync compatible source (one line only).

-

For instance backup_user@foreign_host:/home/server/video. -To use the rsync protocol without the ssh-tunnel, use -rsync::USER@HOST/SRC. For more information have a look at rsync(1).

-

4.3.2. Detailled description of "verbose"

-

verbose tells ccollect that the log should contain verbose messages.

-

If this file exists in the source specification -v will be passed to rsync.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose
-
-

4.3.3. Detailled description of "very_verbose"

-

very_verbose tells ccollect that it should log very verbose.

-

If this file exists in the source specification -v will be passed to -rsync, cp, rm and mkdir.

-

Example:

-
-
-
   [23:67] nohost:~% touch conf/sources/testsource1/very_verbose
-
-

4.3.4. Detailled description of "exclude"

-

exclude specifies a list of paths to exclude. The entries are new line (\n) -seperated.

-

Example:

-
-
-
   [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude
-   openvpn-2.0.1.tar.gz
-   nicht_reinnehmen
-   etwas mit leerzeichenli
-   something with spaces is not a problem
-
-

4.3.5. Detailled description of "destination"

-

destination must be a link to the destination directory.

-

Example:

-
-
-
   [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination
-   lrwxrwxrwx  1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir
-
-

4.3.6. Detailled description of "intervalls/"

-

When you create a subdirectory intervalls/ within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall.

-

Example:

-
-
-
   [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/
-   insgesamt 8
-   -rw-r--r--  1 nico users 2 2005-12-07 17:38 daily
-   -rw-r--r--  1 nico users 3 2005-12-14 11:33 yearly
-   [11:37] zaphodbeeblebrox:ccollect-0.2% cat  conf/sources/testsource2/intervalls/*
-   5
-   20
-
-

4.3.7. Detailled description of "rsync_options"

-

When you create the file rsync_options below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("—progress") or which -password-file ("—password-file") -to use for automatic backup over the rsync-protocol.

-

Example:

-
-
-
   [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options
-   --password-file=/home/user/backup/protected_password_file
-
-

4.3.8. Detailled description of "pre_exec" and "post_exec"

-

When you create pre_exec and / or post_exec below your source -configuration, ccollect will execute this command before, -respective after doing the backup for this specific source. -If you want to have pre-/post-exec before and after all -backups, see above for general configuration.

-

Example:

-
-
-
[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec
-#!/bin/sh
-
-# Show whats free before
-df -h
-[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec
-#!/bin/sh
-
-# Show whats free after
-df -h
-
-
-

5. Hints

-
-

5.1. Using rsync protocol without ssh

-

When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify user@host::share in source). You may wish to use -rsync_options to specify a password file to use for automatic backup.

-

Example:

-
-
-
backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source
-backup@webserver::backup-share
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options
---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password
-
-backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password
-this_is_the_rsync_password
-
-

This hint was reported by Daniel Aubry.

-

5.2. Not-excluding top-level directories

-

When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/*" or "/mnt/*" -instead ccollect will backup empty directories.

-
- - - -
-
Note
-
-

When those directories contain hidden files -(those beginning with a dot (.)), -they will still be transferred!

-
-
-

This hint was reported by Marcus Wagner.

-

5.3. Re-using already created rsync-backups

-

If you used rsync directly before you use ccollect, you can -use this old backup as initial backup for ccollect: You -simply move it into a subdirectory named "intervall.0".

-

Example:

-
-
-
backup:/home/backup/web1# ls
-bin   dev  etc   initrd  lost+found  mnt  root  srv  usr  vmlinuz
-boot  doc  home  lib     media       opt  sbin  tmp  var  vmlinuz.old
-
-backup:/home/backup/web1# mkdir daily.0
-
-# ignore error about copying to itself
-backup:/home/backup/web1# mv * daily.0 2>/dev/null
-
-backup:/home/backup/web1# ls
-daily.0
-
-

Now you could use /home/backup/web1 as the destination for the backup.

-
- - - -
-
Note
-
-

Do not name the first backup something like "daily.initial", but use -the "0" (or some very low number, at least lower than the current year) -as extension. ccollect uses sort to find the latest backup. ccollect -itself uses intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID. This notation will -always be before "daily.initial", as numbers are earlier in the list -which is produced by sort. So, if you have a directory named "daily.initial", -ccollect will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete.

-
-
-

5.4. Using pre_/post_exec

-

Your pre_/post_exec script does not need to be a script, you can also -use a link to

-
    -
  • -

    -an existing program -

    -
  • -
  • -

    -an already written script -

    -
  • -
-

The only requirement is that it is executable.

-
-

6. F.A.Q.

-
-

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)

-

6.3. Why does ccollect say "Permission denied" with my pre-/postexec script?

-

The most common error is to not give your script the correct -permissions. Try chmod 0755 /etc/ccollect/sources/yoursource/*_exec.

-
-

7. Examples

-
-

7.1. A backup host configuration from scratch

-
-
-
srwali01:~# mkdir /etc/ccollect
-srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/
-srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich
-srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich
-srwali01:~# cd /etc/ccollect/
-srwali01:/etc/ccollect# mkdir sources
-srwali01:/etc/ccollect# cd sources/
-srwali01:/etc/ccollect/sources# ls
-srwali01:/etc/ccollect/sources# mkdir local-root
-srwali01:/etc/ccollect/sources# cd local-root/
-srwali01:/etc/ccollect/sources/local-root# echo / > source
-srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> EOF
-srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination
-srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root
-srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root
-/o> ccollect.sh: Beginning backup using intervall taeglich
-/=> Beginning to backup "local-root" ...
-|-> 0 backup(s) already exist, keeping 28 backup(s).
-
-

After that, I added some more sources:

-
-
-
srwali01:~# cd /etc/ccollect/sources
-srwali01:/etc/ccollect/sources# mkdir windos-wl6
-srwali01:/etc/ccollect/sources# cd windos-wl6/
-srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source
-srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination
-srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6
-srwali01:/etc/ccollect/sources/windos-wl6# cd ..
-srwali01:/etc/ccollect/sources# mkdir windos-daten
-srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source
-srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination
-srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten
-
-# Now add some remote source
-srwali01:/etc/ccollect/sources/windos-daten# cd ..
-srwali01:/etc/ccollect/sources# mkdir srwali03
-srwali01:/etc/ccollect/sources# cd srwali03/
-srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF
-> /proc
-> /sys
-> /mnt
-> /home
-> EOF
-srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source
-srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination
-srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03
-
-

7.2. Using hard-links requires less disk space

-
-
-
[10:53] srsyg01:sources% du -sh ~/backupdir
-4.6M    /home/nico/backupdir
-[10:53] srsyg01:sources% du -sh ~/backupdir/*
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:52.28456
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28484
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28507
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28531
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28554
-4.1M    /home/nico/backupdir/daily.2005-12-08-10:53.28577
-
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/
-186M    /mnt/hdbackup/wl6/
-srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312
-147M    /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588
-
-
- - - diff --git a/software/ccollect/download/ccollect-0.3/doc/ccollect.text b/software/ccollect/download/ccollect-0.3/doc/ccollect.text deleted file mode 100644 index 718338ca..00000000 --- a/software/ccollect/download/ccollect-0.3/doc/ccollect.text +++ /dev/null @@ -1,490 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.3.0, for ccollect 0.3, Initial Version from 2005-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utitily written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup TO localhost -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While thinking about the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers *to* a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data to it. If someone gets access to the -webserver, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ - -For the installation, you need at least - - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools installed: - - `bc` - - `cp` with support for hard links ('cp -al') - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$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. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration. - -All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files. - - -Intervall definition -^^^^^^^^^^^^^^^^^^^^ -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 content of this file should be a single line containing a number. -This number defines how many versions of this intervall to keep. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervalls/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervalls/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -Example: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# cp /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists below '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source has at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `cp`, `rm`) - - `exclude` exclude list for `rsync`. newline ('\n') seperated list. - - `rsync_options' extra options to pass to `rsync` - - - `pre_exec` program to execute before backuping this source - - `post_exec` program to execute after backuping this source - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervalls - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - -Detailled description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at `rsync`(1). - -Detailled description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - -Detailled description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbose. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `cp`, `rm` and `mkdir`. - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailled description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are new line (\n) -seperated. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailled description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - - -Detailled description of "intervalls/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create a subdirectory `intervalls/` within your source configuration -directory, you can specify individiual intervalls for this specific source. -Each file below this directory describes an intervall. - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervalls/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervalls/* - 5 - 20 --------------------------------------------------------------------------------- - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When you create the file `rsync_options` below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress") or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When you create `pre_exec` and / or `post_exec` below your source -configuration, `ccollect` will execute this command before, -respective after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not-excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'intervall'.0". - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you could use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some very low number, at least lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'intervall.YEAR-MONTH-DAY-HOUR:MINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -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 - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is to not give your script the correct -permissions. Try `chmod 0755 '/etc/ccollect/sources/yoursource/*_exec'`. - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervalls/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervalls/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervalls/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using intervall taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.3/release.sh b/software/ccollect/download/ccollect-0.3/release.sh deleted file mode 100644 index e85077fb..00000000 --- a/software/ccollect/download/ccollect-0.3/release.sh +++ /dev/null @@ -1,22 +0,0 @@ -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.4.1/.gitignore b/software/ccollect/download/ccollect-0.4.1/.gitignore deleted file mode 100644 index 22928846..00000000 --- a/software/ccollect/download/ccollect-0.4.1/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.texi -doc/man/*.man diff --git a/software/ccollect/download/ccollect-0.4.1/COPYING b/software/ccollect/download/ccollect-0.4.1/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.4.1/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.4.1/Makefile b/software/ccollect/download/ccollect-0.4.1/Makefile deleted file mode 100644 index ae98eb1d..00000000 --- a/software/ccollect/download/ccollect-0.4.1/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man - -prefix=/usr/packages/ccollect-git -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=creme.schottelius.org -dir=www/org/schottelius/linux/ccollect -docdir=$(dir)/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text -DOCS = $(MANDOCS) doc/ccollect.text doc/ccollect-DE.text - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage(s)" - @echo "install: install ccollect to $(prefix)" - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 $(CCOLLECT) $(destination) - - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -%.mandocbook: %.text - ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -%.man: %.mandocbook - ${DOCBOOKTOMAN} --to-stdout $< > $@ - -# -# Developer targets -# -update: - @cg-update creme - -push-work: - @cg-push creme - @cg-push sygroup - -publish-doc: documentation - @echo "Transferring files to $(host)" - @chmod a+r doc/*.html doc/*.text - @scp doc/*.text doc/*.html doc/*.texi doc/man/*.man $(host):$(docdir) - @ssh $(host) "cd $(docdir); chmod a+r *" - -# -# Doku -# -HTMLDOCS = $(DOCS:.text=.html) - -TEXIDOCS = $(DOCS:.text=.texi) - -MANPDOCS = $(MANDOCS:.text=.man) - -DOCBDOCS = $(DOCS:.text=.docbook) - - -html: $(HTMLDOCS) - -info: $(TEXIDOCS) - -man: $(MANPDOCS) - -documentation: html info man - -# -# Distribution -# -allclean: - rm -f $(TEXIDOCS) $(HTMLDOCS) $(MANPDOCS) $(DOCBDOCS) - -distclean: - rm -f $(DOCBDOCS) - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation diff --git a/software/ccollect/download/ccollect-0.4.1/README b/software/ccollect/download/ccollect-0.4.1/README deleted file mode 100644 index 7bd7c8d3..00000000 --- a/software/ccollect/download/ccollect-0.4.1/README +++ /dev/null @@ -1,32 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.4.1/ccollect.sh b/software/ccollect/download/ccollect-0.4.1/ccollect.sh deleted file mode 100644 index 59678db8..00000000 --- a/software/ccollect/download/ccollect-0.4.1/ccollect.sh +++ /dev/null @@ -1,461 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.4.1 -RELEASE="2006-06-16" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# Date -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output -# -CDATE="date +%Y-%m-%d-%H%M" -DDATE="date" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s:^:\[$name\] :" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (set \$CCOLLECT_CONF corectly?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVAL=$1; shift -i=1 -no_sources=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPREEXEC failed, aborting backup." - exit 1 - fi -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval source_${no_sources}=\"$tmp\" - no_sources=$(($no_sources+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_sources" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="$CDEFAULTS/intervals/$INTERVAL" -D_INTERVAL=$(cat "$D_FILE_INTERVAL" 2>/dev/null) - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_sources" ]; do - - # - # Get current source - # - eval name=\$source_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - "$0" "$INTERVAL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - begin=$($DDATE) - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - "$c_pre_exec" - echo "Finished ${c_pre_exec}." - - if [ $? -ne 0 ]; then - echo "$c_pre_exec failed, aborting backup." - exit 1 - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "$backup/intervals/$INTERVAL" 2>/dev/null)" - - if [ -z "$c_interval" ]; then - c_interval=$D_INTERVAL - - if [ -z "$c_interval" ]; then - echo "Default and source specific interval missing. Skipping." - exit 1 - fi - fi - - # - # Source checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # exclude list - # - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # - # extra options for rsync - # - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # - # Output a summary - # - if [ -f "$c_summary" ]; then - SUMMARY="--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # - # MORE verbosity, includes standard verbosity - # - if [ -f "$c_vverbose" ]; then - VERBOSE="-v" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVAL-$DATE-$TIME.$PID - count=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | wc -l | sed 's/^ *//g') - echo -n "Currently $count backup(s) exist(s)," - echo " total keeping $c_interval backup(s)." - - if [ "$count" -ge "$c_interval" ]; then - substract=$(echo $c_interval - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVAL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$($CDATE) - destination_dir="$c_dest/${INTERVAL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - echo "Creating $destination_dir ..." - mkdir $VVERBOSE "$destination_dir" - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "$($DDATE) Hard linking..." - cd "$last_dir" - pax -rwl -p e $VVERBOSE . "$destination_dir" - # old, gnu cp specific - # cp -al $VVERBOSE "$last_dir" "$destination_dir" - fi - - if [ $? -ne 0 ]; then - echo -n "$($DDATE) Creating/cloning backup directory failed." - echo " Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "$($DDATE) Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync reported an error. The backup may be broken (see rsync errors)" - fi - - echo "$($DDATE) Finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$($DDATE) Executing $c_post_exec ..." - "$c_post_exec" - echo "$($DDATE) Finished ${c_post_exec}." - - if [ $? -ne 0 ]; then - echo "$c_post_exec failed." - fi - fi - - end_s=$(date +%s) - - full_seconds=$(echo "$end_s - $begin_s" | bc -l) - hours=$(echo $full_seconds / 3600 | bc) - seconds=$(echo "$full_seconds - ($hours * 3600)" | bc) - minutes=$(echo $seconds / 60 | bc) - seconds=$(echo "$seconds - ($minutes * 60)" | bc) - - echo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "$($DDATE) Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "$($DDATE) Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "$($DDATE) Finished ${CPOSTEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPOSTEXEC failed." - fi -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.4.1/conf/defaults/post_exec deleted file mode 100644 index 2192fecd..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. -###################################################################### diff --git a/software/ccollect/download/ccollect-0.4.1/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.4.1/conf/defaults/pre_exec deleted file mode 100644 index eb983c8e..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/defaults/pre_exec +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.4.1/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/fehler b/software/ccollect/download/ccollect-0.4.1/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.4.1/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.4.1/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/destination deleted file mode 120000 index 4d5c4a0d..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.4.1/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.4.1/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.4.1/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.4.1/doc/CHANGES b/software/ccollect/download/ccollect-0.4.1/doc/CHANGES deleted file mode 100644 index 8d90ef45..00000000 --- a/software/ccollect/download/ccollect-0.4.1/doc/CHANGES +++ /dev/null @@ -1,38 +0,0 @@ -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.4.1/doc/TODO b/software/ccollect/download/ccollect-0.4.1/doc/TODO deleted file mode 100644 index 6cb1f723..00000000 --- a/software/ccollect/download/ccollect-0.4.1/doc/TODO +++ /dev/null @@ -1,15 +0,0 @@ -- add --version, -V -- hint: : in path / sed / general problem -- hint: backuping backup -- do we want rsync -H by default? - -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- write mkccollectconfig (for 0.5!) - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.4.1/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.4.1/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.4.1/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.4.1/doc/ccollect.text b/software/ccollect/download/ccollect-0.4.1/doc/ccollect.text deleted file mode 100644 index def64e76..00000000 --- a/software/ccollect/download/ccollect-0.4.1/doc/ccollect.text +++ /dev/null @@ -1,727 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.4.1, for ccollect 0.4-0.4.1, Initial Version from 2006-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `bc` - - `pax` *NEW* (since ccollect 0.4, replaces previously used `cp -al`) - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF' -(set 'CCOLLECT_CONF=/your/config/dir ccollect.sh' on the shell). - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `pax`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperates list. - - `rsync_options` extra options to pass to `rsync` - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `pax`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEAR-MONTH-DAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk: - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.4.1/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.4.1/doc/man/ccollect.text deleted file mode 100644 index 76829992..00000000 --- a/software/ccollect/download/ccollect-0.4.1/doc/man/ccollect.text +++ /dev/null @@ -1,58 +0,0 @@ -ccollect.sh(1) -============== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the texinfo or html documentation. - - -OPTIONS -------- - --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -BUGS ----- -None. - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License (GPL). diff --git a/software/ccollect/download/ccollect-0.4.1/release.sh b/software/ccollect/download/ccollect-0.4.1/release.sh deleted file mode 100644 index b352e3c1..00000000 --- a/software/ccollect/download/ccollect-0.4.1/release.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.4.1/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.4.2/.gitignore b/software/ccollect/download/ccollect-0.4.2/.gitignore deleted file mode 100644 index 22928846..00000000 --- a/software/ccollect/download/ccollect-0.4.2/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.texi -doc/man/*.man diff --git a/software/ccollect/download/ccollect-0.4.2/COPYING b/software/ccollect/download/ccollect-0.4.2/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.4.2/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.4.2/Makefile b/software/ccollect/download/ccollect-0.4.2/Makefile deleted file mode 100644 index ae98eb1d..00000000 --- a/software/ccollect/download/ccollect-0.4.2/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man - -prefix=/usr/packages/ccollect-git -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=creme.schottelius.org -dir=www/org/schottelius/linux/ccollect -docdir=$(dir)/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text -DOCS = $(MANDOCS) doc/ccollect.text doc/ccollect-DE.text - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage(s)" - @echo "install: install ccollect to $(prefix)" - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 $(CCOLLECT) $(destination) - - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -%.mandocbook: %.text - ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -%.man: %.mandocbook - ${DOCBOOKTOMAN} --to-stdout $< > $@ - -# -# Developer targets -# -update: - @cg-update creme - -push-work: - @cg-push creme - @cg-push sygroup - -publish-doc: documentation - @echo "Transferring files to $(host)" - @chmod a+r doc/*.html doc/*.text - @scp doc/*.text doc/*.html doc/*.texi doc/man/*.man $(host):$(docdir) - @ssh $(host) "cd $(docdir); chmod a+r *" - -# -# Doku -# -HTMLDOCS = $(DOCS:.text=.html) - -TEXIDOCS = $(DOCS:.text=.texi) - -MANPDOCS = $(MANDOCS:.text=.man) - -DOCBDOCS = $(DOCS:.text=.docbook) - - -html: $(HTMLDOCS) - -info: $(TEXIDOCS) - -man: $(MANPDOCS) - -documentation: html info man - -# -# Distribution -# -allclean: - rm -f $(TEXIDOCS) $(HTMLDOCS) $(MANPDOCS) $(DOCBDOCS) - -distclean: - rm -f $(DOCBDOCS) - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation diff --git a/software/ccollect/download/ccollect-0.4.2/README b/software/ccollect/download/ccollect-0.4.2/README deleted file mode 100644 index 7bd7c8d3..00000000 --- a/software/ccollect/download/ccollect-0.4.2/README +++ /dev/null @@ -1,32 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.4.2/ccollect.sh b/software/ccollect/download/ccollect-0.4.2/ccollect.sh deleted file mode 100644 index 5cd55331..00000000 --- a/software/ccollect/download/ccollect-0.4.2/ccollect.sh +++ /dev/null @@ -1,464 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.4.2 -RELEASE="2006-06-17" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# Date -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output -# -CDATE="date +%Y-%m-%d-%H%M" -DDATE="date" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s:^:\[$name\] :" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (set \$CCOLLECT_CONF corectly?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVAL=$1; shift -i=1 -no_sources=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPREEXEC failed, aborting backup." - exit 1 - fi -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval source_${no_sources}=\"$tmp\" - no_sources=$(($no_sources+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_sources" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="$CDEFAULTS/intervals/$INTERVAL" -D_INTERVAL=$(cat "$D_FILE_INTERVAL" 2>/dev/null) - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_sources" ]; do - - # - # Get current source - # - eval name=\$source_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - "$0" "$INTERVAL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - begin=$($DDATE) - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - "$c_pre_exec" - echo "Finished ${c_pre_exec}." - - if [ $? -ne 0 ]; then - echo "$c_pre_exec failed, aborting backup." - exit 1 - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "$backup/intervals/$INTERVAL" 2>/dev/null)" - - if [ -z "$c_interval" ]; then - c_interval=$D_INTERVAL - - if [ -z "$c_interval" ]; then - echo "Default and source specific interval missing. Skipping." - exit 1 - fi - fi - - # - # Source checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # exclude list - # - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # - # extra options for rsync - # - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # - # Output a summary - # - if [ -f "$c_summary" ]; then - SUMMARY="--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # - # MORE verbosity, includes standard verbosity - # - if [ -f "$c_vverbose" ]; then - VERBOSE="-v" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVAL-$DATE-$TIME.$PID - count=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | wc -l | sed 's/^ *//g') - echo -n "Currently $count backup(s) exist(s)," - echo " total keeping $c_interval backup(s)." - - if [ "$count" -ge "$c_interval" ]; then - substract=$(echo $c_interval - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVAL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$($CDATE) - destination_dir="$c_dest/${INTERVAL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - echo "Creating $destination_dir ..." - mkdir $VVERBOSE "$destination_dir" - - # - # make an absolute path, perhaps $CCOLLECT_CONF is relative! - # - abs_destination_dir=$(cd $destination_dir; pwd) - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "$($DDATE) Hard linking..." - cd "$last_dir" - pax -rwl -p e $VVERBOSE . "$abs_destination_dir" - fi - - if [ $? -ne 0 ]; then - echo -n "$($DDATE) Creating/cloning backup directory failed." - echo " Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "$($DDATE) Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$abs_destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync reported an error. The backup may be broken (see rsync errors)" - fi - - echo "$($DDATE) Finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$($DDATE) Executing $c_post_exec ..." - "$c_post_exec" - echo "$($DDATE) Finished ${c_post_exec}." - - if [ $? -ne 0 ]; then - echo "$c_post_exec failed." - fi - fi - - end_s=$(date +%s) - - full_seconds=$(echo "$end_s - $begin_s" | bc -l) - hours=$(echo $full_seconds / 3600 | bc) - seconds=$(echo "$full_seconds - ($hours * 3600)" | bc) - minutes=$(echo $seconds / 60 | bc) - seconds=$(echo "$seconds - ($minutes * 60)" | bc) - - echo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "$($DDATE) Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "$($DDATE) Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "$($DDATE) Finished ${CPOSTEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPOSTEXEC failed." - fi -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.4.2/conf/defaults/post_exec deleted file mode 100644 index 2192fecd..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. -###################################################################### diff --git a/software/ccollect/download/ccollect-0.4.2/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.4.2/conf/defaults/pre_exec deleted file mode 100644 index eb983c8e..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/defaults/pre_exec +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.4.2/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/fehler b/software/ccollect/download/ccollect-0.4.2/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.4.2/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.4.2/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/destination deleted file mode 120000 index 4d5c4a0d..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.4.2/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.4.2/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.4.2/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.4.2/doc/CHANGES b/software/ccollect/download/ccollect-0.4.2/doc/CHANGES deleted file mode 100644 index 1f1a23ea..00000000 --- a/software/ccollect/download/ccollect-0.4.2/doc/CHANGES +++ /dev/null @@ -1,42 +0,0 @@ -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.4.2/doc/TODO b/software/ccollect/download/ccollect-0.4.2/doc/TODO deleted file mode 100644 index 497a448b..00000000 --- a/software/ccollect/download/ccollect-0.4.2/doc/TODO +++ /dev/null @@ -1,17 +0,0 @@ -- ssh / rsync problem - -> ssh noch nie genutzt -- add --version, -V -- hint: : in path / sed / general problem -- hint: backuping backup -- do we want rsync -H by default? - -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- write mkccollectconfig (for 0.5!) - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.4.2/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.4.2/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.4.2/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.4.2/doc/ccollect.text b/software/ccollect/download/ccollect-0.4.2/doc/ccollect.text deleted file mode 100644 index 4313669d..00000000 --- a/software/ccollect/download/ccollect-0.4.2/doc/ccollect.text +++ /dev/null @@ -1,776 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.4.2, for ccollect 0.4-0.4.2, Initial Version from 2006-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace 0.4.2 with the current version -export CCV=0.4.2 -wget http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create a sample interval -echo 42 > miniconfig/defaults/intervals/testinterval - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source -ln -s ~/DASI miniconfig/sources/testsource/destination -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -# do the backup, twice -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource --------------------------------------------------------------------------------- - -By the way: Cut and paste of the complete section above into your -shell will result in downloading ccollect, creating a sample configuration -and doing the backup two times. - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `bc` - - `pax` *NEW* (since ccollect 0.4, replaces previously used `cp -al`) - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `pax`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperates list. - - `rsync_options` extra options to pass to `rsync` - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `pax`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEAR-MONTH-DAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk: - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.4.2/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.4.2/doc/man/ccollect.text deleted file mode 100644 index 76829992..00000000 --- a/software/ccollect/download/ccollect-0.4.2/doc/man/ccollect.text +++ /dev/null @@ -1,58 +0,0 @@ -ccollect.sh(1) -============== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the texinfo or html documentation. - - -OPTIONS -------- - --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -BUGS ----- -None. - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License (GPL). diff --git a/software/ccollect/download/ccollect-0.4.2/release.sh b/software/ccollect/download/ccollect-0.4.2/release.sh deleted file mode 100644 index b352e3c1..00000000 --- a/software/ccollect/download/ccollect-0.4.2/release.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.4.2/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.4/.gitignore b/software/ccollect/download/ccollect-0.4/.gitignore deleted file mode 100644 index 8c5cd187..00000000 --- a/software/ccollect/download/ccollect-0.4/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html diff --git a/software/ccollect/download/ccollect-0.4/COPYING b/software/ccollect/download/ccollect-0.4/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.4/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.4/Makefile b/software/ccollect/download/ccollect-0.4/Makefile deleted file mode 100644 index 701f08fb..00000000 --- a/software/ccollect/download/ccollect-0.4/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf - -prefix=/usr/packages/ccollect-git -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=creme.schottelius.org -dir=www/org/schottelius/linux/ccollect -docdir=$(dir)/doc - -# -# End user targets -# -all: - @echo "Nothing to make, make install." - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 -s $(CCOLLECT) $(destination) - -documentation: - @echo "Generating HTML-documentation (de en) ..." - @asciidoc -n -o doc/ccollect.html doc/ccollect.text - @asciidoc -n -o doc/ccollect-DE.html doc/ccollect-DE.text - -# -# Developer targets -# -update: - @cg-update creme - -push-work: - @cg-push creme - @cg-push sygroup - -publish-doc: documentation - @echo "Transferring files to $(host)" - @chmod a+r doc/*.html doc/*.text - @scp doc/*.text doc/*.html $(host):$(docdir) diff --git a/software/ccollect/download/ccollect-0.4/README b/software/ccollect/download/ccollect-0.4/README deleted file mode 100644 index 93b5f64c..00000000 --- a/software/ccollect/download/ccollect-0.4/README +++ /dev/null @@ -1,26 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text german Manual in text format (externally maintained) -doc/ccollect-DE.html german Manual in xhtml (generated) - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -[0]: ccollect: http://linux.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.4/ccollect.sh b/software/ccollect/download/ccollect-0.4/ccollect.sh deleted file mode 100644 index ddcf4713..00000000 --- a/software/ccollect/download/ccollect-0.4/ccollect.sh +++ /dev/null @@ -1,435 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.4 -RELEASE="2006-04-29" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s/^/\[$name\] /" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://linux.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (set \$CCOLLECT_CONF corectly?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVAL=$1; shift -i=1 -no_sources=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really really really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd) - cd "$CSOURCES"; - ls > "$TMP" - - while read tmp; do - eval source_${no_sources}=\"$tmp\" - no_sources=$(($no_sources+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_sources" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="$CDEFAULTS/intervals/$INTERVAL" -D_INTERVAL=$(cat "$D_FILE_INTERVAL" 2>/dev/null) - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPREEXEC failed, aborting backup." - exit 1 - fi -fi - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_sources" ]; do - - # - # Get current source - # - eval name=\$source_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - "$0" "$INTERVAL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - begin=$(date) - begin_s=$(date +%s) - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "$backup/intervals/$INTERVAL" 2>/dev/null)" - - if [ -z "$c_interval" ]; then - c_interval=$D_INTERVAL - - if [ -z "$c_interval" ]; then - echo "Default and source specific interval missing. Skipping." - exit 1 - fi - fi - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - # - # next configuration checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # pre_exec - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - "$c_pre_exec" - echo "Finished ${c_pre_exec}." - - if [ $? -ne 0 ]; then - echo "$c_pre_exec failed, aborting backup." - exit 1 - fi - fi - - # exclude - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # extra options for rsync - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # Output a summary - if [ -f "$c_summary" ]; then - SUMMARY="--stats" - fi - - # Verbosity for rsync - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # MORE verbosity, includes standard verbosity - if [ -f "$c_vverbose" ]; then - VERBOSE="-v" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVAL.$DA - count=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | wc -l) - echo -n "Currently $count backup(s) exist(s)," - echo " total keeping $c_interval backup(s)." - - if [ "$count" -ge "$c_interval" ]; then - substract=$(echo $c_interval - 1 | bc) - remove=$(echo $count - $substract | bc) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVAL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$(date +%Y-%m-%d-%H%M) - destination_dir="$c_dest/${INTERVAL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - echo "Creating $destination_dir ..." - mkdir $VVERBOSE "$destination_dir" - - # only copy if a directory exists - if [ "$last_dir" ]; then - echo "$(date) Hard linking..." - cd "$last_dir" - pax -rwl -p e $VVERBOSE . "$destination_dir" - # old, gnu cp specific - # cp -al $VVERBOSE "$last_dir" "$destination_dir" - fi - - if [ $? -ne 0 ]; then - echo -n "$(date) Creating/cloning backup directory failed." - echo " Skipping backup." - exit 1 - fi - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "$(date) Transferring files..." - - rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ - --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" - - if [ "$?" -ne 0 ]; then - echo "rsync reported an error. The backup may be broken (see rsync errors)" - fi - - echo "$(date) Finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$(date) Executing $c_post_exec ..." - "$c_post_exec" - echo "$(date) Finished ${c_post_exec}." - - if [ $? -ne 0 ]; then - echo "$c_post_exec failed." - fi - fi - - end_s=$(date +%s) - - full_seconds=$(echo "$end_s - $begin_s" | bc -l) - hours=$(echo $full_seconds / 3600 | bc) - seconds=$(echo "$full_seconds - ($hours * 3600)" | bc) - minutes=$(echo $seconds / 60 | bc) - seconds=$(echo "$seconds - ($minutes * 60)" | bc) - - echo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "$(date) Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "$(date) Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "$(date) Finished ${CPOSTEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPOSTEXEC failed." - fi -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/daily b/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/monthly b/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/weekly b/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/defaults/intervalls/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.4/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.4/conf/defaults/post_exec deleted file mode 100644 index 2192fecd..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. -###################################################################### diff --git a/software/ccollect/download/ccollect-0.4/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.4/conf/defaults/pre_exec deleted file mode 100644 index eb983c8e..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/defaults/pre_exec +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.4/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/fehler b/software/ccollect/download/ccollect-0.4/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.4/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.4/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/destination deleted file mode 120000 index 4d5c4a0d..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/source deleted file mode 100644 index f8ea6e1e..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/bilder diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.4/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.4/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.4/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.4/doc/CHANGES b/software/ccollect/download/ccollect-0.4/doc/CHANGES deleted file mode 100644 index 184f3ae5..00000000 --- a/software/ccollect/download/ccollect-0.4/doc/CHANGES +++ /dev/null @@ -1,30 +0,0 @@ -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.4/doc/TODO b/software/ccollect/download/ccollect-0.4/doc/TODO deleted file mode 100644 index da9c65b1..00000000 --- a/software/ccollect/download/ccollect-0.4/doc/TODO +++ /dev/null @@ -1,51 +0,0 @@ -- Test pax - http://www.opengroup.org/onlinepubs/009695399/utilities/pax.html - Perhaps replace cp -al? - - --> WRITE DOCU / update to use pax - -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs - - write about CHANGED BEHAVIOUR of PRE/POST-EXEC - - write about PAX! -- write mkccollectconfig - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based - -- implement pre- and post-exec commands - o what to do with return values? - -> Check them, abort on error - -- Documentation - - write/generate a manpage - - -DONE -- implement verbosity - o per source (-v to rsync) - o general, very verbose (set -x) -- implement parallel execution -- implement general log -- implement source specific log (canceled) -- the name prefix is currently somehow inconsistent -- Documentation - - rsync_options, example paswd - - write a simple manual - - Hints section - - add note to --exclude=/proc/ vs. --exclude=/proc/* - - rsync_options \n seperated -- implement pre- and post-exec commands - o For the general backup process - o source specific -testen, ob : im dateinamen..., wenn ja, raus damit! - -Aenderungen aufschreiben - -pax einpflegen - - diff --git a/software/ccollect/download/ccollect-0.4/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.4/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.4/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.4/doc/ccollect.text b/software/ccollect/download/ccollect-0.4/doc/ccollect.text deleted file mode 100644 index 50d28d2f..00000000 --- a/software/ccollect/download/ccollect-0.4/doc/ccollect.text +++ /dev/null @@ -1,718 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.4.0, for ccollect 0.4, Initial Version from 2006-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup TO localhost -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While thinking about the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), it is in my opinion a -bad idea to backup to a remote host, because you have to open -security at your backup host. Think of the following situation: You backup -your farm of webservers *to* a backup host somewhere else. One of -your webservers gets compromised, then your backup server will be compromised, -too. Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, the person will perhaps not even see your machine. If -he/she sees that there are connections from a host to the compromised -machine, he/she will not be able to login to the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit, when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation, you need at least - - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools installed: - - `bc` - - `pax` *NEW* (since ccollect 0.4, replaces previously used `cp -al`) - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF' -(use 'CCOLLECT_CONF=/your/config/dir ccollect.sh' on the shell). - -When you start `ccollect`, you have either to specify which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below). - -The interval 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. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found below $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified here are generally valid for -all source definitions. Though the values can be overwritten in the source -configuration. - -All configuration entries are plain-text (use UTF-8 if you use -non ASCII characters) files. - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found below -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Every file below this directory specifies an interval. The name of the file is the -name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval to keep. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists below '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source has at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `pax`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperated list. - - `rsync_options` extra options to pass to `rsync` - - - `pre_exec` program to execute before backuping *this* source - - `post_exec` program to execute after backuping *this* source - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailled description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailled description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailled description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbose. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `pax`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailled description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` below the source definition, -`ccollect` will present you with a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but they -already print some statistics (but not all / the same as presented by -`summary`). - - -Detailled description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are new line (\n) -seperated. - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailled description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To speak truth, this is not fully correct. `ccollect` will also backup -your data, if `destination` is a directory. But do you really want to have -a backup below /etc? - - -Detailled description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create a subdirectory `intervals/` within your source configuration -directory, you can specify individiual intervals for this specific source. -Each file below this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` below your source configuration, -all the parameters found in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress") or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` below your source -configuration, `ccollect` will execute this command before, -respective after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not-excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you could use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some very low number, at least lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEAR-MONTH-DAY-HOUR:MINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -What happens, if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume, that one backup failed (connection broke or the source -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. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is to not give your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail, when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious, when you have a deeper look -into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure until it creates the symbolic link. -This link now links to something not reachable (dead link). So it is -impossible to create subdirectories below the broken link. - -So, the conclusion is you cannot use paths with a linked part. - -*BUT* you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk: - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.4/release.sh b/software/ccollect/download/ccollect-0.4/release.sh deleted file mode 100644 index b352e3c1..00000000 --- a/software/ccollect/download/ccollect-0.4/release.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@creme.schottelius.org -DDIR=www/org/schottelius/linux/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.4/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.5.1/.gitignore b/software/ccollect/download/ccollect-0.5.1/.gitignore deleted file mode 100644 index 22928846..00000000 --- a/software/ccollect/download/ccollect-0.5.1/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.texi -doc/man/*.man diff --git a/software/ccollect/download/ccollect-0.5.1/COPYING b/software/ccollect/download/ccollect-0.5.1/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.5.1/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.5.1/Makefile b/software/ccollect/download/ccollect-0.5.1/Makefile deleted file mode 100644 index 72b1a0af..00000000 --- a/software/ccollect/download/ccollect-0.5.1/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man - -prefix=/usr/packages/ccollect-git -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=home.schottelius.org -dir=www/org/schottelius/unix/www/ccollect/ -docdir=$(dir)/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text -DOCS = $(MANDOCS) doc/ccollect.text doc/ccollect-DE.text - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage(s)" - @echo "install: install ccollect to $(prefix)" - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 $(CCOLLECT) $(destination) - - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -%.mandocbook: %.text - ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -%.man: %.mandocbook - ${DOCBOOKTOMAN} --to-stdout $< > $@ - -# -# Developer targets -# -update: - @cg-update home - -push-work: - @cg-push home - @cg-push sygroup - -publish-doc: documentation - @echo "Transferring files to $(host)" - @chmod a+r doc/*.html doc/*.text - @scp doc/*.text doc/*.html doc/*.texi doc/man/*.man $(host):$(docdir) - @ssh $(host) "cd $(docdir); chmod a+r *" - -# -# Doku -# -HTMLDOCS = $(DOCS:.text=.html) - -TEXIDOCS = $(DOCS:.text=.texi) - -MANPDOCS = $(MANDOCS:.text=.man) - -DOCBDOCS = $(DOCS:.text=.docbook) - - -html: $(HTMLDOCS) - -info: $(TEXIDOCS) - -man: $(MANPDOCS) - -documentation: html info man - -# -# Distribution -# -allclean: - rm -f $(TEXIDOCS) $(HTMLDOCS) $(MANPDOCS) $(DOCBDOCS) - -distclean: - rm -f $(DOCBDOCS) - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation diff --git a/software/ccollect/download/ccollect-0.5.1/README b/software/ccollect/download/ccollect-0.5.1/README deleted file mode 100644 index a4f60386..00000000 --- a/software/ccollect/download/ccollect-0.5.1/README +++ /dev/null @@ -1,32 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.5.1/TODO b/software/ccollect/download/ccollect-0.5.1/TODO deleted file mode 100644 index 260d07aa..00000000 --- a/software/ccollect/download/ccollect-0.5.1/TODO +++ /dev/null @@ -1,42 +0,0 @@ -09:30 < KillerFox> -F bzw. --filter -09:30 < KillerFox> -F dir-merge .backuprules -09:30 < KillerFox> rsync ist ein Optionenmonster -09:31 < KillerFox> telmich: man rsync; / FILTER RULES -09:31 < KillerFox> telmich: es ist nur ein Vorschlag, der noch nett wäre :-). -09:32 < KillerFox> telmich: btw. mir ist noch was aufgefallen. Wenn du nur ein eine - Backupversion behalten willst, könnte man rsync etwas - effizienter nutzen. -09:32 < KillerFox> zur Zeit ist es ja so, dass das alte Verzeichnis gekillt wird - und dann wieder neu gespiegelt -09:32 < KillerFox> aber wenn man nur eine Backupversion besitzt könnte man einfach - rsync drüber laufen lassen. -09:33 < KillerFox> so würde dann nur immer die differenz übertragen. -09:34 < KillerFox> -F'dir-merge,.backuprules', das wäre die korrekte Option. -09:34 < telmich> KillerFox: ah, du meinst im spezialfall, wenn es nur ein - verzeichnis gibt? -09:35 < KillerFox> das würde dann pro Verzeichnis nach .backuprules suchen. -09:35 < KillerFox> telmich: genau. -09:35 < KillerFox> und die Regeln aus .backuprules befolgen. -09:35 < telmich> KillerFox: ich denke, das werde ich erstmal in die tipps mit - aufnehmen, denn man kann es ja via rsync_options aendern -09:35 < KillerFox> telmich: das stimmt. -09:35 < KillerFox> RSYNC_EXTRA -09:36 < KillerFox> die Syntax für .backuprules kann man dann in man rsync; /FILTER - RULES nachlesen. - -09:37 < KillerFox> telmich: okay. -09:37 < KillerFox> telmich: das ist nur ein Vorschlag was mir so aufgefallen ist. -09:38 < KillerFox> telmich: btw. der Vorschlag mit einem Verzeichnis kommt übrigens - von Frank. Ich hatte ihm gestern ccollect für die Spiegelung - seines System empfohlen (da ich wusste, dass rsync für ihn - alleine zu kompliziert ist) -09:38 < KillerFox> telmich: er hat da irgendwie echo '1' > daily gemacht und sich - dann gewundert, wieso er immer alles neu überträgt -09:38 < KillerFox> was bei einer angeschlossenen Platte mit USB 1.1 sehr lange - dauern kann -09:39 < KillerFox> da wäre die differenz Ideal. -09:40 < KillerFox> ich habe nur ccollect mit mehr als einer Version im Einsatz ;-) -09:40 < KillerFox> darum ist mir das nie aufgefallen. -09:40 < KillerFox> aber eigentlich logisch. --------------------------------------------------------------------------------- -sven / markierung diff --git a/software/ccollect/download/ccollect-0.5.1/ccollect.sh b/software/ccollect/download/ccollect-0.5.1/ccollect.sh deleted file mode 100644 index 093213ea..00000000 --- a/software/ccollect/download/ccollect-0.5.1/ccollect.sh +++ /dev/null @@ -1,474 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.5.1 -RELEASE="2006-10-19" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# Date -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output -# -CDATE="date +%Y-%m-%d-%H%M" -DDATE="date" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s:^:\[$name\] :" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (is \$CCOLLECT_CONF properly set?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVAL=$1; shift -i=1 -no_sources=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really, really, really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPREEXEC failed, not starting backup." - exit 1 - fi -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - cd "$CSOURCES"; - ls > "$TMP" - - if [ "$?" -ne 0 ]; then - echo "Listing of sources failed. Aborting." - exit 1 - fi - - while read tmp; do - eval source_${no_sources}=\"$tmp\" - no_sources=$(($no_sources+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_sources" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="$CDEFAULTS/intervals/$INTERVAL" -D_INTERVAL=$(cat "$D_FILE_INTERVAL" 2>/dev/null) - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_sources" ]; do - - # - # Get current source - # - eval name=\$source_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - "$0" "$INTERVAL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - begin=$($DDATE) - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - "$c_pre_exec" - echo "Finished ${c_pre_exec}." - - if [ $? -ne 0 ]; then - echo "$c_pre_exec failed, aborting backup." - exit 1 - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "$backup/intervals/$INTERVAL" 2>/dev/null)" - - if [ -z "$c_interval" ]; then - c_interval=$D_INTERVAL - - if [ -z "$c_interval" ]; then - echo "Default and source specific interval missing. Skipping." - exit 1 - fi - fi - - # - # Source checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # exclude list - # - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # - # extra options for rsync - # - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # - # Output a summary - # - if [ -f "$c_summary" ]; then - SUMMARY="--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # - # MORE verbosity, includes standard verbosity - # - if [ -f "$c_vverbose" ]; then - VERBOSE="-v" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVAL-$DATE-$TIME.$PID - count=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | wc -l | sed 's/^ *//g') - echo -n "Currently $count backup(s) exist(s)," - echo " total keeping $c_interval backup(s)." - - if [ "$count" -ge "$c_interval" ]; then - substract=$((${c_interval} - 1)) - remove=$(($count - $substract)) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVAL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$($CDATE) - destination_dir="$c_dest/${INTERVAL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - echo "Creating $destination_dir ..." - mkdir $VVERBOSE "$destination_dir" - - # - # make an absolute path, perhaps $CCOLLECT_CONF is relative! - # - abs_destination_dir="$(cd $destination_dir && pwd -P)" - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "$($DDATE) Transferring files..." - - ouropts="-a --delete --numeric-ids --relative --delete-excluded" - useropts="$VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA" - - # Clone from previous backup, if existing - if [ "$last_dir" ]; then - - # - # This directory MUST be absolute, because rsync does chdir() - # before beginning backup! - # - abs_last_dir="$(cd "$last_dir" && pwd -P)" - if [ -z "$abs_last_dir" ]; then - echo "Changing to the backup destination failed. I skip this backup." - exit 1 - fi - - rsync_hardlink="--link-dest=$abs_last_dir" - rsync $ouropts "$rsync_hardlink" $useropts "$source" "$abs_destination_dir" - else - rsync $ouropts $useropts "$source" "$abs_destination_dir" - fi - - if [ "$?" -ne 0 ]; then - echo "rsync reported error $?. The backup may be broken (see rsync errors)." - fi - - echo "$($DDATE) Finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$($DDATE) Executing $c_post_exec ..." - "$c_post_exec" - echo "$($DDATE) Finished ${c_post_exec}." - - if [ $? -ne 0 ]; then - echo "$c_post_exec failed." - fi - fi - - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$(($full_seconds / 3600)) - seconds=$(($full_seconds - ($hours * 3600))) - minutes=$(($seconds / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - echo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "$($DDATE) Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "$($DDATE) Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "$($DDATE) Finished ${CPOSTEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPOSTEXEC failed." - fi -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.5.1/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.5.1/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.5.1/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.5.1/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/fehler b/software/ccollect/download/ccollect-0.5.1/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.5.1/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.5.1/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/source deleted file mode 100644 index 46b885f6..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/test2 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/verbose b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource1/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.5.1/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.5.1/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.5.1/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.5.1/doc/CHANGES b/software/ccollect/download/ccollect-0.5.1/doc/CHANGES deleted file mode 100644 index 838e0a4d..00000000 --- a/software/ccollect/download/ccollect-0.5.1/doc/CHANGES +++ /dev/null @@ -1,54 +0,0 @@ -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.5.1/doc/TODO b/software/ccollect/download/ccollect-0.5.1/doc/TODO deleted file mode 100644 index 497a448b..00000000 --- a/software/ccollect/download/ccollect-0.5.1/doc/TODO +++ /dev/null @@ -1,17 +0,0 @@ -- ssh / rsync problem - -> ssh noch nie genutzt -- add --version, -V -- hint: : in path / sed / general problem -- hint: backuping backup -- do we want rsync -H by default? - -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- write mkccollectconfig (for 0.5!) - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.5.1/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.5.1/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.5.1/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.5.1/doc/ccollect.text b/software/ccollect/download/ccollect-0.5.1/doc/ccollect.text deleted file mode 100644 index 3cf6b288..00000000 --- a/software/ccollect/download/ccollect-0.5.1/doc/ccollect.text +++ /dev/null @@ -1,794 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.5, for ccollect 0.4-0.5.1, Initial Version from 2006-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace 0.5 with the current version -export CCV=0.5 - -# -# replace 'wget' with fetch on bsd -# -holen=wget -"$holen" http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create a sample interval -echo 42 > miniconfig/defaults/intervals/testinterval - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source -ln -s ~/DASI miniconfig/sources/testsource/destination -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -# do the backup, twice -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -# Let's see how much space we used with two backups and compare it to /bin -du -s ~/DASI /bin - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of two backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperates list. - - `rsync_options` extra options to pass to `rsync` - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEAR-MONTH-DAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.5.1/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.5.1/doc/man/ccollect.text deleted file mode 100644 index 76829992..00000000 --- a/software/ccollect/download/ccollect-0.5.1/doc/man/ccollect.text +++ /dev/null @@ -1,58 +0,0 @@ -ccollect.sh(1) -============== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the texinfo or html documentation. - - -OPTIONS -------- - --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -BUGS ----- -None. - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License (GPL). diff --git a/software/ccollect/download/ccollect-0.5.1/doc/release-checklist b/software/ccollect/download/ccollect-0.5.1/doc/release-checklist deleted file mode 100644 index c4ed7aab..00000000 --- a/software/ccollect/download/ccollect-0.5.1/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.5.1/release.sh b/software/ccollect/download/ccollect-0.5.1/release.sh deleted file mode 100644 index d93f1f9e..00000000 --- a/software/ccollect/download/ccollect-0.5.1/release.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.5.1/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.5.1/tools/list_intervals.sh b/software/ccollect/download/ccollect-0.5.1/tools/list_intervals.sh deleted file mode 100644 index 463f9b47..00000000 --- a/software/ccollect/download/ccollect-0.5.1/tools/list_intervals.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 24-Jun-2006 -# Last Modified: - -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -if [ ! -d "$CCOLLECT_INTERVALS" ]; then - echo "No intervals defined in $CCOLLECT_INTERVALS" - exit 23 -fi - -cd "$CCOLLECT_INTERVALS" - -for interval in *; do - eval int_$interval=$(cat $interval); - eval echo $interval: \$int_$interval; -done diff --git a/software/ccollect/download/ccollect-0.5.2/.gitignore b/software/ccollect/download/ccollect-0.5.2/.gitignore deleted file mode 100644 index c9c33f0a..00000000 --- a/software/ccollect/download/ccollect-0.5.2/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.htm -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.htm -doc/man/*.texi -doc/man/*.man -test/* diff --git a/software/ccollect/download/ccollect-0.5.2/COPYING b/software/ccollect/download/ccollect-0.5.2/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.5.2/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.5.2/CREDITS b/software/ccollect/download/ccollect-0.5.2/CREDITS deleted file mode 100644 index 3f362708..00000000 --- a/software/ccollect/download/ccollect-0.5.2/CREDITS +++ /dev/null @@ -1,5 +0,0 @@ -Thanks go to the following people: - - - the whole #cLinux channel for testing and debugging - (those I mean should know ;-) - - Alexey Maximov for finding return-value and shell limitation bugs diff --git a/software/ccollect/download/ccollect-0.5.2/Makefile b/software/ccollect/download/ccollect-0.5.2/Makefile deleted file mode 100644 index 0b50e4ef..00000000 --- a/software/ccollect/download/ccollect-0.5.2/Makefile +++ /dev/null @@ -1,122 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man -XSLTPROC=xsltproc -XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl - -prefix=/usr/packages/ccollect-git -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=home.schottelius.org -dir=www/org/schottelius/unix/www/ccollect/ -docdir=$(dir)/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text -DOCS = $(MANDOCS) doc/ccollect.text doc/ccollect-DE.text - -# -# Doku -# -HTMLDOCS = $(DOCS:.text=.html) -DBHTMLDOCS = $(DOCS:.text=.htm) - -TEXIDOCS = $(DOCS:.text=.texi) - -MANPDOCS = $(MANDOCS:.text=.man) - -DOCBDOCS = $(DOCS:.text=.docbook) - -DOC_ALL = $(HTMLDOCS) $(DBHTMLDOCS) $(TEXIDOCS) $(MANPDOCS) - -html: $(HTMLDOCS) -htm: $(DBHTMLDOCS) -info: $(TEXIDOCS) -man: $(MANPDOCS) -documentation: $(DOC_ALL) - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage(s)" - @echo "install: install ccollect to $(prefix)" - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 $(CCOLLECT) $(destination) - - -# docbook gets .htm, asciidoc directly .html -%.htm: %.docbook - ${XSLTPROC} -o $@ ${XSL} $< - -%.html: %.text %.docbook - ${ASCIIDOC} -n -o $@ $< - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -%.mandocbook: %.text - ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -%.man: %.mandocbook - ${DOCBOOKTOMAN} --to-stdout $< > $@ - -# -# Developer targets -# -update: - @cg-update home - -push-work: - @cg-push home - @cg-push sygroup - -publish-doc: documentation - @echo "Transferring files to $(host)" - @chmod a+r $(DOCS) $(DOC_ALL) - @tar c $(DOCS) $(DOC_ALL) | ssh $(host) "cd $(dir); tar xv" - -# -# Distribution -# -allclean: - rm -f $(DOC_ALL) - -distclean: allclean - rm -f $(DOCBDOCS) - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation diff --git a/software/ccollect/download/ccollect-0.5.2/README b/software/ccollect/download/ccollect-0.5.2/README deleted file mode 100644 index ad6a1816..00000000 --- a/software/ccollect/download/ccollect-0.5.2/README +++ /dev/null @@ -1,62 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - does unecessary moving of backup directories - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -A small try to visualize the differnces in a table: - -+---------------+-------------------------------------------------------------+ -| What? | rsnapshot | ccollect | -+---------------+-------------------------------------------------------------+ -| Configuration | tab separated, needs | plain cconfig-style | -| | parsing | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| post-/pre- | no | yes | -| execution | | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| exclude lists | no | yes | -+---------------+-------------------------------------------------------------+ -| Parallel | | | -| execution | | | -| of multiple | no | yes | -| backups | | | -+---------------+-------------------------------------------------------------+ -| Programming | perl | sh | -| language | | (posix compatible) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 6636 | 476 | -| (2006-10-25) | | | -+---------------+-------------------------------------------------------------+ -| Age | Available since 2002/2003 | Written at 2005-11-14 | -+---------------+-------------------------------------------------------------+ - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.5.2/ccollect.sh b/software/ccollect/download/ccollect-0.5.2/ccollect.sh deleted file mode 100644 index d8a3e0e5..00000000 --- a/software/ccollect/download/ccollect-0.5.2/ccollect.sh +++ /dev/null @@ -1,546 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.5.2 -RELEASE="2007-01-27" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output -# -CDATE="date +%Y-%m-%d-%H%M" -DDATE="date" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - -# -# Functions -# - -_exit_err() -{ - echo "$@" - rm -f "$TMP" - exit 1 -} - -add_name() -{ - sed "s:^:\[$name\] :" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory, FIXME: _exit_err -# -[ -d "$CCOLLECT_CONF" ] || _exit_err "No configuration found in " \ - "\"$CCOLLECT_CONF\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -INTERVAL=$1; shift -i=1 -no_sources=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really, really, really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - ret=$? - echo "Finished ${CPREEXEC}." - - # FIXME: _exit_err - if [ $ret -ne 0 ]; then - echo "$CPREEXEC failed, not starting backup." - exit 1 - fi -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "$CSOURCES" && ls > "$TMP" ) - - # FIXME: _exit_err - if [ "$?" -ne 0 ]; then - echo "Listing of sources failed. Aborting." - exit 1 - fi - - while read tmp; do - eval source_${no_sources}=\"$tmp\" - no_sources=$(($no_sources+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_sources" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="$CDEFAULTS/intervals/$INTERVAL" -D_INTERVAL=$(cat "$D_FILE_INTERVAL" 2>/dev/null) - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_sources" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - "$0" "$INTERVAL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - c_verbose="$backup/verbose" - c_vverbose="$backup/very_verbose" - c_rsync_extra="$backup/rsync_options" - c_summary="$backup/summary" - - # - # FIXME: enable in 0.6 - # - #c_incomplete="$backup/incomplete_remove" - #c_marker=".ccollect-${CDATE}.$$" - - c_pre_exec="$backup/pre_exec" - c_post_exec="$backup/post_exec" - - begin=$($DDATE) - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "$c_pre_exec" ]; then - echo "Executing ${c_pre_exec} ..." - "$c_pre_exec" - ret="$?" - echo "Finished ${c_pre_exec}." - - if [ "$ret" -ne 0 ]; then - echo "$c_pre_exec failed. Skipping." - exit 1 - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "$backup/intervals/$INTERVAL" 2>/dev/null)" - - if [ -z "$c_interval" ]; then - c_interval="$D_INTERVAL" - - if [ -z "$c_interval" ]; then - echo "No definition for interval \"$INTERVAL\" found. Skipping." - exit 1 - fi - fi - - # - # Source checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Source $c_source is not readable. Skipping." - exit 1 - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest neither links to nor is a directory. Skipping." - exit 1 - fi - - # - # exclude list - # - if [ -f "$c_exclude" ]; then - # FIXME: check how quoting at the end looks like - # perhaps our source contains spaces! - EXCLUDE="--exclude-from=$c_exclude" - fi - - # - # extra options for rsync - # - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # - # Output a summary - # - if [ -f "$c_summary" ]; then - SUMMARY="--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # - # MORE verbosity, includes standard verbosity - # - if [ -f "$c_vverbose" ]; then - VERBOSE="-v" - VVERBOSE="-v" - fi - -# # -# # show if we shall remove partial backup, and whether the last one -# # is incomplete or not -# # -# # FIXME: test general for incomplete and decide only for warn|delete based on option? -# # FIXME: Define which is the last dir before? Or put this thing into -# # a while loop? Is it senseful to remove _ALL_ backups if non is complete? -# if [ -f "$c_incomplete" ]; then -# last_dir=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1) -# -# # check whether the last backup was incomplete -# # STOPPED HERE -# # todo: implement rm -rf, implement warning on non-cleaning -# # implement the marknig and normal removing -# if [ "$last_dir" ]; then -# incomplete=$(cd "$last_dir" && ls .ccollect-????-??-) -# if [ "$incomplete" ]; then -# "Removing incomplete backup $last_dir ..." -# echo rm -rf $VVERBOSE "$last_dir" -# fi -# fi -# fi -# - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVAL-$DATE-$TIME.$PID - count=$(cd "$c_dest" && ls -p1 | grep "^${INTERVAL}\..*/\$" | wc -l | sed 's/^ *//g') - echo -n "Currently $count backup(s) exist(s)," - echo " total keeping $c_interval backup(s)." - - if [ "$count" -ge "$c_interval" ]; then - substract=$((${c_interval} - 1)) - remove=$(($count - $substract)) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVAL}."?* | sort -n | head -n "$remove" > "$TMP" - #( cd "$c_dest" && ls -p1 | grep "^${INTERVAL}\..*/\$" | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - # FIXME: STOPPED - - destination_date=$($CDATE) - destination_dir="$c_dest/${INTERVAL}.${destination_date}.$$" - - # - # FIXME: In 0.6 add search for the latest available backup! - # - last_dir=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - echo "Creating $destination_dir ..." - mkdir $VVERBOSE "$destination_dir" || \ - _exit_err "Creating $destination_dir failed. Skipping." - - # - # make an absolute path, perhaps $CCOLLECT_CONF is relative! - # - abs_destination_dir="$(cd "$destination_dir" && pwd -P)" - - # - # FIXME: add mark in 0.6 (and remove if successful later! - # - #touch "${abs_destination_dir}/${c_marker}" - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "$($DDATE) Transferring files..." - - ouropts="-a --delete --numeric-ids --relative --delete-excluded" - - # - # FIXME: check, whether this is broken with spaces... - # most likely it should be broken...MUST be... - # expanding depens on shell (zsh = 1, dash = 3 arguments in test case) - # - useropts="$VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA" - - # - # FIXME:useropts / rsync extra: one parameter per line! - # 0.5.3! - # - - # Clone from previous backup, if existing - if [ "$last_dir" ]; then - - # - # This directory MUST be absolute, because rsync does chdir() - # before beginning backup! - # - - abs_last_dir="$(cd "$last_dir" && pwd -P)" - if [ -z "$abs_last_dir" ]; then - echo "Changing to the last backup directory failed. Skipping." - exit 1 - fi - - rsync_hardlink="--link-dest=$abs_last_dir" - rsync $ouropts "$rsync_hardlink" $useropts "$source" "$abs_destination_dir" - else - rsync $ouropts $useropts "$source" "$abs_destination_dir" - fi - - ret=$? - - if [ "$ret" -ne 0 ]; then - echo "rsync reported error $ret. The backup may be broken (see rsync errors)." - fi - - # - # FIXME: remove marking here - # rm -f $c_marker - # - - echo "$($DDATE) Finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$($DDATE) Executing $c_post_exec ..." - "$c_post_exec" - ret=$? - echo "$($DDATE) Finished ${c_post_exec}." - - if [ $ret -ne 0 ]; then - echo "$c_post_exec failed." - fi - fi - - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$(($full_seconds / 3600)) - seconds=$(($full_seconds - ($hours * 3600))) - minutes=$(($seconds / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - echo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "$($DDATE) Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "$($DDATE) Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - ret=$? - echo "$($DDATE) Finished ${CPOSTEXEC}." - - if [ $ret -ne 0 ]; then - echo "$CPOSTEXEC failed." - fi -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.5.2/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.5.2/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.5.2/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.5.2/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/fehler b/software/ccollect/download/ccollect-0.5.2/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/destination b/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/exclude b/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/intervalls/daily b/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/source b/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/source deleted file mode 100644 index 46b885f6..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/test2 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/verbose b/software/ccollect/download/ccollect-0.5.2/conf/sources/source with spaces/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.5.2/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.5.2/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.5.2/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.5.2/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.5.2/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.5.2/doc/CHANGES b/software/ccollect/download/ccollect-0.5.2/doc/CHANGES deleted file mode 100644 index e1637084..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/CHANGES +++ /dev/null @@ -1,59 +0,0 @@ -0.5.1 to 0.5.2: - * Display correct error code, if rsync returns non-zero - * Unify messages - * Remove some potential quoting problems - -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.5.2/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.5.2/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.5.2/doc/ccollect.text b/software/ccollect/download/ccollect-0.5.2/doc/ccollect.text deleted file mode 100644 index 5c31677a..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/ccollect.text +++ /dev/null @@ -1,860 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.5, for ccollect 0.4-0.5.2, Initial Version from 2006-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace value for CCV with the current version -export CCV=0.5.1 - -# -# replace 'wget' with fetch on bsd -# -holen=wget -"$holen" http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create a sample interval -echo 42 > miniconfig/defaults/intervals/testinterval - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source -ln -s ~/DASI miniconfig/sources/testsource/destination -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -# do the backup, twice -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -# Let's see how much space we used with two backups and compare it to /bin -du -s ~/DASI /bin - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of two backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperates list. - - `rsync_options` extra options to pass to `rsync` - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEAR-MONTH-DAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - - -Using source specific interval definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you are backing up multiple hosts via cron each night, it may be -a problem that host "big_server" may only have 4 daily backups, because -otherwise its backup device will be full. But for all other hosts -you want to keep 20 daily backups. In this case you would create -`/etc/ccollect/default/intervals/daily` containing "20" and -`/etc/ccollect/sources/big_server/intervals/daily` containing "4". - -Source specific intervals always overwrite the default values. -If you have to specify it individually for every host, because -of different requirements, you can even omit creating -`/etc/ccollect/default/intervals/daily`. - - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- - - -Processes running when doing ccollect -p -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Truncated output from `ps axuwwwf`: - -------------------------------------------------------------------------- - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily -p ddba034 ddba045 ddba046 ddba047 ddba049 ddna010 ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - R+ 11:40 23:40 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddba034 - S+ 11:40 0:00 | | | | | \_ ssh -l root ddba034.netstream.ch rsync --server --sender -vlogDtprR --numeric-ids . / - S+ 11:41 0:11 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddb - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba034\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba045/destination/daily.2006-10-19-1807.6934 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba045\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba046/destination/daily.2006-10-19-1810.7072 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba046\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba047/destination/daily.2006-10-19-1816.7268 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba047\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - D+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba049/destination/daily.2006-10-19-1821.7504 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba049\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddna010/destination/daily.2006-10-19-1805.6849 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddna010\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - R+ 12:08 0:00 | | | | \_ rm -rf /etc/ccollect/sources/ddna011/destination/daily.2006-10-20-1502.7824 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ sed s:^:\[ddna011\] : - -------------------------------------------------------------------------- -As you can see, six processes are deleting old backups, while one backup -(ddba034) is already copying data. - diff --git a/software/ccollect/download/ccollect-0.5.2/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.5.2/doc/man/ccollect.text deleted file mode 100644 index 76829992..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/man/ccollect.text +++ /dev/null @@ -1,58 +0,0 @@ -ccollect.sh(1) -============== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the texinfo or html documentation. - - -OPTIONS -------- - --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -BUGS ----- -None. - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License (GPL). diff --git a/software/ccollect/download/ccollect-0.5.2/doc/release-checklist b/software/ccollect/download/ccollect-0.5.2/doc/release-checklist deleted file mode 100644 index 7cba30cd..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version and date in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.5.2/doc/todo/0.5.2 b/software/ccollect/download/ccollect-0.5.2/doc/todo/0.5.2 deleted file mode 100644 index 0c1c2250..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/todo/0.5.2 +++ /dev/null @@ -1,4 +0,0 @@ -x Fix $? problem -x Check last dir searching -x Check count generation -x Check general functionality (remove testing) diff --git a/software/ccollect/download/ccollect-0.5.2/doc/todo/0.5.3 b/software/ccollect/download/ccollect-0.5.2/doc/todo/0.5.3 deleted file mode 100644 index c843cdf1..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/todo/0.5.3 +++ /dev/null @@ -1,11 +0,0 @@ -- check and export variables for use in scripts! -- documentation: -F / --filter for rsync -X join todos -- fix possible quoting problems - * rsync_extra (redefine format) - * exclude - * other - * create _rsync, filtering args, creating new $@ -- remove exit-calls - * will leave behind unused temporary file! - * use _exit_err diff --git a/software/ccollect/download/ccollect-0.5.2/doc/todo/0.6 b/software/ccollect/download/ccollect-0.5.2/doc/todo/0.6 deleted file mode 100644 index 4732ab61..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/todo/0.6 +++ /dev/null @@ -1,44 +0,0 @@ -- implement use of different intervals as source for cloning - * use 'woechentlich' if available and no backup exists for 'daily' - * add 'prefer_latest' to prefer different interval, that's newer than - ours - * or add 'prefer_same_interval' instead? -- implement detection of partial backups -3. detect unfinished backups -sven / markierung - - wie seht der Marker aus? - -> .ccollect-YEAR-MM-DD.HHmm.pid (like the directory) - --> assume incomplete, when we did not finish. - --> means it's complete,when rsync was successful ----> partial implemented in 0.5.2 (commented out) -- do not check by name, but by time - * is ls -t posix? - * also check: -p -1 -- do sed-time check: - -1.2. replace sed? -compare timing: -_echo () { echo "$name $msg" } -and create -_techo () { echo "$timestamp $name $msg" } -perhaps create -_eecho () { _techo "ERROR $msg" } -? - -- ccollect Zeitausgabe verbessern - - Wofuer wie lange gebraucht - * rm - * klonen (gibt es so ja nicht) - Wenn Summary angegeben ist am Ende ausgeben -- add --version, -V -- do we want rsync -H by default? - - -Documentation: -- hint: backuping backup -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs - - diff --git a/software/ccollect/download/ccollect-0.5.2/doc/todo/extern b/software/ccollect/download/ccollect-0.5.2/doc/todo/extern deleted file mode 100644 index 9be8f2be..00000000 --- a/software/ccollect/download/ccollect-0.5.2/doc/todo/extern +++ /dev/null @@ -1,23 +0,0 @@ -These todos are things that would be senseful todo, but are just nice -to have. This means I won't code them, so somebody can code them. --------------------------------------------------------------------------------- - -- Add ccollect-restore.sh - (new project, perhaps coordinated with jchome's ccollect-config) - - Helper (in dialog?) to restore backups - - Perhaps create ccollect-gui.{whatever} instead, which does all the - end user staff? - - Including cronjob, creating configuration, displaying status of - backups, allowing manual remove, allowing manual trigger of ccollect - (with realtime message window?)? - -- write mkccollectconfig (for 0.5!) - -> jchome works on it! - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/Makefile b/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/Makefile deleted file mode 100644 index c14c77d8..00000000 --- a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# New ports collection makefile for: oneko -# New ports collection makefile for: ccollect -# Date created: 2006-10-20 -# Whom: Nico Schottelius -# -# $FreeBSD$ -# - -PORTNAME= ccollect -PORTVERSION= 0.5.1 -CATEGORIES= sysutils archivers -MASTER_SITES= http://unix.schottelius.org/ccollect/ - -MAINTAINER= nico-fbsd-ccollect@schottelius.org -COMMENT= (pseudo) incremental (parallel) backup - -MAN1= ccollect.sh.1 -MANCOMPRESSED= no -USE_BZIP2= yes - -RUN_DEPENDS= rsync:${PORTSDIR}/net/rsync - -.include diff --git a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/distinfo b/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/distinfo deleted file mode 100644 index 9e1b6fe5..00000000 --- a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -MD5 (ccollect-0.5.1.tar.bz2) = 8601a6d6de52ba839768e2804ca57499 -SIZE (ccollect-0.5.1.tar.bz2) = 37397 diff --git a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/pkg-descr b/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/pkg-descr deleted file mode 100644 index c822c6ed..00000000 --- a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -This is a port of ccollect, a backup utility which creates -fullbackups with the space needed of incremental backups. - -WWW: http://unix.schottelius.org/ccollect/ diff --git a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/pkg-list b/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/pkg-list deleted file mode 100644 index c1d82f97..00000000 --- a/software/ccollect/download/ccollect-0.5.2/external/freebsd-port/pkg-list +++ /dev/null @@ -1 +0,0 @@ -bin/ccollect.sh diff --git a/software/ccollect/download/ccollect-0.5.2/release.sh b/software/ccollect/download/ccollect-0.5.2/release.sh deleted file mode 100644 index b38ee59a..00000000 --- a/software/ccollect/download/ccollect-0.5.2/release.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -# create documentation for the end user -( - cd "$NAME" - make dist -) - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" - -cat "${NAME}/doc/release-checklist" diff --git a/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.5.2/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.5.2/tools/list_intervals.sh b/software/ccollect/download/ccollect-0.5.2/tools/list_intervals.sh deleted file mode 100644 index 463f9b47..00000000 --- a/software/ccollect/download/ccollect-0.5.2/tools/list_intervals.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 24-Jun-2006 -# Last Modified: - -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -if [ ! -d "$CCOLLECT_INTERVALS" ]; then - echo "No intervals defined in $CCOLLECT_INTERVALS" - exit 23 -fi - -cd "$CCOLLECT_INTERVALS" - -for interval in *; do - eval int_$interval=$(cat $interval); - eval echo $interval: \$int_$interval; -done diff --git a/software/ccollect/download/ccollect-0.5/.gitignore b/software/ccollect/download/ccollect-0.5/.gitignore deleted file mode 100644 index 22928846..00000000 --- a/software/ccollect/download/ccollect-0.5/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.texi -doc/man/*.man diff --git a/software/ccollect/download/ccollect-0.5/COPYING b/software/ccollect/download/ccollect-0.5/COPYING deleted file mode 100644 index 3912109b..00000000 --- a/software/ccollect/download/ccollect-0.5/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/software/ccollect/download/ccollect-0.5/Makefile b/software/ccollect/download/ccollect-0.5/Makefile deleted file mode 100644 index 72b1a0af..00000000 --- a/software/ccollect/download/ccollect-0.5/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man - -prefix=/usr/packages/ccollect-git -bindir=$(prefix)/bin -destination=$(bindir)/$(CCOLLECT) - -path_dir=/usr/local/bin -path_destination=$(path_dir)/$(CCOLLECT) - -# where to publish -host=home.schottelius.org -dir=www/org/schottelius/unix/www/ccollect/ -docdir=$(dir)/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text -DOCS = $(MANDOCS) doc/ccollect.text doc/ccollect-DE.text - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage(s)" - @echo "install: install ccollect to $(prefix)" - -install: install-script install-link - -install-link: install-script - $(LN) $(destination) $(path_destination) - -install-script: - $(INSTALL) -D -m 0755 $(CCOLLECT) $(destination) - - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -%.mandocbook: %.text - ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -%.man: %.mandocbook - ${DOCBOOKTOMAN} --to-stdout $< > $@ - -# -# Developer targets -# -update: - @cg-update home - -push-work: - @cg-push home - @cg-push sygroup - -publish-doc: documentation - @echo "Transferring files to $(host)" - @chmod a+r doc/*.html doc/*.text - @scp doc/*.text doc/*.html doc/*.texi doc/man/*.man $(host):$(docdir) - @ssh $(host) "cd $(docdir); chmod a+r *" - -# -# Doku -# -HTMLDOCS = $(DOCS:.text=.html) - -TEXIDOCS = $(DOCS:.text=.texi) - -MANPDOCS = $(MANDOCS:.text=.man) - -DOCBDOCS = $(DOCS:.text=.docbook) - - -html: $(HTMLDOCS) - -info: $(TEXIDOCS) - -man: $(MANPDOCS) - -documentation: html info man - -# -# Distribution -# -allclean: - rm -f $(TEXIDOCS) $(HTMLDOCS) $(MANPDOCS) $(DOCBDOCS) - -distclean: - rm -f $(DOCBDOCS) - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation diff --git a/software/ccollect/download/ccollect-0.5/README b/software/ccollect/download/ccollect-0.5/README deleted file mode 100644 index a4f60386..00000000 --- a/software/ccollect/download/ccollect-0.5/README +++ /dev/null @@ -1,32 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.5/TODO b/software/ccollect/download/ccollect-0.5/TODO deleted file mode 100644 index 260d07aa..00000000 --- a/software/ccollect/download/ccollect-0.5/TODO +++ /dev/null @@ -1,42 +0,0 @@ -09:30 < KillerFox> -F bzw. --filter -09:30 < KillerFox> -F dir-merge .backuprules -09:30 < KillerFox> rsync ist ein Optionenmonster -09:31 < KillerFox> telmich: man rsync; / FILTER RULES -09:31 < KillerFox> telmich: es ist nur ein Vorschlag, der noch nett wäre :-). -09:32 < KillerFox> telmich: btw. mir ist noch was aufgefallen. Wenn du nur ein eine - Backupversion behalten willst, könnte man rsync etwas - effizienter nutzen. -09:32 < KillerFox> zur Zeit ist es ja so, dass das alte Verzeichnis gekillt wird - und dann wieder neu gespiegelt -09:32 < KillerFox> aber wenn man nur eine Backupversion besitzt könnte man einfach - rsync drüber laufen lassen. -09:33 < KillerFox> so würde dann nur immer die differenz übertragen. -09:34 < KillerFox> -F'dir-merge,.backuprules', das wäre die korrekte Option. -09:34 < telmich> KillerFox: ah, du meinst im spezialfall, wenn es nur ein - verzeichnis gibt? -09:35 < KillerFox> das würde dann pro Verzeichnis nach .backuprules suchen. -09:35 < KillerFox> telmich: genau. -09:35 < KillerFox> und die Regeln aus .backuprules befolgen. -09:35 < telmich> KillerFox: ich denke, das werde ich erstmal in die tipps mit - aufnehmen, denn man kann es ja via rsync_options aendern -09:35 < KillerFox> telmich: das stimmt. -09:35 < KillerFox> RSYNC_EXTRA -09:36 < KillerFox> die Syntax für .backuprules kann man dann in man rsync; /FILTER - RULES nachlesen. - -09:37 < KillerFox> telmich: okay. -09:37 < KillerFox> telmich: das ist nur ein Vorschlag was mir so aufgefallen ist. -09:38 < KillerFox> telmich: btw. der Vorschlag mit einem Verzeichnis kommt übrigens - von Frank. Ich hatte ihm gestern ccollect für die Spiegelung - seines System empfohlen (da ich wusste, dass rsync für ihn - alleine zu kompliziert ist) -09:38 < KillerFox> telmich: er hat da irgendwie echo '1' > daily gemacht und sich - dann gewundert, wieso er immer alles neu überträgt -09:38 < KillerFox> was bei einer angeschlossenen Platte mit USB 1.1 sehr lange - dauern kann -09:39 < KillerFox> da wäre die differenz Ideal. -09:40 < KillerFox> ich habe nur ccollect mit mehr als einer Version im Einsatz ;-) -09:40 < KillerFox> darum ist mir das nie aufgefallen. -09:40 < KillerFox> aber eigentlich logisch. --------------------------------------------------------------------------------- -sven / markierung diff --git a/software/ccollect/download/ccollect-0.5/ccollect.sh b/software/ccollect/download/ccollect-0.5/ccollect.sh deleted file mode 100644 index 3c56f715..00000000 --- a/software/ccollect/download/ccollect-0.5/ccollect.sh +++ /dev/null @@ -1,476 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults -CPREEXEC="$CDEFAULTS/pre_exec" -CPOSTEXEC="$CDEFAULTS/post_exec" - -TMP=$(mktemp /tmp/$(basename $0).XXXXXX) -VERSION=0.5 -RELEASE="2006-10-15" -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# -# Date -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output -# -CDATE="date +%Y-%m-%d-%H%M" -DDATE="date" - -# -# unset parallel execution -# -PARALLEL="" - - -# -# catch signals -# -trap "rm -f \"$TMP\"" 1 2 15 - - -add_name() -{ - sed "s:^:\[$name\] :" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in $CSOURCES" - echo " -v, --verbose: Be very verbose (uses set -x)." - echo "" - echo " This is version $VERSION, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -if [ ! -d "$CCOLLECT_CONF" ]; then - echo "No configuration found in \"$CCOLLECT_CONF\"" \ - " (is \$CCOLLECT_CONF properly set?)" - exit 1 -fi - -# -# Filter arguments -# -INTERVAL=$1; shift -i=1 -no_sources=0 - -while [ $i -le $# ]; do - eval arg=\$$i - - if [ "$NO_MORE_ARGS" = 1 ]; then - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - else - case $arg in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL="1" - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# -# be really, really, really verbose -# -if [ "$VERBOSE" = 1 ]; then - set -x -fi - -# -# Look for pre-exec command (general) -# -if [ -x "$CPREEXEC" ]; then - echo "Executing $CPREEXEC ..." - "$CPREEXEC" - echo "Finished ${CPREEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPREEXEC failed, not starting backup." - exit 1 - fi -fi - -# -# Look, if we should take ALL sources -# -if [ "$ALL" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - cd "$CSOURCES"; - ls > "$TMP" - - if [ "$?" -ne 0 ]; then - echo "Listing of sources failed. Aborting." - exit 1 - fi - - while read tmp; do - eval source_${no_sources}=\"$tmp\" - no_sources=$(($no_sources+1)) - done < "$TMP" -fi - -# -# Need at least ONE source to backup -# -if [ "$no_sources" -lt 1 ]; then - usage -else - echo "==> $HALF_VERSION: Beginning backup using interval $INTERVAL <==" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="$CDEFAULTS/intervals/$INTERVAL" -D_INTERVAL=$(cat "$D_FILE_INTERVAL" 2>/dev/null) - -# -# Let's do the backup -# -i=0 -while [ "$i" -lt "$no_sources" ]; do - - # - # Get current source - # - eval name=\$source_${i} - i=$(($i+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "$PARALLEL" ]; then - "$0" "$INTERVAL" "$name" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Standard locations - # - backup="$CSOURCES/$name" - c_source="$backup/source" - c_dest="$backup/destination" - c_exclude="$backup/exclude" - 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" - - begin=$($DDATE) - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - - echo "$begin Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "$backup" ]; then - echo "Source does not exist." - exit 1 - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "$backup" ]; then - echo "\"$name\" is not a cconfig-directory. Skipping." - exit 1 - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "$c_pre_exec" ]; then - echo "Executing $c_pre_exec ..." - "$c_pre_exec" - echo "Finished ${c_pre_exec}." - - if [ $? -ne 0 ]; then - echo "$c_pre_exec failed, aborting backup." - exit 1 - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "$backup/intervals/$INTERVAL" 2>/dev/null)" - - if [ -z "$c_interval" ]; then - c_interval=$D_INTERVAL - - if [ -z "$c_interval" ]; then - echo "Default and source specific interval missing. Skipping." - exit 1 - fi - fi - - # - # Source checks - # - if [ ! -f "$c_source" ]; then - echo "Source description $c_source is not a file. Skipping." - exit 1 - else - source=$(cat "$c_source") - if [ $? -ne 0 ]; then - echo "Skipping: Source $c_source is not readable" - exit 1 - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "$c_dest" ]; then - echo "Destination $c_dest does not link to a directory. Skipping" - exit 1 - fi - - # - # exclude list - # - if [ -f "$c_exclude" ]; then - EXCLUDE="--exclude-from=$c_exclude" - fi - - # - # extra options for rsync - # - if [ -f "$c_rsync_extra" ]; then - RSYNC_EXTRA="$(cat "$c_rsync_extra")" - fi - - # - # Output a summary - # - if [ -f "$c_summary" ]; then - SUMMARY="--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "$c_verbose" ]; then - VERBOSE="-v" - fi - - # - # MORE verbosity, includes standard verbosity - # - if [ -f "$c_vverbose" ]; then - VERBOSE="-v" - VVERBOSE="-v" - fi - - # - # check if maximum number of backups is reached, if so remove - # - - # the created directories are named $INTERVAL-$DATE-$TIME.$PID - count=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | wc -l | sed 's/^ *//g') - echo -n "Currently $count backup(s) exist(s)," - echo " total keeping $c_interval backup(s)." - - if [ "$count" -ge "$c_interval" ]; then - substract=$((${c_interval} - 1)) - remove=$(($count - $substract)) - echo "Removing $remove backup(s)..." - - ls -d "$c_dest/${INTERVAL}."?* | sort -n | head -n $remove > "$TMP" - while read to_remove; do - dir="$to_remove" - echo "Removing $dir ..." - rm $VVERBOSE -rf "$dir" - done < "$TMP" - fi - - # - # clone the old directory with hardlinks - # - - destination_date=$($CDATE) - destination_dir="$c_dest/${INTERVAL}.${destination_date}.$$" - - last_dir=$(ls -d "$c_dest/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1) - - # give some info - echo "Beginning to backup, this may take some time..." - - echo "Creating $destination_dir ..." - mkdir $VVERBOSE "$destination_dir" - - # - # make an absolute path, perhaps $CCOLLECT_CONF is relative! - # - abs_destination_dir="$(cd $destination_dir && pwd -P)" - - # - # the rsync part - # options partly stolen from rsnapshot - # - - echo "$($DDATE) Transferring files..." - - ouropts="-a --delete --numeric-ids --relative --delete-excluded" - useropts="$VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA" - - # Clone from previous backup, if existing - set -x - if [ "$last_dir" ]; then - - # - # This directory MUST be absolute, because rsync does chdir() - # before beginning backup! - # - abs_last_dir="$(cd "$last_dir" && pwd -P)" - if [ -z "$abs_last_dir" ]; then - echo "Changing to the backup destination failed. I skip this backup." - exit 1 - fi - - rsync_hardlink="--link-dest=$abs_last_dir" - rsync $ouropts "$rsync_hardlink" $useropts "$source" "$abs_destination_dir" - else - rsync $ouropts $useropts "$source" "$abs_destination_dir" - fi - set +x - - if [ "$?" -ne 0 ]; then - echo "rsync reported error $?. The backup may be broken (see rsync errors)." - fi - - echo "$($DDATE) Finished backup" - - # - # post_exec - # - if [ -x "$c_post_exec" ]; then - echo "$($DDATE) Executing $c_post_exec ..." - "$c_post_exec" - echo "$($DDATE) Finished ${c_post_exec}." - - if [ $? -ne 0 ]; then - echo "$c_post_exec failed." - fi - fi - - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$(($full_seconds / 3600)) - seconds=$(($full_seconds - ($hours * 3600))) - minutes=$(($seconds / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - echo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "$PARALLEL" ]; then - echo "$($DDATE) Waiting for child jobs to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "$CPOSTEXEC" ]; then - echo "$($DDATE) Executing $CPOSTEXEC ..." - "$CPOSTEXEC" - echo "$($DDATE) Finished ${CPOSTEXEC}." - - if [ $? -ne 0 ]; then - echo "$CPOSTEXEC failed." - fi -fi - -rm -f "$TMP" -echo "==> Finished $WE <==" diff --git a/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.5/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.5/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.5/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.5/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.5/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/fehler b/software/ccollect/download/ccollect-0.5/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.5/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.5/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/destination b/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/exclude b/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/intervalls/daily b/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/source b/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/source deleted file mode 100644 index 46b885f6..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/test2 diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/verbose b/software/ccollect/download/ccollect-0.5/conf/sources/testsource1/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.5/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.5/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/source deleted file mode 100644 index c76e2883..00000000 --- a/software/ccollect/download/ccollect-0.5/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect-0.3/ diff --git a/software/ccollect/download/ccollect-0.5/doc/CHANGES b/software/ccollect/download/ccollect-0.5/doc/CHANGES deleted file mode 100644 index c604c641..00000000 --- a/software/ccollect/download/ccollect-0.5/doc/CHANGES +++ /dev/null @@ -1,51 +0,0 @@ -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.5/doc/TODO b/software/ccollect/download/ccollect-0.5/doc/TODO deleted file mode 100644 index 497a448b..00000000 --- a/software/ccollect/download/ccollect-0.5/doc/TODO +++ /dev/null @@ -1,17 +0,0 @@ -- ssh / rsync problem - -> ssh noch nie genutzt -- add --version, -V -- hint: : in path / sed / general problem -- hint: backuping backup -- do we want rsync -H by default? - -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- write mkccollectconfig (for 0.5!) - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.5/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.5/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.5/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.5/doc/ccollect.text b/software/ccollect/download/ccollect-0.5/doc/ccollect.text deleted file mode 100644 index 6626530d..00000000 --- a/software/ccollect/download/ccollect-0.5/doc/ccollect.text +++ /dev/null @@ -1,789 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.5, for ccollect 0.4-0.5, Initial Version from 2006-01-13 -:Author Initials: NS - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - -Introduction ------------- -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace 0.4.2 with the current version -export CCV=0.5 -wget http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create a sample interval -echo 42 > miniconfig/defaults/intervals/testinterval - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source -ln -s ~/DASI miniconfig/sources/testsource/destination -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -# do the backup, twice -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -# Let's see how much space we used with two backups and compare it to /bin -du -s ~/DASI /bin - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of two backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (-v also for `mkdir`, `rm`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline ('\n') seperates list. - - `rsync_options` extra options to pass to `rsync` - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Hints ------ - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEAR-MONTH-DAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- diff --git a/software/ccollect/download/ccollect-0.5/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.5/doc/man/ccollect.text deleted file mode 100644 index 76829992..00000000 --- a/software/ccollect/download/ccollect-0.5/doc/man/ccollect.text +++ /dev/null @@ -1,58 +0,0 @@ -ccollect.sh(1) -============== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -ccollect is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the texinfo or html documentation. - - -OPTIONS -------- - --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -BUGS ----- -None. - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License (GPL). diff --git a/software/ccollect/download/ccollect-0.5/release.sh b/software/ccollect/download/ccollect-0.5/release.sh deleted file mode 100644 index d93f1f9e..00000000 --- a/software/ccollect/download/ccollect-0.5/release.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" diff --git a/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.5/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.5/tools/list_intervals.sh b/software/ccollect/download/ccollect-0.5/tools/list_intervals.sh deleted file mode 100644 index 463f9b47..00000000 --- a/software/ccollect/download/ccollect-0.5/tools/list_intervals.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 24-Jun-2006 -# Last Modified: - -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -if [ ! -d "$CCOLLECT_INTERVALS" ]; then - echo "No intervals defined in $CCOLLECT_INTERVALS" - exit 23 -fi - -cd "$CCOLLECT_INTERVALS" - -for interval in *; do - eval int_$interval=$(cat $interval); - eval echo $interval: \$int_$interval; -done diff --git a/software/ccollect/download/ccollect-0.6.1/.gitignore b/software/ccollect/download/ccollect-0.6.1/.gitignore deleted file mode 100644 index 4e9c74d5..00000000 --- a/software/ccollect/download/ccollect-0.6.1/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.htm -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.htm -doc/man/*.texi -doc/man/*.man -test/* -.*.swp -doc/man/*.[0-9] -doc/*.xml -doc/*/*.xml -*.texi -*.fo diff --git a/software/ccollect/download/ccollect-0.6.1/COPYING b/software/ccollect/download/ccollect-0.6.1/COPYING deleted file mode 100644 index fc8a5de7..00000000 --- a/software/ccollect/download/ccollect-0.6.1/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/software/ccollect/download/ccollect-0.6.1/CREDITS b/software/ccollect/download/ccollect-0.6.1/CREDITS deleted file mode 100644 index 1616f6f3..00000000 --- a/software/ccollect/download/ccollect-0.6.1/CREDITS +++ /dev/null @@ -1,10 +0,0 @@ -Thanks go to the following people: - -* the whole #cLinux channel - - for testing and debugging (those I mean should know ;-) -* Alexey Maximov - - for finding return-value and shell limitation bugs -* Markus Meier - - for finding a really simple solution for choosing the right backup to - clone from: Make it independent of the interval, simply choose the last - one created. diff --git a/software/ccollect/download/ccollect-0.6.1/Makefile b/software/ccollect/download/ccollect-0.6.1/Makefile deleted file mode 100644 index b5a7995e..00000000 --- a/software/ccollect/download/ccollect-0.6.1/Makefile +++ /dev/null @@ -1,155 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT_SOURCE=ccollect.sh -CCOLLECT_DEST=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man -XSLTPROC=xsltproc -XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl -A2X=a2x - -prefix=/usr/packages/ccollect-git -bindir=${prefix}/bin -destination=${bindir}/${CCOLLECT_DEST} - -mandest=${prefix}/man/man1 -manlink=/usr/local/man/man1 - -path_dir=/usr/local/bin -path_destination=${path_dir}/${CCOLLECT_DEST} - -# where to publish -host=home.schottelius.org -dir=www/org/schottelius/unix/www/ccollect/ -docdir=${dir}/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text \ - doc/man/add_ccollect_source.text \ - doc/man/delete_ccollect_source.text \ - doc/man/ccollect-logwrapper.text \ - doc/man/list_ccollect_intervals.text - -DOCS = ${MANDOCS} doc/ccollect.text doc/ccollect-DE.text - -# -# Doku -# -HTMLDOCS = ${DOCS:.text=.html} -DBHTMLDOCS = ${DOCS:.text=.htm} - -# texi is broken currently, don't know why xslt things complain yet -TEXIDOCS = ${DOCS:.text=.texi} -TEXIDOCS = - -# fop fails here, so disable it for now -PDFDOCS = ${DOCS:.text=.pdf} -PDFDOCS = - -MANPDOCS = ${MANDOCS:.text=.1} - -DOCBDOCS = ${DOCS:.text=.docbook} - -DOC_ALL = ${HTMLDOCS} ${DBHTMLDOCS} ${TEXIDOCS} ${MANPDOCS} ${PDFDOCS} - -html: ${HTMLDOCS} -htm: ${DBHTMLDOCS} -info: ${TEXIDOCS} -man: ${MANPDOCS} -pdf: ${PDFDOCS} -documentation: ${DOC_ALL} - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage{s}" - @echo "install: install ccollect to ${prefix}" - -install: install-link install-manlink - -install-link: install-script - ${LN} ${destination} ${path_destination} - -install-script: - ${INSTALL} -D -m 0755 ${CCOLLECT_SOURCE} ${destination} - -install-man: man - ${INSTALL} -d -m 0755 ${mandest} - ${INSTALL} -D -m 0644 doc/man/*.1 ${mandest} - -install-manlink: install-man - ${INSTALL} -d -m 0755 ${manlink} - for man in ${mandest}/*; do ${LN} $$man ${manlink}; done - - -# docbook gets .htm, asciidoc directly .html -%.htm: %.docbook - ${XSLTPROC} -o $@ ${XSL} $< - -%.html: %.text %.docbook - ${ASCIIDOC} -n -o $@ $< - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -#%.mandocbook: %.text -# ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -#%.man: %.mandocbook -# ${DOCBOOKTOMAN} --to-stdout $< > $@ - -#%.man: %.text -%.1: %.text - ${A2X} -f manpage $< - -%.pdf: %.text - ${A2X} -f pdf $< - - -# -# Developer targets -# -update: - @git push - -publish-doc: documentation - @echo "Transferring files to ${host}" - @chmod a+r ${DOCS} ${DOC_ALL} - @tar c ${DOCS} ${DOC_ALL} | ssh ${host} "cd ${dir}; tar xv" - -# -# Distribution -# -clean: - rm -f ${DOC_ALL} - rm -f doc/man/*.[0-9] doc/man/*.xml doc/*.fo doc/man/*.fo - -distclean: clean - rm -f ${DOCBDOCS} - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation - -test: ccollect.sh documentation - CCOLLECT_CONF=./conf ./ccollect.sh daily "source with spaces" diff --git a/software/ccollect/download/ccollect-0.6.1/README b/software/ccollect/download/ccollect-0.6.1/README deleted file mode 100644 index 12bcdb38..00000000 --- a/software/ccollect/download/ccollect-0.6.1/README +++ /dev/null @@ -1,62 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - does unecessary moving of backup directories - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -A small try to visualize the differnces in a table: - -+---------------+-------------------------------------------------------------+ -| What? | rsnapshot | ccollect | -+---------------+-------------------------------------------------------------+ -| Configuration | tab separated, needs | plain cconfig-style | -| | parsing | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| post-/pre- | no | yes | -| execution | | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| exclude lists | no | yes | -+---------------+-------------------------------------------------------------+ -| Parallel | | | -| execution | | | -| of multiple | no | yes | -| backups | | | -+---------------+-------------------------------------------------------------+ -| Programming | perl | sh | -| language | | (posix compatible) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 6772 (5353 w/o comments, | 546 (375 w/o comments, | -| (2006-10-25) | 4794 w/o empty lines) | 288 w/o empty lines) | -+---------------+-------------------------------------------------------------+ -| Age | Available since 2002/2003 | Written at 2005-11-14 | -+---------------+-------------------------------------------------------------+ - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.6.1/ccollect.sh b/software/ccollect/download/ccollect-0.6.1/ccollect.sh deleted file mode 100644 index a123ca21..00000000 --- a/software/ccollect/download/ccollect-0.6.1/ccollect.sh +++ /dev/null @@ -1,545 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/$(basename $0).XXXXXX") -VERSION=0.6.1 -RELEASE="2007-08-20" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - sed "s:^:\[${name}\] :" -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - c_incomplete="${backup}/delete_incomplete" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret=$? - if [ ${ret} -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a directory. Skipping." - fi - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - ( cd "${c_dest}" 2>/dev/null && ls -1 "${INTERVAL}"*"/${c_marker}" > "${TMP}" 2>/dev/null) - - while read incomplete; do - realincomplete=$(echo ${incomplete} | sed "s/${c_marker}\$//") - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - rm $VVERBOSE -rf "${c_dest}/${realincomplete}" || \ - _exit_err "Removing ${c_dest}/${realincomplete} failed." - fi - done < "${TMP}" - - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count=$(cd "${c_dest}" && ls -p1 | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g') || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - ( cd "${c_dest}" 2>/dev/null && ls -p1 | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" > "${TMP}" ) - - while read to_remove; do - _techo "Removing ${to_remove} ..." - rm ${VVERBOSE} -rf "$to_remove" || \ - _exit_err "Removing ${to_remove} failed." - done < "${TMP}" - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Use ls -1c instead of -1t, because last modification maybe the same on all - # and metadate update (-c) is updated by rsync locally. - # - rel_last_dir="$(cd "${c_dest}" && ls -tcp1 | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${c_dest}." - last_dir="${c_dest}/${rel_last_dir}" - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - # must be absolute, otherwise rsync uses it relative to - # the destination directory. See rsync(1). - abs_last_dir="$(cd "${last_dir}" && pwd -P)" || \ - _exit_err "Could not change to last dir ${last_dir}." - set -- "$@" "--link-dest=${abs_last_dir}" - _techo "Hard linking from ${rel_last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${c_dest}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # absulte now, it's existing - abs_destination_dir="$(cd "${destination_dir}" && pwd -P)" || \ - _exit_err "Changing to newly created ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - touch "${abs_destination_dir}/${c_marker}" - - # - # the rsync part - # - - _techo "Transferring files..." - rsync "$@" "${source}" "${abs_destination_dir}"; ret=$? - - # - # remove marking here - # - rm -f "${abs_destination_dir}/${c_marker}" || \ - _exit_err "Removing ${abs_destination_dir}/${c_marker} failed." - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" diff --git a/software/ccollect/download/ccollect-0.6.1/conf/README b/software/ccollect/download/ccollect-0.6.1/conf/README deleted file mode 100644 index 8402c76f..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/README +++ /dev/null @@ -1,3 +0,0 @@ -This is my personal test configuration. -It can perhaps be some example for you, although it may be pretty -unsorted and highly chaotic. diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.6.1/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.6.1/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/exclude b/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/exclude deleted file mode 100644 index ee4c9268..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/exclude +++ /dev/null @@ -1 +0,0 @@ -/test diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/rsync_options b/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/rsync_options deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/source_postfix b/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/source_postfix deleted file mode 100644 index 0b5cde79..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/source_postfix +++ /dev/null @@ -1 +0,0 @@ -:/ diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/source_prefix b/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/source_prefix deleted file mode 100644 index fc37f9d6..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/source_prefix +++ /dev/null @@ -1 +0,0 @@ -root@ diff --git a/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/verbose b/software/ccollect/download/ccollect-0.6.1/conf/defaults/sources/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.6.1/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/fehler b/software/ccollect/download/ccollect-0.6.1/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/delete_incomplete b/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/delete_incomplete deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/destination b/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/exclude b/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/intervalls/daily b/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/source b/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/source deleted file mode 100644 index 2206a2c8..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/verbose b/software/ccollect/download/ccollect-0.6.1/conf/sources/source with spaces/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.6.1/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.6.1/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.6.1/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.6.1/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/source deleted file mode 100644 index 5e56e040..00000000 --- a/software/ccollect/download/ccollect-0.6.1/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/software/ccollect/download/ccollect-0.6.1/doc/CHANGES b/software/ccollect/download/ccollect-0.6.1/doc/CHANGES deleted file mode 100644 index 996c3b0f..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/CHANGES +++ /dev/null @@ -1,80 +0,0 @@ -0.6 to 0.6.1: - * Added check for destination_base in add_ccollect_source.sh - * Added support for -V and --version - * Added ccollect-logwrapper.sh (and a manpage ;-) - * Changed behaviour: ccollect now clones from the latest existing backup, - independent of the interval. This way different intervals do not - diverge. ccollect uses ls -c to determine latest backup. - -0.5.2 to 0.6: - * Always print return code of rsync - * Add much more timing information - * One option per line in rsync_options now (NOT space seperated) - * Added --sparse as default option - * Added management tools (including manpages): - * add_ccollect_source.sh - * delete_ccollect_source.sh - * list_ccollect_intervals.sh - * Cleaned up exit calls (now always cleanly removes temporary files) - * In theory, added pdf documentation (though, was unable to do it with fop) - * Changed license to GPLv3 (from GPLv2) - -0.5.1 to 0.5.2: - * Display correct error code, if rsync returns non-zero - * Unify messages - * Remove some potential quoting problems - -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.6.1/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.6.1/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.6.1/doc/ccollect.text b/software/ccollect/download/ccollect-0.6.1/doc/ccollect.text deleted file mode 100644 index 92a95ae0..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/ccollect.text +++ /dev/null @@ -1,984 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.6, for ccollect 0.6 - 0.6.1, Initial Version from 2006-01-13 -:Author Initials: NS - - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - - -Introduction ------------- -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Supported and tested operating systems and architectures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`ccollect` was successfully tested on the following platforms: - -- GNU/Linux on amd64/hppa/i386 -- NetBSD on amd64/i386/sparc/sparc64 -- OpenBSD on amd64 - -It *should* run on any Unix that supports `rsync` and has a POSIX-compatible -bourne shell. If your platform is not listed above and you have it successfully -running, please drop me a mail. - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions 0.5 and 0.6 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `rsync_options` changed: -- Before 0.6 it was whitespace delimeted -- As of 0.6 it is newline seperated (so you can pass whitespaces to `rsync`) - -You can update your configuration using `tools/config-pre-0.6-to-0.6.sub.sh`. - -.The name of the backup directories changed: -- Before 0.6: "date +%Y-%m-%d-%H%M" -- As of 0.6: "date +%Y%m%d-%H%M" (better readable, date is closer together) - -For the second change there is no updated needed, as XXXX- is always before -XXXXX (- comes before digit). - - - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace value for CCV with the current version -export CCV=0.6 - -# -# replace 'wget' with fetch on bsd -# -holen=wget -"$holen" http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create sample intervals -echo 2 > miniconfig/defaults/intervals/testinterval -echo 3 > miniconfig/defaults/intervals/testinterval2 - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source -ln -s ~/DASI miniconfig/sources/testsource/destination -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -echo "do the backup, twice" -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "the third time ccollect begins to remove old backups" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "Now we add another interval, ccollect should clone from existent ones" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval2 testsource - -echo "Let's see how much space we used with two backups and compare it to /bin" -du -s ~/DASI /bin - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of some backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. If you would -like to use the new management scripts (available since 0.6), copy -the following scripts to a directory in $PATH: - -- `tools/add_ccollect_source.sh` -- `tools/list_ccollect_intervals.sh` -- `tools/delete_ccollect_source.sh` - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is -the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (`mkdir -v`, `rm -v` and `rsync -vv`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline seperated list. - - `rsync_options` extra options for `rsync`. newline seperated list. - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - - `delete_incomplete` delete incomplete backups - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - -Detailed description of "delete_incomplete" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `delete_incomplete` in a source specification directory, -`ccollect` will look for incomplete backups (when the whole `ccollect` process -was interrupted) and remove them. Without this file `ccollect` will only warn -the user. - - -Hints ------ - -Smart logging -~~~~~~~~~~~~~ -Since ccollect-0.6.1 you can use the ccollect-logwrapper.sh(1) for logging. -You call it the same way you call ccollect.sh and it will create a -logfile containing the output of ccollect.sh. For more information look -at the manpage 'ccollect-logwrapper'. The following is an example running -ccollect-logwrapper.sh: - --------------------------------------------------------------------------------- -u0219 ~ # ~chdscni9/ccollect-logwrapper.sh daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Starting with arguments: daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Finished. --------------------------------------------------------------------------------- - - -Using a different ssh port -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mostly easy is to use your ~/.ssh/config file: - --------------------------------------------------------------------------------- -host mx2.schottelius.org - Port 2342 --------------------------------------------------------------------------------- - -If you only use that port for backup and normally want to use another port, -you can add 'HostName' and "HostKeyAlias" (if you also have different -keys on the different ports): - --------------------------------------------------------------------------------- -Host hhydrogenium - Hostname bruehe.schottelius.org - Port 666 - HostKeyAlias hydrogenium - -Host bruehe - Hostname bruehe.schottelius.org - Port 22 - HostKeyAlias bruehe.schottelius.org --------------------------------------------------------------------------------- - - - -Using source names or interval in pre_/post_exec scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The pre-/post_exec scripts can access some internal variables from `ccollect`: - -- INTERVAL: The interval specified on the command line -- no_sources: number of sources -- source_$NUM: the name of the source -- name: the name of the currently being backuped source (not available for - generic pre_exec script) - - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEARMONTHDAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - - -Using source specific interval definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you are backing up multiple hosts via cron each night, it may be -a problem that host "big_server" may only have 4 daily backups, because -otherwise its backup device will be full. But for all other hosts -you want to keep 20 daily backups. In this case you would create -`/etc/ccollect/default/intervals/daily` containing "20" and -`/etc/ccollect/sources/big_server/intervals/daily` containing "4". - -Source specific intervals always overwrite the default values. -If you have to specify it individually for every host, because -of different requirements, you can even omit creating -`/etc/ccollect/default/intervals/daily`. - - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - -If the whole `ccollect` process was interrupted, `ccollect` (since 0.6) can -detect that and remove the incomplete backups, so you can clone from a complete -backup instead. - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -How can I prevent missing the right time to enter my password? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As `ccollect` first deletes the old backups, it may take some time -until `rsync` requests the password for the `ssh` session from you. - -The easiest way not to miss that point is running `ccollect` in `screen`, -which has the ability to monitor the output for activity. So as soon as -your screen beeps, after `ccollect` began to remove the last directory, -you can enter your password (have a look at screen(1), especially "C-a M" -and "C-a _", for more information). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- - - -Processes running when doing ccollect -p -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Truncated output from `ps axuwwwf`: - -------------------------------------------------------------------------- - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily -p ddba034 ddba045 ddba046 ddba047 ddba049 ddna010 ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - R+ 11:40 23:40 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddba034 - S+ 11:40 0:00 | | | | | \_ ssh -l root ddba034.netstream.ch rsync --server --sender -vlogDtprR --numeric-ids . / - S+ 11:41 0:11 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddb - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba034\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba045/destination/daily.2006-10-19-1807.6934 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba045\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba046/destination/daily.2006-10-19-1810.7072 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba046\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba047/destination/daily.2006-10-19-1816.7268 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba047\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - D+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba049/destination/daily.2006-10-19-1821.7504 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba049\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddna010/destination/daily.2006-10-19-1805.6849 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddna010\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - R+ 12:08 0:00 | | | | \_ rm -rf /etc/ccollect/sources/ddna011/destination/daily.2006-10-20-1502.7824 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ sed s:^:\[ddna011\] : - -------------------------------------------------------------------------- -As you can see, six processes are deleting old backups, while one backup -(ddba034) is already copying data. diff --git a/software/ccollect/download/ccollect-0.6.1/doc/logwrapper.text b/software/ccollect/download/ccollect-0.6.1/doc/logwrapper.text deleted file mode 100644 index ec12db48..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/logwrapper.text +++ /dev/null @@ -1,29 +0,0 @@ -ccollect-logwrapper: Logging backup output -=========================================== -Nico Schottelius -0.1, for ccollect-logwrapper 0.1, Initial Version from 2007-06-08 -:Author Initials: NS - -This wrapper makes it easy to have logs of ccollect output. - - -Introduction ------------- -/etc/ccollect/logwrapper/ (also uses $CCOLLECT_CONF). - - - pipe: will pipe to a program - staticfile: link to a file - datefile: - contains a string that is passed to date that returns - dynamicfile: - is a program, that returns some string that we use as - a filename - syslog: - syslog-facility - syslog-level - only-stderr: - omit stdout output - -The logger will output to which destinations it logs and with which -parameters it was started. diff --git a/software/ccollect/download/ccollect-0.6.1/doc/man/add_ccollect_source.text b/software/ccollect/download/ccollect-0.6.1/doc/man/add_ccollect_source.text deleted file mode 100644 index 98f41980..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/man/add_ccollect_source.text +++ /dev/null @@ -1,73 +0,0 @@ -add_ccollect_source(1) -====================== -Nico Schottelius - - -NAME ----- -add_ccollect_source - create new source for ccollect(1) - - -SYNOPSIS --------- - -'add_ccollect_source.sh' - - -DESCRIPTION ------------ -add_ccollect_source.sh creates a new backup source for use with ccollect(1). -It copies the files from to the source directory with the hostname below -'$CCOLLECT_CONF/sources'. - - -FILES ------ -$CCOLLECT_CONF/defaults/sources:: - Main configuration directory. $CCOLLECT_CONF is '/etc/ccollect', if unset. - All the following files reside below this directory. - -exclude:: -summary:: -intervals:: -pre_exec:: -post_exec:: -rsync_options:: -verbose:: -very_verbose:: - Those are the standard configuration files known by ccollect(1). - If the file exist it will be copied to the newly created source. - Directories ('intervals') are copied recursively. - -destination_base:: - A link to the directory where to store the backups. Below this directory - `add_ccollect_source.sh` will create a directory with the hostname you - specified on the command line. - -source_prefix:: -source_postfix:: - `source_prefix` is put before the hostname, `source_postfix` is appended - after it. A common value for `source_prefix` maybe 'root@' and ':/' - for `source_postfix`. - - -SEE ALSO --------- -ccollect(1), ccollect-logwrapper(1), -delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.1/doc/man/ccollect-logwrapper.text b/software/ccollect/download/ccollect-0.6.1/doc/man/ccollect-logwrapper.text deleted file mode 100644 index 189244f2..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/man/ccollect-logwrapper.text +++ /dev/null @@ -1,55 +0,0 @@ -ccollect_logwrapper(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect_logwrapper - start ccollect(1) and create a unique log - - -SYNOPSIS --------- -'ccollect_logwrapper.sh' - - -DESCRIPTION ------------ -ccollect_logwrapper.sh creates a unique logfile below -'$CCOLLECT_CONF/logwrapper' and redirects ccollect(1) output -(stdout and stderr) to it. - - -OPTIONS -------- -Options are passed directly to ccollect(1). - - -FILES ------ -$CCOLLECT_CONF/logwrapper:: - Directory containing the configuration. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -$CCOLLECT_CONF/logwrapper/destination:: - Link to the destination directory for the logfiles - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), -delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.1/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.6.1/doc/man/ccollect.text deleted file mode 100644 index a246dbf7..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/man/ccollect.text +++ /dev/null @@ -1,59 +0,0 @@ -ccollect(1) -=========== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the manual titled -"ccollect - Installing, Configuring and Using" (available as texinfo or html). - - -OPTIONS -------- --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -SEE ALSO --------- -add_ccollect_source(1), ccollect-logwrapper(1) -delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006-2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.1/doc/man/delete_ccollect_source.text b/software/ccollect/download/ccollect-0.6.1/doc/man/delete_ccollect_source.text deleted file mode 100644 index b6e05bc0..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/man/delete_ccollect_source.text +++ /dev/null @@ -1,56 +0,0 @@ -delete_ccollect_source(1) -========================= -Nico Schottelius - - -NAME ----- -delete_ccollect_source - delete sources from ccollect(1) - - -SYNOPSIS --------- -'delete_ccollect_source.sh' [-d] [-f] - - -DESCRIPTION ------------ -delete_ccollect_source.sh deletes backup sources from ccollect(1) and optional -also the backups created for that source. - -OPTIONS -------- --d: - Delete also the destination directory. `add_ccollect_source.sh` will change - to the source/'name'/destination directory, get the absolute name and delete - it recursively. --f: - Force deletion. Do not ask. Very handy for people who know what they do. - Very dangerous for everyone. - - -FILES ------ -$CCOLLECT_CONF/sources:: - Directory containing the sources. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), -ccollect-logwrapper(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.1/doc/man/list_ccollect_intervals.text b/software/ccollect/download/ccollect-0.6.1/doc/man/list_ccollect_intervals.text deleted file mode 100644 index 6fd1a88d..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/man/list_ccollect_intervals.text +++ /dev/null @@ -1,46 +0,0 @@ -list_ccollect_intervals(1) -========================== -Nico Schottelius - - -NAME ----- -list_ccollect_intervals - list available intervals from ccollect(1) - - -SYNOPSIS --------- -'list_ccollect_intervals.sh' - - -DESCRIPTION ------------ -list_ccollect_intervals.sh shows intervals specified in the configuration -for ccollect(1). It displays the name of each interval, followed by a colon -followed by the number backups to keep. - -FILES ------ -$CCOLLECT_CONF/intervals:: - Directory containing the intervals. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), -ccollect-logwrapper(1), delete_ccollect_source(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.1/doc/release-checklist b/software/ccollect/download/ccollect-0.6.1/doc/release-checklist deleted file mode 100644 index 7cba30cd..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version and date in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.2 b/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.2 deleted file mode 100644 index 0c1c2250..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.2 +++ /dev/null @@ -1,4 +0,0 @@ -x Fix $? problem -x Check last dir searching -x Check count generation -x Check general functionality (remove testing) diff --git a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.3 b/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.3 deleted file mode 100644 index 00195812..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.3 +++ /dev/null @@ -1,34 +0,0 @@ -Done: -==> screenshot -u0219 zrha166.netstream.ch # ~chdscni9/ccollect.sh weekly zrha166.netstream.ch -2007-08-16-21:49:44: ccollect 0.6: Beginning backup using interval weekly -[zrha166.netstream.ch] 2007-08-16-21:49:44: Beginning to backup -[zrha166.netstream.ch] 2007-08-16-21:49:45: Existing backups: 0 Total keeping backups: 8 -[zrha166.netstream.ch] 2007-08-16-21:49:45: Did not find existing backups for interval weekly. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Using backup from daily. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Beginning to backup, this may take some time... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Creating /etc/ccollect/sources/zrha166.netstream.ch/destination/weekly.20070816-2149.22188 ... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Transferring files... - -- beep-after-delete-hack? - -> tonnerre / #cLinux - -- replace nico-linux-ccollect with nico-ccollect - * ccollect is not Linux specific - -- remove exit-calls - * will leave behind unused temporary file! - * use _exit_err - -X join todos - -- fix possible quoting problems - * rsync_extra (redefine format) - * exclude - * other - * create _rsync, filtering args, creating new $@ - -- check and export variables for use in scripts! - -Contact Julian later: - * integrate updated german documentation diff --git a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.3.tonnerre b/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.3.tonnerre deleted file mode 100644 index 4e7b7db5..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.5.3.tonnerre +++ /dev/null @@ -1,11 +0,0 @@ -NetBSD/i386,amd64,sparc,sparc64 - -13:13 < Tonnerre> telmich, die kleine wä, 2 Variablen aus $(CCOLLECT) zu - machen -13:13 < Tonnerre> telmich, eine fü Sourcepfad und eine fü -Destinationfpad -13:13 < Tonnerre> pfa -13:13 < Tonnerre> d -13:14 < Tonnerre> telmich, die gröre wä die $() durch ${} zu ersetzen, so -dass der Kram auch mit !GNU-Make geht - diff --git a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.6 b/software/ccollect/download/ccollect-0.6.1/doc/todo/0.6 deleted file mode 100644 index ee8e97fd..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.6 +++ /dev/null @@ -1,63 +0,0 @@ -not did, did not remember why I wanted to do that: - -- do sed-time check: - -1.2. replace sed? -compare timing: -_echo () { echo "$name $msg" } -and create -_techo () { echo "$timestamp $name $msg" } -perhaps create -_eecho () { _techo "ERROR $msg" } -? - - - -done: -add note for - 09:24 < telmich> Obri: ~/.ssh/config! - -- implement use of different intervals as source for cloning - * use 'woechentlich' if available and no backup exists for 'daily' - * add 'prefer_latest' to prefer different interval, that's newer than - ours - * or add 'prefer_same_interval' instead? -- implement detection of partial backups -3. detect unfinished backups -sven / markierung - - wie seht der Marker aus? - -> .ccollect-YEAR-MM-DD.HHmm.pid (like the directory) - --> assume incomplete, when we did not finish. - --> means it's complete,when rsync was successful ----> partial implemented in 0.5.2 (commented out) -- do not check by name, but by time - * is ls -t posix? - * also check: -p -1 -- ccollect Zeitausgabe verbessern - - Wofuer wie lange gebraucht - * rm - * klonen (gibt es so ja nicht) - Wenn Summary angegeben ist am Ende ausgeben -- do we want rsync -H by default? - * no: takes much more memory -ssh / port change: - change rsync_extra format -- Variables: - source_$n - no_sources - name -- changed naming of sources: - YYYYMMDD-HHMM.PID (better readable) - => source / backup converter! => not needed! -config: - set destination-base - /etc/ccollect/defaults/source_config - -Documentation: -- hint: backuping backup -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- delete_incomplete - diff --git a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.6.1 b/software/ccollect/download/ccollect-0.6.1/doc/todo/0.6.1 deleted file mode 100644 index 99a17eba..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/todo/0.6.1 +++ /dev/null @@ -1,23 +0,0 @@ -- Add filter support - * filter -- add source/ignore_failed_pre_exec -- add source/ignore_failed_post_exec -- do not delete_incomplete, when there's only one backup left! -- .ccollect-marker is deleted by rsync at the beginning! - - fix marking -- add logwrapper -- add loganalyser - speedup is - error codes - vanished files (see netstream)!!! - -Done: -- Improve finding backup from another interval: - o strip of interval name - o run sort -n - o use the last entry -- add --version, -V - -not needed: -- think about 'prefer_same_interval' / 'prefer_latest' - diff --git a/software/ccollect/download/ccollect-0.6.1/doc/todo/extern b/software/ccollect/download/ccollect-0.6.1/doc/todo/extern deleted file mode 100644 index 9be8f2be..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/todo/extern +++ /dev/null @@ -1,23 +0,0 @@ -These todos are things that would be senseful todo, but are just nice -to have. This means I won't code them, so somebody can code them. --------------------------------------------------------------------------------- - -- Add ccollect-restore.sh - (new project, perhaps coordinated with jchome's ccollect-config) - - Helper (in dialog?) to restore backups - - Perhaps create ccollect-gui.{whatever} instead, which does all the - end user staff? - - Including cronjob, creating configuration, displaying status of - backups, allowing manual remove, allowing manual trigger of ccollect - (with realtime message window?)? - -- write mkccollectconfig (for 0.5!) - -> jchome works on it! - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.6.1/doc/todo/netstream-1 b/software/ccollect/download/ccollect-0.6.1/doc/todo/netstream-1 deleted file mode 100644 index a0a6eba0..00000000 --- a/software/ccollect/download/ccollect-0.6.1/doc/todo/netstream-1 +++ /dev/null @@ -1,53 +0,0 @@ -Preamble: - Netstream (www.netstream.ch) may consider using ccollect for backing up many - unix servers and needs some clean reporting. The following things - need to be done, so ccollect will be useful for netstream: - -Logger: - - Needs to write small mails (sysadmins don't have time to read mails) - - Needs to be able to only write a mail on error - * needs configuration option to also mail on warnings - - Should be able to send one mail per backup source - * or one for the whole backup job - -Messages: (to be used for filtering) - Errors: - Read from remote host .*: Connection timed out - - Warnings: - rsync: mknod .* failed: Invalid argument (22) - file has vanished: ".*" - --------------------------------------------------------------------------------- - -Analyzer: - - grosse Dateien - - grosse Veraenderungen --------------------------------------------------------------------------------- -exclude-lists-doku: -freebsd: - /usr/ports/* - /proc/* - /dev/* - /tmp/* - /var/tmp/* -linux: - /sys/* - /proc/* - /dev/* - /tmp/* - --------------------------------------------------------------------------------- -done: - -rsync_extra global! -- \n delimeted --------------------------------------------------------------------------------- - -S, --sparse - Try to handle sparse files efficiently so they take up less space on the des‐ - tination. Conflicts with --inplace because it’s not possible to overwrite - data in a sparse fashion. - --------------------------------------------------------------------------------- - Always report return code! - diff --git a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/Makefile b/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/Makefile deleted file mode 100644 index c14c77d8..00000000 --- a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# New ports collection makefile for: oneko -# New ports collection makefile for: ccollect -# Date created: 2006-10-20 -# Whom: Nico Schottelius -# -# $FreeBSD$ -# - -PORTNAME= ccollect -PORTVERSION= 0.5.1 -CATEGORIES= sysutils archivers -MASTER_SITES= http://unix.schottelius.org/ccollect/ - -MAINTAINER= nico-fbsd-ccollect@schottelius.org -COMMENT= (pseudo) incremental (parallel) backup - -MAN1= ccollect.sh.1 -MANCOMPRESSED= no -USE_BZIP2= yes - -RUN_DEPENDS= rsync:${PORTSDIR}/net/rsync - -.include diff --git a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/distinfo b/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/distinfo deleted file mode 100644 index 9e1b6fe5..00000000 --- a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -MD5 (ccollect-0.5.1.tar.bz2) = 8601a6d6de52ba839768e2804ca57499 -SIZE (ccollect-0.5.1.tar.bz2) = 37397 diff --git a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/pkg-descr b/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/pkg-descr deleted file mode 100644 index c822c6ed..00000000 --- a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -This is a port of ccollect, a backup utility which creates -fullbackups with the space needed of incremental backups. - -WWW: http://unix.schottelius.org/ccollect/ diff --git a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/pkg-list b/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/pkg-list deleted file mode 100644 index c1d82f97..00000000 --- a/software/ccollect/download/ccollect-0.6.1/external/freebsd-port/pkg-list +++ /dev/null @@ -1 +0,0 @@ -bin/ccollect.sh diff --git a/software/ccollect/download/ccollect-0.6.1/release.sh b/software/ccollect/download/ccollect-0.6.1/release.sh deleted file mode 100644 index 7a758bb3..00000000 --- a/software/ccollect/download/ccollect-0.6.1/release.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -# create documentation for the end user -( - cd "$NAME" - make dist - make publish-doc -) - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" - -cat "${NAME}/doc/release-checklist" diff --git a/software/ccollect/download/ccollect-0.6.1/tools/add_ccollect_source.sh b/software/ccollect/download/ccollect-0.6.1/tools/add_ccollect_source.sh deleted file mode 100644 index f431c7f2..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/add_ccollect_source.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-16 -# Written for Netstream (www.netstream.ch) -# Creates a source from standard values specified in -# /etc/ccollect/defaults/sources -# Copying: GPLv3 - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -SCONFIG="${CDEFAULTS}/sources" - -# standard options: variable2filename -exclude="exclude" -summary="summary" -intervals="intervals" -pre_exec="pre_exec" -post_exec="post_exec" -rsync_options="rsync_options" -verbose="verbose" -very_verbose="very_verbose" - -# options that we simply copy over -standard_opts="exclude summary intervals pre_exec post_exec rsync_options verbose very_verbose" - -# options not in standard ccollect, used only for source generation -src_prefix="${SCONFIG}/source_prefix" -src_postfix="${SCONFIG}/source_postfix" -destination_base="${SCONFIG}/destination_base" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _exit_err "" -fi - -_echo "Reading defaults from ${SCONFIG} ..." - -while [ $# -gt 0 ]; do - source="$1"; shift - - # Create - _echo "Creating ${source} ..." - - fullname="${CSOURCES}/${source}" - - # create source - if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Skipping." - continue - fi - mkdir -p "${fullname}" || _exit_err Cannot create \"${fullname}\". - - # copy standard files - for file in $standard_opts; do - eval rfile=\"\$$file\" - eval filename=${SCONFIG}/${rfile} - if [ -e "${filename}" ]; then - _echo Copying \"$rfile\" to ${fullname} ... - cp -r "${filename}" "${fullname}/${rfile}" - fi - done - - # create source entry - if [ -f "${src_prefix}" ]; then - source_source="$(cat "${src_prefix}")" || _exit_err "${src_prefix}: Reading failed." - fi - source_source="${source_source}${source}" - if [ -f "${src_postfix}" ]; then - source_source="${source_source}$(cat "${src_postfix}")" || _exit_err "${src_postfix}: Reading failed." - fi - _echo "Adding \"${source_source}\" as source for ${source}" - echo "${source_source}" > "${fullname}/source" - - # create destination directory - absbase=$(cd "${destination_base}" 2>/dev/null && pwd -P) || \ - _exit_err "${destination_base} must exist before creating sources." - - dest="${absbase}/${source}" - _echo "Creating ${dest} ..." - mkdir -p "${dest}" || _exit_err "${dest}: Cannot create." - - # link destination directory - dest_abs=$(cd "${dest}" && pwd -P) || _exit_err "${dest}: Changing to newly create dirctory failed." - ln -s "${dest_abs}" "${fullname}/destination" || \ - _exit_err "${fullname}/destination: Failed to link \"${dest_abs}\"" - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.6.1/tools/ccollect-logwrapper.sh b/software/ccollect/download/ccollect-0.6.1/tools/ccollect-logwrapper.sh deleted file mode 100644 index 6142385d..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/ccollect-logwrapper.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for Netstream (www.netstream.ch) -# Date: Fr 8. Jun 10:30:24 CEST 2007 -# Call the log-wrapper instead of ccollect.sh and it will create nice logs - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -LOGCONF=$CCOLLECT_CONF/logwrapper - -logdir="${LOGCONF}/destination" -CDATE="date +%Y%m%d-%H%M" -we="$(basename $0)" -pid=$$ - -logfile="${logdir}/$(${CDATE}).${pid}" - -# use syslog normally -# Also use echo, can be redirected with > /dev/null if someone cares -_echo() -{ - string="${we} (${pid}): $@" - logger "${string}" - echo "${string}" -} - - -# exit on error -_exit_err() -{ - _echo "$@" - rm -f "${TMP}" - exit 1 -} - -# put everything into that specified file -_echo "Starting with arguments: $@" -touch "${logfile}" || _exit_err "Failed to create ${logfile}" - -# First line in the logfile is always the commandline -echo ccollect.sh "$@" > "${logfile}" 2>&1 -ccollect.sh "$@" >> "${logfile}" 2>&1 - -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.1/tools/ccollect-stats.sh b/software/ccollect/download/ccollect-0.6.1/tools/ccollect-stats.sh deleted file mode 100644 index 5ce171b1..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/ccollect-stats.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - - -if [ ! -e /tmp/ccollect-stats.lock ] -then - touch /tmp/ccollect-stats.lock - find /etc/ccollect/sources/ -type l | while read line - do - backupname=$(basename $(readlink $line)) - echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log - du -sh $line/* | tee -a /var/log/backup.log - done - rm /tmp/ccollect-stats.lock -fi - - - diff --git a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.6-to-0.6.sh b/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.6-to-0.6.sh deleted file mode 100644 index 5efce689..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.6-to-0.6.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Nico Schottelius, 20070816-2225 -# Transfer configuration to 0.6 layout -# Copying: GPLv3 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -type f -name rsync_options -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.6-to-0.6.sub.sh b/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.6-to-0.6.sub.sh deleted file mode 100644 index b4e0bd33..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/config-pre-0.6-to-0.6.sub.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# Nico Schottelius, 20070816-2227 -# Transfer configuration to 0.6 layout (subscript) -# Copying: GPLv3 -# - -if [ $# -ne 1 ]; then - echo "$0: rsync_options file" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) - -echo "Working on $1 ..." - -for option in $(cat "$1"); do - echo "${option}" >> "${tmp}" -done -mv ${tmp} "$1" diff --git a/software/ccollect/download/ccollect-0.6.1/tools/create_source.sh b/software/ccollect/download/ccollect-0.6.1/tools/create_source.sh deleted file mode 100644 index 7a34c6b0..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/create_source.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 3 ]; then - _echo " " - _echo "Example: \"my-notebook\" \"192.168.42.42\" \"/home/server/backup/my-notebook\"" - exit 1 -fi - -name="$1" -source="$2" -destination="$3" -fullname="${CSOURCES}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${source} ..." -ping -c1 "${source}" || _exit_err "Cannot reach ${source}. Aborting." - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${source}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.1/tools/create_source2.sh b/software/ccollect/download/ccollect-0.6.1/tools/create_source2.sh deleted file mode 100644 index 842afb65..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/create_source2.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 2 ]; then - _echo " " - _echo "Example: \"192.168.42.42\" \"/home/server/backup/\"" - _echo " This will create ${CSOURCES}/192.168.42.42 and /home/server/backup/192.168.42.42." - exit 1 -fi - -# sourcename / servername -name="$1" - -# basedir -basedir="$2" - -fullname="${CSOURCES}/${name}" -destination="${basedir}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${name} ..." -ping -c1 "${name}" || _exit_err "Cannot reach ${name}. Aborting." - -if [ ! -d "${basedir}" ]; then - echo "${basedir} is not a directory. Aborting." - exit 7 -fi - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${name}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.1/tools/delete_ccollect_source.sh b/software/ccollect/download/ccollect-0.6.1/tools/delete_ccollect_source.sh deleted file mode 100644 index 8a811d32..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/delete_ccollect_source.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-16 -# Written for Netstream (www.netstream.ch) -# Delete sources and their backups (optionally). -# Copying: GPLv3 (See file COPYING in top directory) - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _echo "${self} [-f] [-d] " - _echo " -f: Do not ask, simply delete. Dangerous and good for sysadmins." - _echo " -d: Also delete the destination (removes all backups)" - _exit_err "Exiting." -fi - -params_possible=yes -force="" -backups="" - -while [ $# -gt 0 ]; do - - if [ "$params_possible" ]; then - case "$1" in - "-f"|"--force") - force=yes - shift; continue - ;; - "-d"|"--destination") - backups=yes - shift; continue - ;; - --) - params_possible="" - shift; continue - ;; - -*|--*) - _exit_err "Unknown option: $1" - ;; - esac - - fi - - # Reached here? So there are no more parameters. - params_possible="" - - source="$1"; shift - - # Create - _echo "Deleting ${source} ..." - fullname="${CSOURCES}/${source}" - - # ask the user per source, if she's not forcing us - if [ -z "$force" ]; then - sure="" - echo -n "Do you really want to delete ${source} (y/n)? " - read sure - - if [ "$sure" != "y" ]; then - _echo "Skipping ${source}." - continue - fi - fi - - if [ "$backups" ]; then - ddir=$(cd "${fullname}/destination" && pwd -P) || _exit_err "Cannot change to ${fullname}/destination" - _echo "Deleting ${ddir} ..." - rm -r "${ddir}" - fi - - _echo "Deleting ${fullname} ..." - rm -r "${fullname}" - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.6.1/tools/gnu-du-backup-size-compare.sh b/software/ccollect/download/ccollect-0.6.1/tools/gnu-du-backup-size-compare.sh deleted file mode 100644 index 85b876b6..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/gnu-du-backup-size-compare.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 2007-08-16 -# Last Modified: - -# - -exit 1 -# not yet finished. - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_SOURCES="$CCOLLECT_CONF/defaults/sources" - -me="$(basename "$0")" - -if [ $# -lt 1 ]; then - echo "${me}: sources names - exit 1 -fi - -if [ ! -d "$CCOLLECT_SOURCES" ]; then - echo "No sources defined in $CCOLLECT_SOURCES" - exit 1 -fi - -cd "${CCOLLECT_SOURCES}" - -while [ "$#" -gt 0 ]; do - source="$1"; shift - fsource="${CCOLLECT_SOURCES}/${source}" - du -s "${fsource}/"* "${fsource}" - # du -l should follow -done diff --git a/software/ccollect/download/ccollect-0.6.1/tools/list_ccollect_intervals.sh b/software/ccollect/download/ccollect-0.6.1/tools/list_ccollect_intervals.sh deleted file mode 100644 index 47c1481d..00000000 --- a/software/ccollect/download/ccollect-0.6.1/tools/list_ccollect_intervals.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 24-Jun-2006 -# Last Modified: - -# Copying: GPLv3 (See file COPYING in top directory) -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -me="$(basename $0)" - -_echo() -{ - echo "$me> $@" -} - -if [ ! -d "${CCOLLECT_INTERVALS}" ]; then - _echo "No intervals defined in ${CCOLLECT_INTERVALS}" - exit 1 -fi - -set -e -cd "${CCOLLECT_INTERVALS}" - -for interval in *; do - eval int_${interval}=$(cat "${interval}"); - eval echo ${interval}: \$int_${interval}; -done diff --git a/software/ccollect/download/ccollect-0.6.2/.gitignore b/software/ccollect/download/ccollect-0.6.2/.gitignore deleted file mode 100644 index 4e9c74d5..00000000 --- a/software/ccollect/download/ccollect-0.6.2/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.htm -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.htm -doc/man/*.texi -doc/man/*.man -test/* -.*.swp -doc/man/*.[0-9] -doc/*.xml -doc/*/*.xml -*.texi -*.fo diff --git a/software/ccollect/download/ccollect-0.6.2/COPYING b/software/ccollect/download/ccollect-0.6.2/COPYING deleted file mode 100644 index fc8a5de7..00000000 --- a/software/ccollect/download/ccollect-0.6.2/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/software/ccollect/download/ccollect-0.6.2/CREDITS b/software/ccollect/download/ccollect-0.6.2/CREDITS deleted file mode 100644 index 1616f6f3..00000000 --- a/software/ccollect/download/ccollect-0.6.2/CREDITS +++ /dev/null @@ -1,10 +0,0 @@ -Thanks go to the following people: - -* the whole #cLinux channel - - for testing and debugging (those I mean should know ;-) -* Alexey Maximov - - for finding return-value and shell limitation bugs -* Markus Meier - - for finding a really simple solution for choosing the right backup to - clone from: Make it independent of the interval, simply choose the last - one created. diff --git a/software/ccollect/download/ccollect-0.6.2/Makefile b/software/ccollect/download/ccollect-0.6.2/Makefile deleted file mode 100644 index b5a7995e..00000000 --- a/software/ccollect/download/ccollect-0.6.2/Makefile +++ /dev/null @@ -1,155 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT_SOURCE=ccollect.sh -CCOLLECT_DEST=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man -XSLTPROC=xsltproc -XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl -A2X=a2x - -prefix=/usr/packages/ccollect-git -bindir=${prefix}/bin -destination=${bindir}/${CCOLLECT_DEST} - -mandest=${prefix}/man/man1 -manlink=/usr/local/man/man1 - -path_dir=/usr/local/bin -path_destination=${path_dir}/${CCOLLECT_DEST} - -# where to publish -host=home.schottelius.org -dir=www/org/schottelius/unix/www/ccollect/ -docdir=${dir}/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text \ - doc/man/add_ccollect_source.text \ - doc/man/delete_ccollect_source.text \ - doc/man/ccollect-logwrapper.text \ - doc/man/list_ccollect_intervals.text - -DOCS = ${MANDOCS} doc/ccollect.text doc/ccollect-DE.text - -# -# Doku -# -HTMLDOCS = ${DOCS:.text=.html} -DBHTMLDOCS = ${DOCS:.text=.htm} - -# texi is broken currently, don't know why xslt things complain yet -TEXIDOCS = ${DOCS:.text=.texi} -TEXIDOCS = - -# fop fails here, so disable it for now -PDFDOCS = ${DOCS:.text=.pdf} -PDFDOCS = - -MANPDOCS = ${MANDOCS:.text=.1} - -DOCBDOCS = ${DOCS:.text=.docbook} - -DOC_ALL = ${HTMLDOCS} ${DBHTMLDOCS} ${TEXIDOCS} ${MANPDOCS} ${PDFDOCS} - -html: ${HTMLDOCS} -htm: ${DBHTMLDOCS} -info: ${TEXIDOCS} -man: ${MANPDOCS} -pdf: ${PDFDOCS} -documentation: ${DOC_ALL} - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage{s}" - @echo "install: install ccollect to ${prefix}" - -install: install-link install-manlink - -install-link: install-script - ${LN} ${destination} ${path_destination} - -install-script: - ${INSTALL} -D -m 0755 ${CCOLLECT_SOURCE} ${destination} - -install-man: man - ${INSTALL} -d -m 0755 ${mandest} - ${INSTALL} -D -m 0644 doc/man/*.1 ${mandest} - -install-manlink: install-man - ${INSTALL} -d -m 0755 ${manlink} - for man in ${mandest}/*; do ${LN} $$man ${manlink}; done - - -# docbook gets .htm, asciidoc directly .html -%.htm: %.docbook - ${XSLTPROC} -o $@ ${XSL} $< - -%.html: %.text %.docbook - ${ASCIIDOC} -n -o $@ $< - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -#%.mandocbook: %.text -# ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -#%.man: %.mandocbook -# ${DOCBOOKTOMAN} --to-stdout $< > $@ - -#%.man: %.text -%.1: %.text - ${A2X} -f manpage $< - -%.pdf: %.text - ${A2X} -f pdf $< - - -# -# Developer targets -# -update: - @git push - -publish-doc: documentation - @echo "Transferring files to ${host}" - @chmod a+r ${DOCS} ${DOC_ALL} - @tar c ${DOCS} ${DOC_ALL} | ssh ${host} "cd ${dir}; tar xv" - -# -# Distribution -# -clean: - rm -f ${DOC_ALL} - rm -f doc/man/*.[0-9] doc/man/*.xml doc/*.fo doc/man/*.fo - -distclean: clean - rm -f ${DOCBDOCS} - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation - -test: ccollect.sh documentation - CCOLLECT_CONF=./conf ./ccollect.sh daily "source with spaces" diff --git a/software/ccollect/download/ccollect-0.6.2/README b/software/ccollect/download/ccollect-0.6.2/README deleted file mode 100644 index 12bcdb38..00000000 --- a/software/ccollect/download/ccollect-0.6.2/README +++ /dev/null @@ -1,62 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - does unecessary moving of backup directories - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -A small try to visualize the differnces in a table: - -+---------------+-------------------------------------------------------------+ -| What? | rsnapshot | ccollect | -+---------------+-------------------------------------------------------------+ -| Configuration | tab separated, needs | plain cconfig-style | -| | parsing | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| post-/pre- | no | yes | -| execution | | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| exclude lists | no | yes | -+---------------+-------------------------------------------------------------+ -| Parallel | | | -| execution | | | -| of multiple | no | yes | -| backups | | | -+---------------+-------------------------------------------------------------+ -| Programming | perl | sh | -| language | | (posix compatible) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 6772 (5353 w/o comments, | 546 (375 w/o comments, | -| (2006-10-25) | 4794 w/o empty lines) | 288 w/o empty lines) | -+---------------+-------------------------------------------------------------+ -| Age | Available since 2002/2003 | Written at 2005-11-14 | -+---------------+-------------------------------------------------------------+ - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.6.2/ccollect.sh b/software/ccollect/download/ccollect-0.6.2/ccollect.sh deleted file mode 100644 index bc631830..00000000 --- a/software/ccollect/download/ccollect-0.6.2/ccollect.sh +++ /dev/null @@ -1,545 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/$(basename $0).XXXXXX") -VERSION=0.6.2 -RELEASE="2007-08-27" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - sed "s:^:\[${name}\] :" -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - c_incomplete="${backup}/delete_incomplete" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret=$? - if [ ${ret} -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a directory. Skipping." - fi - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - ( cd "${c_dest}" 2>/dev/null && ls -1 "${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null) - - while read incomplete; do - realincomplete=$(echo ${incomplete} | sed "s/\\.${c_marker}\$//") - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - rm $VVERBOSE -rf "${c_dest}/${realincomplete}" || \ - _exit_err "Removing ${realincomplete} failed." - fi - done < "${TMP}" - - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count=$(cd "${c_dest}" && ls -p1 | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g') || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - ( cd "${c_dest}" 2>/dev/null && ls -p1 | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" ) > "${TMP}" - - while read to_remove; do - _techo "Removing ${to_remove} ..." - rm ${VVERBOSE} -rf "${c_dest}/${to_remove}" || \ - _exit_err "Removing ${to_remove} failed." - done < "${TMP}" - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Use ls -1c instead of -1t, because last modification maybe the same on all - # and metadate update (-c) is updated by rsync locally. - # - rel_last_dir="$(cd "${c_dest}" && ls -tcp1 | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${c_dest}." - last_dir="${c_dest}/${rel_last_dir}" - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - # must be absolute, otherwise rsync uses it relative to - # the destination directory. See rsync(1). - abs_last_dir="$(cd "${last_dir}" && pwd -P)" || \ - _exit_err "Could not change to last dir ${last_dir}." - set -- "$@" "--link-dest=${abs_last_dir}" - _techo "Hard linking from ${rel_last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${c_dest}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # absulte now, it's existing - abs_destination_dir="$(cd "${destination_dir}" && pwd -P)" || \ - _exit_err "Changing to newly created ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - touch "${abs_destination_dir}.${c_marker}" - - # - # the rsync part - # - - _techo "Transferring files..." - rsync "$@" "${source}" "${abs_destination_dir}"; ret=$? - - # - # remove marking here - # - rm "${abs_destination_dir}.${c_marker}" || \ - _exit_err "Removing ${abs_destination_dir}/${c_marker} failed." - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" diff --git a/software/ccollect/download/ccollect-0.6.2/conf/README b/software/ccollect/download/ccollect-0.6.2/conf/README deleted file mode 100644 index 8402c76f..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/README +++ /dev/null @@ -1,3 +0,0 @@ -This is my personal test configuration. -It can perhaps be some example for you, although it may be pretty -unsorted and highly chaotic. diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.6.2/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.6.2/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/exclude b/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/exclude deleted file mode 100644 index ee4c9268..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/exclude +++ /dev/null @@ -1 +0,0 @@ -/test diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/rsync_options b/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/rsync_options deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/source_postfix b/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/source_postfix deleted file mode 100644 index 0b5cde79..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/source_postfix +++ /dev/null @@ -1 +0,0 @@ -:/ diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/source_prefix b/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/source_prefix deleted file mode 100644 index fc37f9d6..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/source_prefix +++ /dev/null @@ -1 +0,0 @@ -root@ diff --git a/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/verbose b/software/ccollect/download/ccollect-0.6.2/conf/defaults/sources/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.6.2/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/fehler b/software/ccollect/download/ccollect-0.6.2/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/delete_incomplete b/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/delete_incomplete deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/destination b/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/exclude b/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/intervalls/daily b/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/source b/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/source deleted file mode 100644 index 2206a2c8..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/verbose b/software/ccollect/download/ccollect-0.6.2/conf/sources/source with spaces/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.6.2/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.6.2/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.6.2/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.6.2/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/source deleted file mode 100644 index 5e56e040..00000000 --- a/software/ccollect/download/ccollect-0.6.2/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/software/ccollect/download/ccollect-0.6.2/doc/CHANGES b/software/ccollect/download/ccollect-0.6.2/doc/CHANGES deleted file mode 100644 index 3ac5681f..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/CHANGES +++ /dev/null @@ -1,87 +0,0 @@ -0.6.1 to 0.6.2: - * Added analyse-ccollect-logs.sh - * Fixed bug: Removing of backups was broken since update to 0.6 - (forgot to prepend path...) - * Fixed bug: The marker was always deleted, because rsync deleted it. - Create it outside of the backup destination now. - -0.6 to 0.6.1: - * Added check for destination_base in add_ccollect_source.sh - * Added support for -V and --version - * Added ccollect-logwrapper.sh (and a manpage ;-) - * Changed behaviour: ccollect now clones from the latest existing backup, - independent of the interval. This way different intervals do not - diverge. ccollect uses ls -c to determine latest backup. - -0.5.2 to 0.6: - * Always print return code of rsync - * Add much more timing information - * One option per line in rsync_options now (NOT space seperated) - * Added --sparse as default option - * Added management tools (including manpages): - * add_ccollect_source.sh - * delete_ccollect_source.sh - * list_ccollect_intervals.sh - * Cleaned up exit calls (now always cleanly removes temporary files) - * In theory, added pdf documentation (though, was unable to do it with fop) - * Changed license to GPLv3 (from GPLv2) - -0.5.1 to 0.5.2: - * Display correct error code, if rsync returns non-zero - * Unify messages - * Remove some potential quoting problems - -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.6.2/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.6.2/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.6.2/doc/ccollect.text b/software/ccollect/download/ccollect-0.6.2/doc/ccollect.text deleted file mode 100644 index 3428fd0f..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/ccollect.text +++ /dev/null @@ -1,984 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.6, for ccollect 0.6 - 0.6.2, Initial Version from 2006-01-13 -:Author Initials: NS - - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - - -Introduction ------------- -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Supported and tested operating systems and architectures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`ccollect` was successfully tested on the following platforms: - -- GNU/Linux on amd64/hppa/i386 -- NetBSD on amd64/i386/sparc/sparc64 -- OpenBSD on amd64 - -It *should* run on any Unix that supports `rsync` and has a POSIX-compatible -bourne shell. If your platform is not listed above and you have it successfully -running, please drop me a mail. - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions 0.5 and 0.6 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `rsync_options` changed: -- Before 0.6 it was whitespace delimeted -- As of 0.6 it is newline seperated (so you can pass whitespaces to `rsync`) - -You can update your configuration using `tools/config-pre-0.6-to-0.6.sub.sh`. - -.The name of the backup directories changed: -- Before 0.6: "date +%Y-%m-%d-%H%M" -- As of 0.6: "date +%Y%m%d-%H%M" (better readable, date is closer together) - -For the second change there is no updated needed, as XXXX- is always before -XXXXX (- comes before digit). - - - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace value for CCV with the current version -export CCV=0.6 - -# -# replace 'wget' with fetch on bsd -# -holen=wget -"$holen" http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create sample intervals -echo 2 > miniconfig/defaults/intervals/testinterval -echo 3 > miniconfig/defaults/intervals/testinterval2 - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source -ln -s ~/DASI miniconfig/sources/testsource/destination -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -echo "do the backup, twice" -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "the third time ccollect begins to remove old backups" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "Now we add another interval, ccollect should clone from existent ones" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval2 testsource - -echo "Let's see how much space we used with two backups and compare it to /bin" -du -s ~/DASI /bin - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of some backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. If you would -like to use the new management scripts (available since 0.6), copy -the following scripts to a directory in $PATH: - -- `tools/add_ccollect_source.sh` -- `tools/list_ccollect_intervals.sh` -- `tools/delete_ccollect_source.sh` - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is -the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (`mkdir -v`, `rm -v` and `rsync -vv`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline seperated list. - - `rsync_options` extra options for `rsync`. newline seperated list. - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - - `delete_incomplete` delete incomplete backups - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - -Detailed description of "delete_incomplete" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `delete_incomplete` in a source specification directory, -`ccollect` will look for incomplete backups (when the whole `ccollect` process -was interrupted) and remove them. Without this file `ccollect` will only warn -the user. - - -Hints ------ - -Smart logging -~~~~~~~~~~~~~ -Since ccollect-0.6.1 you can use the ccollect-logwrapper.sh(1) for logging. -You call it the same way you call ccollect.sh and it will create a -logfile containing the output of ccollect.sh. For more information look -at the manpage 'ccollect-logwrapper'. The following is an example running -ccollect-logwrapper.sh: - --------------------------------------------------------------------------------- -u0219 ~ # ~chdscni9/ccollect-logwrapper.sh daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Starting with arguments: daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Finished. --------------------------------------------------------------------------------- - - -Using a different ssh port -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mostly easy is to use your ~/.ssh/config file: - --------------------------------------------------------------------------------- -host mx2.schottelius.org - Port 2342 --------------------------------------------------------------------------------- - -If you only use that port for backup and normally want to use another port, -you can add 'HostName' and "HostKeyAlias" (if you also have different -keys on the different ports): - --------------------------------------------------------------------------------- -Host hhydrogenium - Hostname bruehe.schottelius.org - Port 666 - HostKeyAlias hydrogenium - -Host bruehe - Hostname bruehe.schottelius.org - Port 22 - HostKeyAlias bruehe.schottelius.org --------------------------------------------------------------------------------- - - - -Using source names or interval in pre_/post_exec scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The pre-/post_exec scripts can access some internal variables from `ccollect`: - -- INTERVAL: The interval specified on the command line -- no_sources: number of sources -- source_$NUM: the name of the source -- name: the name of the currently being backuped source (not available for - generic pre_exec script) - - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEARMONTHDAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - - -Using source specific interval definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you are backing up multiple hosts via cron each night, it may be -a problem that host "big_server" may only have 4 daily backups, because -otherwise its backup device will be full. But for all other hosts -you want to keep 20 daily backups. In this case you would create -`/etc/ccollect/default/intervals/daily` containing "20" and -`/etc/ccollect/sources/big_server/intervals/daily` containing "4". - -Source specific intervals always overwrite the default values. -If you have to specify it individually for every host, because -of different requirements, you can even omit creating -`/etc/ccollect/default/intervals/daily`. - - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - -If the whole `ccollect` process was interrupted, `ccollect` (since 0.6) can -detect that and remove the incomplete backups, so you can clone from a complete -backup instead. - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -How can I prevent missing the right time to enter my password? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As `ccollect` first deletes the old backups, it may take some time -until `rsync` requests the password for the `ssh` session from you. - -The easiest way not to miss that point is running `ccollect` in `screen`, -which has the ability to monitor the output for activity. So as soon as -your screen beeps, after `ccollect` began to remove the last directory, -you can enter your password (have a look at screen(1), especially "C-a M" -and "C-a _", for more information). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- - - -Processes running when doing ccollect -p -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Truncated output from `ps axuwwwf`: - -------------------------------------------------------------------------- - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily -p ddba034 ddba045 ddba046 ddba047 ddba049 ddna010 ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - R+ 11:40 23:40 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddba034 - S+ 11:40 0:00 | | | | | \_ ssh -l root ddba034.netstream.ch rsync --server --sender -vlogDtprR --numeric-ids . / - S+ 11:41 0:11 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddb - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba034\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba045/destination/daily.2006-10-19-1807.6934 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba045\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba046/destination/daily.2006-10-19-1810.7072 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba046\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba047/destination/daily.2006-10-19-1816.7268 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba047\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - D+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba049/destination/daily.2006-10-19-1821.7504 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba049\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddna010/destination/daily.2006-10-19-1805.6849 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddna010\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - R+ 12:08 0:00 | | | | \_ rm -rf /etc/ccollect/sources/ddna011/destination/daily.2006-10-20-1502.7824 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ sed s:^:\[ddna011\] : - -------------------------------------------------------------------------- -As you can see, six processes are deleting old backups, while one backup -(ddba034) is already copying data. diff --git a/software/ccollect/download/ccollect-0.6.2/doc/logwrapper.text b/software/ccollect/download/ccollect-0.6.2/doc/logwrapper.text deleted file mode 100644 index ec12db48..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/logwrapper.text +++ /dev/null @@ -1,29 +0,0 @@ -ccollect-logwrapper: Logging backup output -=========================================== -Nico Schottelius -0.1, for ccollect-logwrapper 0.1, Initial Version from 2007-06-08 -:Author Initials: NS - -This wrapper makes it easy to have logs of ccollect output. - - -Introduction ------------- -/etc/ccollect/logwrapper/ (also uses $CCOLLECT_CONF). - - - pipe: will pipe to a program - staticfile: link to a file - datefile: - contains a string that is passed to date that returns - dynamicfile: - is a program, that returns some string that we use as - a filename - syslog: - syslog-facility - syslog-level - only-stderr: - omit stdout output - -The logger will output to which destinations it logs and with which -parameters it was started. diff --git a/software/ccollect/download/ccollect-0.6.2/doc/man/add_ccollect_source.text b/software/ccollect/download/ccollect-0.6.2/doc/man/add_ccollect_source.text deleted file mode 100644 index 98f41980..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/man/add_ccollect_source.text +++ /dev/null @@ -1,73 +0,0 @@ -add_ccollect_source(1) -====================== -Nico Schottelius - - -NAME ----- -add_ccollect_source - create new source for ccollect(1) - - -SYNOPSIS --------- - -'add_ccollect_source.sh' - - -DESCRIPTION ------------ -add_ccollect_source.sh creates a new backup source for use with ccollect(1). -It copies the files from to the source directory with the hostname below -'$CCOLLECT_CONF/sources'. - - -FILES ------ -$CCOLLECT_CONF/defaults/sources:: - Main configuration directory. $CCOLLECT_CONF is '/etc/ccollect', if unset. - All the following files reside below this directory. - -exclude:: -summary:: -intervals:: -pre_exec:: -post_exec:: -rsync_options:: -verbose:: -very_verbose:: - Those are the standard configuration files known by ccollect(1). - If the file exist it will be copied to the newly created source. - Directories ('intervals') are copied recursively. - -destination_base:: - A link to the directory where to store the backups. Below this directory - `add_ccollect_source.sh` will create a directory with the hostname you - specified on the command line. - -source_prefix:: -source_postfix:: - `source_prefix` is put before the hostname, `source_postfix` is appended - after it. A common value for `source_prefix` maybe 'root@' and ':/' - for `source_postfix`. - - -SEE ALSO --------- -ccollect(1), ccollect-logwrapper(1), -delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.2/doc/man/ccollect-logwrapper.text b/software/ccollect/download/ccollect-0.6.2/doc/man/ccollect-logwrapper.text deleted file mode 100644 index e1a4d6cf..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/man/ccollect-logwrapper.text +++ /dev/null @@ -1,55 +0,0 @@ -ccollect-logwrapper(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect-logwrapper - start ccollect(1) and create a unique log - - -SYNOPSIS --------- -'ccollect-logwrapper.sh' - - -DESCRIPTION ------------ -ccollect-logwrapper.sh creates a unique logfile below -'$CCOLLECT_CONF/logwrapper' and redirects ccollect(1) output -(stdout and stderr) to it. - - -OPTIONS -------- -Options are passed directly to ccollect(1). - - -FILES ------ -$CCOLLECT_CONF/logwrapper:: - Directory containing the configuration. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -$CCOLLECT_CONF/logwrapper/destination:: - Link to the destination directory for the logfiles - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), -delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.2/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.6.2/doc/man/ccollect.text deleted file mode 100644 index a246dbf7..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/man/ccollect.text +++ /dev/null @@ -1,59 +0,0 @@ -ccollect(1) -=========== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the manual titled -"ccollect - Installing, Configuring and Using" (available as texinfo or html). - - -OPTIONS -------- --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -SEE ALSO --------- -add_ccollect_source(1), ccollect-logwrapper(1) -delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006-2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.2/doc/man/delete_ccollect_source.text b/software/ccollect/download/ccollect-0.6.2/doc/man/delete_ccollect_source.text deleted file mode 100644 index b6e05bc0..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/man/delete_ccollect_source.text +++ /dev/null @@ -1,56 +0,0 @@ -delete_ccollect_source(1) -========================= -Nico Schottelius - - -NAME ----- -delete_ccollect_source - delete sources from ccollect(1) - - -SYNOPSIS --------- -'delete_ccollect_source.sh' [-d] [-f] - - -DESCRIPTION ------------ -delete_ccollect_source.sh deletes backup sources from ccollect(1) and optional -also the backups created for that source. - -OPTIONS -------- --d: - Delete also the destination directory. `add_ccollect_source.sh` will change - to the source/'name'/destination directory, get the absolute name and delete - it recursively. --f: - Force deletion. Do not ask. Very handy for people who know what they do. - Very dangerous for everyone. - - -FILES ------ -$CCOLLECT_CONF/sources:: - Directory containing the sources. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), -ccollect-logwrapper(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.2/doc/man/list_ccollect_intervals.text b/software/ccollect/download/ccollect-0.6.2/doc/man/list_ccollect_intervals.text deleted file mode 100644 index 6fd1a88d..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/man/list_ccollect_intervals.text +++ /dev/null @@ -1,46 +0,0 @@ -list_ccollect_intervals(1) -========================== -Nico Schottelius - - -NAME ----- -list_ccollect_intervals - list available intervals from ccollect(1) - - -SYNOPSIS --------- -'list_ccollect_intervals.sh' - - -DESCRIPTION ------------ -list_ccollect_intervals.sh shows intervals specified in the configuration -for ccollect(1). It displays the name of each interval, followed by a colon -followed by the number backups to keep. - -FILES ------ -$CCOLLECT_CONF/intervals:: - Directory containing the intervals. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), -ccollect-logwrapper(1), delete_ccollect_source(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6.2/doc/release-checklist b/software/ccollect/download/ccollect-0.6.2/doc/release-checklist deleted file mode 100644 index 7cba30cd..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version and date in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.2 b/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.2 deleted file mode 100644 index 0c1c2250..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.2 +++ /dev/null @@ -1,4 +0,0 @@ -x Fix $? problem -x Check last dir searching -x Check count generation -x Check general functionality (remove testing) diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.3 b/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.3 deleted file mode 100644 index 00195812..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.3 +++ /dev/null @@ -1,34 +0,0 @@ -Done: -==> screenshot -u0219 zrha166.netstream.ch # ~chdscni9/ccollect.sh weekly zrha166.netstream.ch -2007-08-16-21:49:44: ccollect 0.6: Beginning backup using interval weekly -[zrha166.netstream.ch] 2007-08-16-21:49:44: Beginning to backup -[zrha166.netstream.ch] 2007-08-16-21:49:45: Existing backups: 0 Total keeping backups: 8 -[zrha166.netstream.ch] 2007-08-16-21:49:45: Did not find existing backups for interval weekly. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Using backup from daily. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Beginning to backup, this may take some time... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Creating /etc/ccollect/sources/zrha166.netstream.ch/destination/weekly.20070816-2149.22188 ... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Transferring files... - -- beep-after-delete-hack? - -> tonnerre / #cLinux - -- replace nico-linux-ccollect with nico-ccollect - * ccollect is not Linux specific - -- remove exit-calls - * will leave behind unused temporary file! - * use _exit_err - -X join todos - -- fix possible quoting problems - * rsync_extra (redefine format) - * exclude - * other - * create _rsync, filtering args, creating new $@ - -- check and export variables for use in scripts! - -Contact Julian later: - * integrate updated german documentation diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.3.tonnerre b/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.3.tonnerre deleted file mode 100644 index 4e7b7db5..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.5.3.tonnerre +++ /dev/null @@ -1,11 +0,0 @@ -NetBSD/i386,amd64,sparc,sparc64 - -13:13 < Tonnerre> telmich, die kleine wä, 2 Variablen aus $(CCOLLECT) zu - machen -13:13 < Tonnerre> telmich, eine fü Sourcepfad und eine fü -Destinationfpad -13:13 < Tonnerre> pfa -13:13 < Tonnerre> d -13:14 < Tonnerre> telmich, die gröre wä die $() durch ${} zu ersetzen, so -dass der Kram auch mit !GNU-Make geht - diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6 b/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6 deleted file mode 100644 index ee8e97fd..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6 +++ /dev/null @@ -1,63 +0,0 @@ -not did, did not remember why I wanted to do that: - -- do sed-time check: - -1.2. replace sed? -compare timing: -_echo () { echo "$name $msg" } -and create -_techo () { echo "$timestamp $name $msg" } -perhaps create -_eecho () { _techo "ERROR $msg" } -? - - - -done: -add note for - 09:24 < telmich> Obri: ~/.ssh/config! - -- implement use of different intervals as source for cloning - * use 'woechentlich' if available and no backup exists for 'daily' - * add 'prefer_latest' to prefer different interval, that's newer than - ours - * or add 'prefer_same_interval' instead? -- implement detection of partial backups -3. detect unfinished backups -sven / markierung - - wie seht der Marker aus? - -> .ccollect-YEAR-MM-DD.HHmm.pid (like the directory) - --> assume incomplete, when we did not finish. - --> means it's complete,when rsync was successful ----> partial implemented in 0.5.2 (commented out) -- do not check by name, but by time - * is ls -t posix? - * also check: -p -1 -- ccollect Zeitausgabe verbessern - - Wofuer wie lange gebraucht - * rm - * klonen (gibt es so ja nicht) - Wenn Summary angegeben ist am Ende ausgeben -- do we want rsync -H by default? - * no: takes much more memory -ssh / port change: - change rsync_extra format -- Variables: - source_$n - no_sources - name -- changed naming of sources: - YYYYMMDD-HHMM.PID (better readable) - => source / backup converter! => not needed! -config: - set destination-base - /etc/ccollect/defaults/source_config - -Documentation: -- hint: backuping backup -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- delete_incomplete - diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.1 b/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.1 deleted file mode 100644 index 99a17eba..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.1 +++ /dev/null @@ -1,23 +0,0 @@ -- Add filter support - * filter -- add source/ignore_failed_pre_exec -- add source/ignore_failed_post_exec -- do not delete_incomplete, when there's only one backup left! -- .ccollect-marker is deleted by rsync at the beginning! - - fix marking -- add logwrapper -- add loganalyser - speedup is - error codes - vanished files (see netstream)!!! - -Done: -- Improve finding backup from another interval: - o strip of interval name - o run sort -n - o use the last entry -- add --version, -V - -not needed: -- think about 'prefer_same_interval' / 'prefer_latest' - diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.2 b/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.2 deleted file mode 100644 index 05798ffd..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.2 +++ /dev/null @@ -1 +0,0 @@ -- fix delete_incomplete marker diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.3 b/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.3 deleted file mode 100644 index 54f06cb6..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/0.6.3 +++ /dev/null @@ -1,4 +0,0 @@ -- add global delete_incomplete (/etc/ccollect/defaults/delete_incomplete) -- add wrapper, to do logging and analyse - * output filename in the wrapper, save into variable - * call analyser diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/extern b/software/ccollect/download/ccollect-0.6.2/doc/todo/extern deleted file mode 100644 index 9be8f2be..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/extern +++ /dev/null @@ -1,23 +0,0 @@ -These todos are things that would be senseful todo, but are just nice -to have. This means I won't code them, so somebody can code them. --------------------------------------------------------------------------------- - -- Add ccollect-restore.sh - (new project, perhaps coordinated with jchome's ccollect-config) - - Helper (in dialog?) to restore backups - - Perhaps create ccollect-gui.{whatever} instead, which does all the - end user staff? - - Including cronjob, creating configuration, displaying status of - backups, allowing manual remove, allowing manual trigger of ccollect - (with realtime message window?)? - -- write mkccollectconfig (for 0.5!) - -> jchome works on it! - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.6.2/doc/todo/netstream-1 b/software/ccollect/download/ccollect-0.6.2/doc/todo/netstream-1 deleted file mode 100644 index a0a6eba0..00000000 --- a/software/ccollect/download/ccollect-0.6.2/doc/todo/netstream-1 +++ /dev/null @@ -1,53 +0,0 @@ -Preamble: - Netstream (www.netstream.ch) may consider using ccollect for backing up many - unix servers and needs some clean reporting. The following things - need to be done, so ccollect will be useful for netstream: - -Logger: - - Needs to write small mails (sysadmins don't have time to read mails) - - Needs to be able to only write a mail on error - * needs configuration option to also mail on warnings - - Should be able to send one mail per backup source - * or one for the whole backup job - -Messages: (to be used for filtering) - Errors: - Read from remote host .*: Connection timed out - - Warnings: - rsync: mknod .* failed: Invalid argument (22) - file has vanished: ".*" - --------------------------------------------------------------------------------- - -Analyzer: - - grosse Dateien - - grosse Veraenderungen --------------------------------------------------------------------------------- -exclude-lists-doku: -freebsd: - /usr/ports/* - /proc/* - /dev/* - /tmp/* - /var/tmp/* -linux: - /sys/* - /proc/* - /dev/* - /tmp/* - --------------------------------------------------------------------------------- -done: - -rsync_extra global! -- \n delimeted --------------------------------------------------------------------------------- - -S, --sparse - Try to handle sparse files efficiently so they take up less space on the des‐ - tination. Conflicts with --inplace because it’s not possible to overwrite - data in a sparse fashion. - --------------------------------------------------------------------------------- - Always report return code! - diff --git a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/Makefile b/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/Makefile deleted file mode 100644 index c14c77d8..00000000 --- a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# New ports collection makefile for: oneko -# New ports collection makefile for: ccollect -# Date created: 2006-10-20 -# Whom: Nico Schottelius -# -# $FreeBSD$ -# - -PORTNAME= ccollect -PORTVERSION= 0.5.1 -CATEGORIES= sysutils archivers -MASTER_SITES= http://unix.schottelius.org/ccollect/ - -MAINTAINER= nico-fbsd-ccollect@schottelius.org -COMMENT= (pseudo) incremental (parallel) backup - -MAN1= ccollect.sh.1 -MANCOMPRESSED= no -USE_BZIP2= yes - -RUN_DEPENDS= rsync:${PORTSDIR}/net/rsync - -.include diff --git a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/distinfo b/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/distinfo deleted file mode 100644 index 9e1b6fe5..00000000 --- a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -MD5 (ccollect-0.5.1.tar.bz2) = 8601a6d6de52ba839768e2804ca57499 -SIZE (ccollect-0.5.1.tar.bz2) = 37397 diff --git a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/pkg-descr b/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/pkg-descr deleted file mode 100644 index c822c6ed..00000000 --- a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -This is a port of ccollect, a backup utility which creates -fullbackups with the space needed of incremental backups. - -WWW: http://unix.schottelius.org/ccollect/ diff --git a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/pkg-list b/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/pkg-list deleted file mode 100644 index c1d82f97..00000000 --- a/software/ccollect/download/ccollect-0.6.2/external/freebsd-port/pkg-list +++ /dev/null @@ -1 +0,0 @@ -bin/ccollect.sh diff --git a/software/ccollect/download/ccollect-0.6.2/release.sh b/software/ccollect/download/ccollect-0.6.2/release.sh deleted file mode 100644 index 7a758bb3..00000000 --- a/software/ccollect/download/ccollect-0.6.2/release.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -# create documentation for the end user -( - cd "$NAME" - make dist - make publish-doc -) - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" - -cat "${NAME}/doc/release-checklist" diff --git a/software/ccollect/download/ccollect-0.6.2/tools/add_ccollect_source.sh b/software/ccollect/download/ccollect-0.6.2/tools/add_ccollect_source.sh deleted file mode 100644 index f431c7f2..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/add_ccollect_source.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-16 -# Written for Netstream (www.netstream.ch) -# Creates a source from standard values specified in -# /etc/ccollect/defaults/sources -# Copying: GPLv3 - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -SCONFIG="${CDEFAULTS}/sources" - -# standard options: variable2filename -exclude="exclude" -summary="summary" -intervals="intervals" -pre_exec="pre_exec" -post_exec="post_exec" -rsync_options="rsync_options" -verbose="verbose" -very_verbose="very_verbose" - -# options that we simply copy over -standard_opts="exclude summary intervals pre_exec post_exec rsync_options verbose very_verbose" - -# options not in standard ccollect, used only for source generation -src_prefix="${SCONFIG}/source_prefix" -src_postfix="${SCONFIG}/source_postfix" -destination_base="${SCONFIG}/destination_base" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _exit_err "" -fi - -_echo "Reading defaults from ${SCONFIG} ..." - -while [ $# -gt 0 ]; do - source="$1"; shift - - # Create - _echo "Creating ${source} ..." - - fullname="${CSOURCES}/${source}" - - # create source - if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Skipping." - continue - fi - mkdir -p "${fullname}" || _exit_err Cannot create \"${fullname}\". - - # copy standard files - for file in $standard_opts; do - eval rfile=\"\$$file\" - eval filename=${SCONFIG}/${rfile} - if [ -e "${filename}" ]; then - _echo Copying \"$rfile\" to ${fullname} ... - cp -r "${filename}" "${fullname}/${rfile}" - fi - done - - # create source entry - if [ -f "${src_prefix}" ]; then - source_source="$(cat "${src_prefix}")" || _exit_err "${src_prefix}: Reading failed." - fi - source_source="${source_source}${source}" - if [ -f "${src_postfix}" ]; then - source_source="${source_source}$(cat "${src_postfix}")" || _exit_err "${src_postfix}: Reading failed." - fi - _echo "Adding \"${source_source}\" as source for ${source}" - echo "${source_source}" > "${fullname}/source" - - # create destination directory - absbase=$(cd "${destination_base}" 2>/dev/null && pwd -P) || \ - _exit_err "${destination_base} must exist before creating sources." - - dest="${absbase}/${source}" - _echo "Creating ${dest} ..." - mkdir -p "${dest}" || _exit_err "${dest}: Cannot create." - - # link destination directory - dest_abs=$(cd "${dest}" && pwd -P) || _exit_err "${dest}: Changing to newly create dirctory failed." - ln -s "${dest_abs}" "${fullname}/destination" || \ - _exit_err "${fullname}/destination: Failed to link \"${dest_abs}\"" - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.6.2/tools/analyse-ccollect-logs.sh b/software/ccollect/download/ccollect-0.6.2/tools/analyse-ccollect-logs.sh deleted file mode 100644 index 6ceb4141..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/analyse-ccollect-logs.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for Netstream (www.netstream.ch) -# Date: Di 21. Aug 17:10:15 CEST 2007 -# Analyse existing logs - -version=0.1 -date=2007-08-24 -fullversion="${version} (${date})" -args=iwe - -usage() { - echo "$(basename "$0") ${fullversion}: [iwe]" - echo "" - echo " i: print informational messages" - echo " w: print warning messages" - echo " e: print error messages" - echo "" - echo "Reading input from stdin, displaying to stdout." - exit 1 -} - -# -# read and verify argv -# -if [ "$#" -ne 1 ]; then - usage -fi -argv="$1"; shift - -wrong="$(echo ${argv} | grep -e "[^${args}]")" -if [ "${wrong}" ]; then - usage -fi - - -# set output levels -search_err="$(echo ${argv} | grep 'e')" -search_warn="$(echo ${argv} | grep 'w')" -search_info="$(echo ${argv} | grep 'i')" - -# -# Interesting strings in the logs: errors -# --------------------------------------- - -if [ "$search_err" ]; then - set -- "$@" "-e" 'Read from remote host .*: Connection timed out$' - set -- "$@" "-e" 'Read from remote host .*: Connection reset by peer$' - set -- "$@" "-e" 'rsync: .*: Invalid argument (22)$' - set -- "$@" "-e" 'rsync: .*: Input/output error (5)$' - set -- "$@" "-e" 'cannot send long-named file "' - set -- "$@" "-e" 'ERROR: .* failed verification -- update discarded.$' -fi - -# known error strings: -#[ddba049.netstream.ch] receiving file list ... rsync: readdir("/proc"): Invalid argument (22) -#[ddba033.netstream.ch] rsync: readlink "/usr/local/inetpub2/webmailroot/2wire.ch/royal@2wire.ch" failed: Input/output error (5) -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) -#[zrha165.netstream.ch] Read from remote host zrha165.netstream.ch: Connection reset by peer -#[ddba017.netstream.ch] receiving file list ... cannot send long-named file "/usr/local/www/apache22/cgi-bin/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/bac kup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup /backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ba ckup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backu p/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/back" -#[ddba033.netstream.ch] ERROR: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded. - - -# -# Interesting strings in the logs: warnings -# ----------------------------------------- -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) - -# [ddba015.netstream.ch] send_files failed to open /usr/local/dnscache/log/main/@4000000046ca0f3616939c14.s: No such file or directory -# [ddba015.netstream.ch] 2007-08-21-02:17:28: Finished backup (rsync return code: 23). -# [ddba017.netstream.ch] file has vanished: "/var/spool/postfix/active/657575D686" -#[ddba026.netstream.ch] 2007-08-21-05:35:13: Finished backup (rsync return code: 24). -#[ddba045.netstream.ch] send_files failed to open /data/hsphere/local/var/named/logs/@4000000046c98fa9079f39ac.s: No such file or directory -# file has vanished: ".*" - -if [ "$search_warn" ]; then - # warn on non-zero exit code - set -- "$@" "-e" 'Finished backup (rsync return code: [^0]' - set -- "$@" "-e" 'WARNING: .* failed verification -- update discarded (will try again).' -fi -# known warnings: -#[ddba033.netstream.ch] WARNING: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded (will try again). - - -# -# Interesting strings in the logs: informational -# ---------------------------------------------- -if [ "$search_info" ]; then - set -- "$@" "-e" 'total size is [[:digit:]]* speedup is' - set -- "$@" "-e" 'Backup lasted: [[:digit:]]*:[[:digit:]]\{1,2\}:[[:digit:]]* (h:m:s)$' - set -- "$@" "-e" 'send [[:digit:]]* bytes received [0-9]* bytes [0-9]* bytes/sec$' -fi - -# info includes: -#[ddba012.netstream.ch] total size is 22384627486 speedup is 13.75 -# [u0160.nshq.ch.netstream.com] 2007-08-20-18:26:06: Backup lasted: 0:43:34 (h:m:s) -#[ddba012.netstream.ch] sent 3303866 bytes received 1624630525 bytes 122700.92 bytes/sec - -grep "$@" diff --git a/software/ccollect/download/ccollect-0.6.2/tools/ccollect-logwrapper.sh b/software/ccollect/download/ccollect-0.6.2/tools/ccollect-logwrapper.sh deleted file mode 100644 index c2b0c2e7..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/ccollect-logwrapper.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for Netstream (www.netstream.ch) -# Date: Fr 8. Jun 10:30:24 CEST 2007 -# Call the log-wrapper instead of ccollect.sh and it will create nice logs - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -LOGCONF=$CCOLLECT_CONF/logwrapper - -logdir="${LOGCONF}/destination" -CDATE="date +%Y%m%d-%H%M" -we="$(basename $0)" -pid=$$ - -export ccollect_logfile="${logdir}/$(${CDATE}).${pid}" - -# use syslog normally -# Also use echo, can be redirected with > /dev/null if someone cares -_echo() -{ - string="${we} (${pid}): $@" - logger "${string}" - echo "${string}" -} - - -# exit on error -_exit_err() -{ - _echo "$@" >&2 - rm -f "${TMP}" - exit 1 -} - -# put everything into that specified file -_echo "Starting with arguments: $@" -touch "${ccollect_logfile}" || _exit_err "Failed to create ${ccollect_logfile}" - -# First line in the logfile is always the commandline -echo ccollect.sh "$@" > "${ccollect_logfile}" 2>&1 -ccollect.sh "$@" >> "${ccollect_logfile}" 2>&1 - -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.2/tools/ccollect-stats.sh b/software/ccollect/download/ccollect-0.6.2/tools/ccollect-stats.sh deleted file mode 100644 index 5ce171b1..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/ccollect-stats.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - - -if [ ! -e /tmp/ccollect-stats.lock ] -then - touch /tmp/ccollect-stats.lock - find /etc/ccollect/sources/ -type l | while read line - do - backupname=$(basename $(readlink $line)) - echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log - du -sh $line/* | tee -a /var/log/backup.log - done - rm /tmp/ccollect-stats.lock -fi - - - diff --git a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.6-to-0.6.sh b/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.6-to-0.6.sh deleted file mode 100644 index 5efce689..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.6-to-0.6.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Nico Schottelius, 20070816-2225 -# Transfer configuration to 0.6 layout -# Copying: GPLv3 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -type f -name rsync_options -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.6-to-0.6.sub.sh b/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.6-to-0.6.sub.sh deleted file mode 100644 index b4e0bd33..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/config-pre-0.6-to-0.6.sub.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# Nico Schottelius, 20070816-2227 -# Transfer configuration to 0.6 layout (subscript) -# Copying: GPLv3 -# - -if [ $# -ne 1 ]; then - echo "$0: rsync_options file" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) - -echo "Working on $1 ..." - -for option in $(cat "$1"); do - echo "${option}" >> "${tmp}" -done -mv ${tmp} "$1" diff --git a/software/ccollect/download/ccollect-0.6.2/tools/create_source.sh b/software/ccollect/download/ccollect-0.6.2/tools/create_source.sh deleted file mode 100644 index 7a34c6b0..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/create_source.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 3 ]; then - _echo " " - _echo "Example: \"my-notebook\" \"192.168.42.42\" \"/home/server/backup/my-notebook\"" - exit 1 -fi - -name="$1" -source="$2" -destination="$3" -fullname="${CSOURCES}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${source} ..." -ping -c1 "${source}" || _exit_err "Cannot reach ${source}. Aborting." - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${source}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.2/tools/create_source2.sh b/software/ccollect/download/ccollect-0.6.2/tools/create_source2.sh deleted file mode 100644 index 842afb65..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/create_source2.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 2 ]; then - _echo " " - _echo "Example: \"192.168.42.42\" \"/home/server/backup/\"" - _echo " This will create ${CSOURCES}/192.168.42.42 and /home/server/backup/192.168.42.42." - exit 1 -fi - -# sourcename / servername -name="$1" - -# basedir -basedir="$2" - -fullname="${CSOURCES}/${name}" -destination="${basedir}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${name} ..." -ping -c1 "${name}" || _exit_err "Cannot reach ${name}. Aborting." - -if [ ! -d "${basedir}" ]; then - echo "${basedir} is not a directory. Aborting." - exit 7 -fi - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${name}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6.2/tools/delete_ccollect_source.sh b/software/ccollect/download/ccollect-0.6.2/tools/delete_ccollect_source.sh deleted file mode 100644 index 8a811d32..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/delete_ccollect_source.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-16 -# Written for Netstream (www.netstream.ch) -# Delete sources and their backups (optionally). -# Copying: GPLv3 (See file COPYING in top directory) - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _echo "${self} [-f] [-d] " - _echo " -f: Do not ask, simply delete. Dangerous and good for sysadmins." - _echo " -d: Also delete the destination (removes all backups)" - _exit_err "Exiting." -fi - -params_possible=yes -force="" -backups="" - -while [ $# -gt 0 ]; do - - if [ "$params_possible" ]; then - case "$1" in - "-f"|"--force") - force=yes - shift; continue - ;; - "-d"|"--destination") - backups=yes - shift; continue - ;; - --) - params_possible="" - shift; continue - ;; - -*|--*) - _exit_err "Unknown option: $1" - ;; - esac - - fi - - # Reached here? So there are no more parameters. - params_possible="" - - source="$1"; shift - - # Create - _echo "Deleting ${source} ..." - fullname="${CSOURCES}/${source}" - - # ask the user per source, if she's not forcing us - if [ -z "$force" ]; then - sure="" - echo -n "Do you really want to delete ${source} (y/n)? " - read sure - - if [ "$sure" != "y" ]; then - _echo "Skipping ${source}." - continue - fi - fi - - if [ "$backups" ]; then - ddir=$(cd "${fullname}/destination" && pwd -P) || _exit_err "Cannot change to ${fullname}/destination" - _echo "Deleting ${ddir} ..." - rm -r "${ddir}" - fi - - _echo "Deleting ${fullname} ..." - rm -r "${fullname}" - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.6.2/tools/gnu-du-backup-size-compare.sh b/software/ccollect/download/ccollect-0.6.2/tools/gnu-du-backup-size-compare.sh deleted file mode 100644 index 85b876b6..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/gnu-du-backup-size-compare.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 2007-08-16 -# Last Modified: - -# - -exit 1 -# not yet finished. - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_SOURCES="$CCOLLECT_CONF/defaults/sources" - -me="$(basename "$0")" - -if [ $# -lt 1 ]; then - echo "${me}: sources names - exit 1 -fi - -if [ ! -d "$CCOLLECT_SOURCES" ]; then - echo "No sources defined in $CCOLLECT_SOURCES" - exit 1 -fi - -cd "${CCOLLECT_SOURCES}" - -while [ "$#" -gt 0 ]; do - source="$1"; shift - fsource="${CCOLLECT_SOURCES}/${source}" - du -s "${fsource}/"* "${fsource}" - # du -l should follow -done diff --git a/software/ccollect/download/ccollect-0.6.2/tools/list_ccollect_intervals.sh b/software/ccollect/download/ccollect-0.6.2/tools/list_ccollect_intervals.sh deleted file mode 100644 index 47c1481d..00000000 --- a/software/ccollect/download/ccollect-0.6.2/tools/list_ccollect_intervals.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 24-Jun-2006 -# Last Modified: - -# Copying: GPLv3 (See file COPYING in top directory) -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -me="$(basename $0)" - -_echo() -{ - echo "$me> $@" -} - -if [ ! -d "${CCOLLECT_INTERVALS}" ]; then - _echo "No intervals defined in ${CCOLLECT_INTERVALS}" - exit 1 -fi - -set -e -cd "${CCOLLECT_INTERVALS}" - -for interval in *; do - eval int_${interval}=$(cat "${interval}"); - eval echo ${interval}: \$int_${interval}; -done diff --git a/software/ccollect/download/ccollect-0.6/.gitignore b/software/ccollect/download/ccollect-0.6/.gitignore deleted file mode 100644 index 4e9c74d5..00000000 --- a/software/ccollect/download/ccollect-0.6/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.htm -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.htm -doc/man/*.texi -doc/man/*.man -test/* -.*.swp -doc/man/*.[0-9] -doc/*.xml -doc/*/*.xml -*.texi -*.fo diff --git a/software/ccollect/download/ccollect-0.6/COPYING b/software/ccollect/download/ccollect-0.6/COPYING deleted file mode 100644 index fc8a5de7..00000000 --- a/software/ccollect/download/ccollect-0.6/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/software/ccollect/download/ccollect-0.6/CREDITS b/software/ccollect/download/ccollect-0.6/CREDITS deleted file mode 100644 index 3f362708..00000000 --- a/software/ccollect/download/ccollect-0.6/CREDITS +++ /dev/null @@ -1,5 +0,0 @@ -Thanks go to the following people: - - - the whole #cLinux channel for testing and debugging - (those I mean should know ;-) - - Alexey Maximov for finding return-value and shell limitation bugs diff --git a/software/ccollect/download/ccollect-0.6/Makefile b/software/ccollect/download/ccollect-0.6/Makefile deleted file mode 100644 index 763e4920..00000000 --- a/software/ccollect/download/ccollect-0.6/Makefile +++ /dev/null @@ -1,154 +0,0 @@ -# -# ccollect -# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006 -# - -INSTALL=install -CCOLLECT_SOURCE=ccollect.sh -CCOLLECT_DEST=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man -XSLTPROC=xsltproc -XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl -A2X=a2x - -prefix=/usr/packages/ccollect-git -bindir=${prefix}/bin -destination=${bindir}/${CCOLLECT_DEST} - -mandest=${prefix}/man/man1 -manlink=/usr/local/man/man1 - -path_dir=/usr/local/bin -path_destination=${path_dir}/${CCOLLECT_DEST} - -# where to publish -host=home.schottelius.org -dir=www/org/schottelius/unix/www/ccollect/ -docdir=${dir}/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text \ - doc/man/add_ccollect_source.text \ - doc/man/delete_ccollect_source.text \ - doc/man/list_ccollect_intervals.text - -DOCS = ${MANDOCS} doc/ccollect.text doc/ccollect-DE.text - -# -# Doku -# -HTMLDOCS = ${DOCS:.text=.html} -DBHTMLDOCS = ${DOCS:.text=.htm} - -# texi is broken currently, don't know why xslt things complain yet -TEXIDOCS = ${DOCS:.text=.texi} -TEXIDOCS = - -# fop fails here, so disable it for now -PDFDOCS = ${DOCS:.text=.pdf} -PDFDOCS = - -MANPDOCS = ${MANDOCS:.text=.1} - -DOCBDOCS = ${DOCS:.text=.docbook} - -DOC_ALL = ${HTMLDOCS} ${DBHTMLDOCS} ${TEXIDOCS} ${MANPDOCS} ${PDFDOCS} - -html: ${HTMLDOCS} -htm: ${DBHTMLDOCS} -info: ${TEXIDOCS} -man: ${MANPDOCS} -pdf: ${PDFDOCS} -documentation: ${DOC_ALL} - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage{s}" - @echo "install: install ccollect to ${prefix}" - -install: install-link install-manlink - -install-link: install-script - ${LN} ${destination} ${path_destination} - -install-script: - ${INSTALL} -D -m 0755 ${CCOLLECT_SOURCE} ${destination} - -install-man: man - ${INSTALL} -d -m 0755 ${mandest} - ${INSTALL} -D -m 0644 doc/man/*.1 ${mandest} - -install-manlink: install-man - ${INSTALL} -d -m 0755 ${manlink} - for man in ${mandest}/*; do ${LN} $$man ${manlink}; done - - -# docbook gets .htm, asciidoc directly .html -%.htm: %.docbook - ${XSLTPROC} -o $@ ${XSL} $< - -%.html: %.text %.docbook - ${ASCIIDOC} -n -o $@ $< - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -#%.mandocbook: %.text -# ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -#%.man: %.mandocbook -# ${DOCBOOKTOMAN} --to-stdout $< > $@ - -#%.man: %.text -%.1: %.text - ${A2X} -f manpage $< - -%.pdf: %.text - ${A2X} -f pdf $< - - -# -# Developer targets -# -update: - @git push - -publish-doc: documentation - @echo "Transferring files to ${host}" - @chmod a+r ${DOCS} ${DOC_ALL} - @tar c ${DOCS} ${DOC_ALL} | ssh ${host} "cd ${dir}; tar xv" - -# -# Distribution -# -clean: - rm -f ${DOC_ALL} - rm -f doc/man/*.[0-9] doc/man/*.xml doc/*.fo doc/man/*.fo - -distclean: clean - rm -f ${DOCBDOCS} - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation - -test: ccollect.sh documentation - CCOLLECT_CONF=./conf ./ccollect.sh daily "source with spaces" diff --git a/software/ccollect/download/ccollect-0.6/README b/software/ccollect/download/ccollect-0.6/README deleted file mode 100644 index 12bcdb38..00000000 --- a/software/ccollect/download/ccollect-0.6/README +++ /dev/null @@ -1,62 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups data from local or remote hosts to your local harddisk. - - -You can retriev the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - does unecessary moving of backup directories - - I didn't like the configuration at all, so I used the cconfig style [2]. - - -A small try to visualize the differnces in a table: - -+---------------+-------------------------------------------------------------+ -| What? | rsnapshot | ccollect | -+---------------+-------------------------------------------------------------+ -| Configuration | tab separated, needs | plain cconfig-style | -| | parsing | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| post-/pre- | no | yes | -| execution | | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| exclude lists | no | yes | -+---------------+-------------------------------------------------------------+ -| Parallel | | | -| execution | | | -| of multiple | no | yes | -| backups | | | -+---------------+-------------------------------------------------------------+ -| Programming | perl | sh | -| language | | (posix compatible) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 6772 (5353 w/o comments, | 546 (375 w/o comments, | -| (2006-10-25) | 4794 w/o empty lines) | 288 w/o empty lines) | -+---------------+-------------------------------------------------------------+ -| Age | Available since 2002/2003 | Written at 2005-11-14 | -+---------------+-------------------------------------------------------------+ - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.6/ccollect.sh b/software/ccollect/download/ccollect-0.6/ccollect.sh deleted file mode 100644 index 60554a47..00000000 --- a/software/ccollect/download/ccollect-0.6/ccollect.sh +++ /dev/null @@ -1,546 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 -# Last Modified: (See ls -l or git) - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/$(basename $0).XXXXXX") -VERSION=0.6 -RELEASE="2007-08-17" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - sed "s:^:\[${name}\] :" -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - usage -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - c_incomplete="${backup}/delete_incomplete" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret=$? - if [ ${ret} -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - - # - # destination _must_ be a directory - # - if [ ! -d "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a directory. Skipping." - fi - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # - # Verbosity for rsync - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - ( cd "${c_dest}" 2>/dev/null && ls -1 "${INTERVAL}"*"/${c_marker}" > "${TMP}" 2>/dev/null) - - while read incomplete; do - realincomplete=$(echo ${incomplete} | sed "s/${c_marker}\$//") - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - rm $VVERBOSE -rf "${c_dest}/${realincomplete}" || \ - _exit_err "Removing ${c_dest}/${realincomplete} failed." - fi - done < "${TMP}" - - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count=$(cd "${c_dest}" && ls -p1 | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g') || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - ( cd "${c_dest}" 2>/dev/null && ls -p1 | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" > "${TMP}" ) - - while read to_remove; do - _techo "Removing ${to_remove} ..." - rm ${VVERBOSE} -rf "$to_remove" || \ - _exit_err "Removing ${to_remove} failed." - done < "${TMP}" - fi - - - # - # Check for backup directory to clone from - # - - # try our interval - last_dir="$(ls -d "${c_dest}/${INTERVAL}."?* 2>/dev/null | sort -n | tail -n 1)" - - # try other intervals, if there's none four our interval - if [ -z "${last_dir}" ]; then - _techo "Did not find existing backups for interval ${INTERVAL}." - - # get list - : > "${TMP}" - ( cd "${backup}/intervals/" 2>/dev/null && ls >> "${TMP}" ) - ( cd "${CDEFAULTS}/intervals/" 2>/dev/null && ls >> "${TMP}" ) - - # FIXME in 0.6.1: choose best source, not first one. - while read other_interval; do - last_dir="$(ls -d "${c_dest}/${other_interval}."?* 2>/dev/null | sort -n | tail -n 1)" - if [ "${last_dir}" ]; then - _techo "Using backup from ${other_interval}." - break - fi - done < "${TMP}" - fi - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - abs_last_dir="$(cd "${last_dir}" && pwd -P)" || _exit_err "Could not change to last dir ${last_dir}." - set -- "$@" "--link-dest=${abs_last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${c_dest}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # absulte now, it's existing - abs_destination_dir="$(cd "${destination_dir}" && pwd -P)" - - # - # added marking in 0.6 (and remove it, if successful later) - # - touch "${abs_destination_dir}/${c_marker}" - - # - # the rsync part - # options partly stolen from rsnapshot - # - - _techo "Transferring files..." - rsync "$@" "${source}" "${abs_destination_dir}"; ret=$? - - # - # remove marking here - # - rm -f "${abs_destination_dir}/${c_marker}" || \ - _exit_err "Removing ${abs_destination_dir}/${c_marker} failed." - - _techo "Finished backup (rsync return code: $ret)." - if [ "$ret" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" diff --git a/software/ccollect/download/ccollect-0.6/conf/README b/software/ccollect/download/ccollect-0.6/conf/README deleted file mode 100644 index 8402c76f..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/README +++ /dev/null @@ -1,3 +0,0 @@ -This is my personal test configuration. -It can perhaps be some example for you, although it may be pretty -unsorted and highly chaotic. diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.6/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.6/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/exclude b/software/ccollect/download/ccollect-0.6/conf/defaults/sources/exclude deleted file mode 100644 index ee4c9268..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/exclude +++ /dev/null @@ -1 +0,0 @@ -/test diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/rsync_options b/software/ccollect/download/ccollect-0.6/conf/defaults/sources/rsync_options deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/source_postfix b/software/ccollect/download/ccollect-0.6/conf/defaults/sources/source_postfix deleted file mode 100644 index 0b5cde79..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/source_postfix +++ /dev/null @@ -1 +0,0 @@ -:/ diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/source_prefix b/software/ccollect/download/ccollect-0.6/conf/defaults/sources/source_prefix deleted file mode 100644 index fc37f9d6..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/source_prefix +++ /dev/null @@ -1 +0,0 @@ -root@ diff --git a/software/ccollect/download/ccollect-0.6/conf/defaults/sources/verbose b/software/ccollect/download/ccollect-0.6/conf/defaults/sources/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.6/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/fehler b/software/ccollect/download/ccollect-0.6/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/delete_incomplete b/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/delete_incomplete deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/destination b/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/exclude b/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/intervalls/daily b/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/source b/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/source deleted file mode 100644 index 2206a2c8..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/verbose b/software/ccollect/download/ccollect-0.6/conf/sources/source with spaces/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.6/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.6/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.6/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.6/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/source deleted file mode 100644 index 5e56e040..00000000 --- a/software/ccollect/download/ccollect-0.6/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/software/ccollect/download/ccollect-0.6/doc/CHANGES b/software/ccollect/download/ccollect-0.6/doc/CHANGES deleted file mode 100644 index c7ec0aeb..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/CHANGES +++ /dev/null @@ -1,72 +0,0 @@ -0.5.2 to 0.6: - * Always print return code of rsync - * Add much more timing information - * One option per line in rsync_options now (NOT space seperated) - * Added --sparse as default option - * Added management tools (including manpages): - * add_ccollect_source.sh - * delete_ccollect_source.sh - * list_ccollect_intervals.sh - * Cleaned up exit calls (now always cleanly removes temporary files) - * In theory, added pdf documentation (though, was unable to do it with fop) - * Changed license to GPLv3 (from GPLv2) - -0.5.1 to 0.5.2: - * Display correct error code, if rsync returns non-zero - * Unify messages - * Remove some potential quoting problems - -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.6/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.6/doc/ccollect-DE.text deleted file mode 100644 index 56ae62ce..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/ccollect-DE.text +++ /dev/null @@ -1,187 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.6/doc/ccollect.text b/software/ccollect/download/ccollect-0.6/doc/ccollect.text deleted file mode 100644 index 5a29bd82..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/ccollect.text +++ /dev/null @@ -1,969 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.6, for ccollect 0.6, Initial Version from 2006-01-13 -:Author Initials: NS - - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - - -Introduction ------------- -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Supported and tested operating systems and architectures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`ccollect` was successfully tested on the following platforms: - -- GNU/Linux on amd64/hppa/i386 -- NetBSD on amd64/i386/sparc/sparc64 -- OpenBSD on amd64 - -It *should* run on any Unix that supports `rsync` and has a POSIX-compatible -bourne shell. If your platform is not listed above and you have it successfully -running, please drop me a mail. - -Why you can only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall using NAT and strong firewall rules) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker does see connections from a host to the compromised -machine, he/she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - -Versions 0.5 and 0.6 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `rsync_options` changed: -- Before 0.6 it was whitespace delimeted -- As of 0.6 it is newline seperated (so you can pass whitespaces to `rsync`) - -You can update your configuration using `tools/config-pre-0.6-to-0.6.sub.sh`. - -.The name of the backup directories changed: -- Before 0.6: "date +%Y-%m-%d-%H%M" -- As of 0.6: "date +%Y%m%d-%H%M" (better readable, date is closer together) - -For the second change there is no updated needed, as XXXX- is always before -XXXXX (- comes before digit). - - - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace value for CCV with the current version -export CCV=0.6 - -# -# replace 'wget' with fetch on bsd -# -holen=wget -"$holen" http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create sample intervals -echo 2 > miniconfig/defaults/intervals/testinterval -echo 3 > miniconfig/defaults/intervals/testinterval2 - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source -ln -s ~/DASI miniconfig/sources/testsource/destination -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -echo "do the backup, twice" -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "the third time ccollect begins to remove old backups" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "Now we add another interval, ccollect should clone from existent ones" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval2 testsource - -echo "Let's see how much space we used with two backups and compare it to /bin" -du -s ~/DASI /bin - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of some backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. If you would -like to use the new management scripts (available since 0.6), copy -the following scripts to a directory in $PATH: - -- `tools/add_ccollect_source.sh` -- `tools/list_ccollect_intervals.sh` -- `tools/delete_ccollect_source.sh` - - -Configuring ------------ - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, simply use -`ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is -the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a link to the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (`mkdir -v`, `rm -v` and `rsync -vv`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline seperated list. - - `rsync_options` extra options for `rsync`. newline seperated list. - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - - `delete_incomplete` delete incomplete backups - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a link to the destination directory. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/destination - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 conf/sources/testsource2/destination -> /home/nico/backupdir --------------------------------------------------------------------------------- - -To tell the truth, this is not fully correct. `ccollect` will also backup -your data if `destination` is a directory. But do you really want to have -a backup in /etc? - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - -Detailed description of "delete_incomplete" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `delete_incomplete` in a source specification directory, -`ccollect` will look for incomplete backups (when the whole `ccollect` process -was interrupted) and remove them. Without this file `ccollect` will only warn -the user. - - -Hints ------ - -Using a different ssh port -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mostly easy is to use your ~/.ssh/config file: - --------------------------------------------------------------------------------- -host mx2.schottelius.org - Port 2342 --------------------------------------------------------------------------------- - -If you only use that port for backup and normally want to use another port, -you can add 'HostName' and "HostKeyAlias" (if you also have different -keys on the different ports): - --------------------------------------------------------------------------------- -Host hhydrogenium - Hostname bruehe.schottelius.org - Port 666 - HostKeyAlias hydrogenium - -Host bruehe - Hostname bruehe.schottelius.org - Port 22 - HostKeyAlias bruehe.schottelius.org --------------------------------------------------------------------------------- - - - -Using source names or interval in pre_/post_exec scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The pre-/post_exec scripts can access some internal variables from `ccollect`: - -- INTERVAL: The interval specified on the command line -- no_sources: number of sources -- source_$NUM: the name of the source -- name: the name of the currently being backuped source (not available for - generic pre_exec script) - - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a subdirectory named "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -Do *not* name the first backup something like "daily.initial", but use -the "*0*" (or some number that is lower than the current year) -as extension. `ccollect` uses `sort` to find the latest backup. `ccollect` -itself uses 'interval.YEARMONTHDAY-HOURMINUTE.PID'. This notation will -*always* be before "daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you have a directory named "daily.initial", -`ccollect` will always diff against this backup and transfer and delete -files which where deleted in previous backups. This means you simply -waste resources, but your backup will be complete. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - - -Using source specific interval definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you are backing up multiple hosts via cron each night, it may be -a problem that host "big_server" may only have 4 daily backups, because -otherwise its backup device will be full. But for all other hosts -you want to keep 20 daily backups. In this case you would create -`/etc/ccollect/default/intervals/daily` containing "20" and -`/etc/ccollect/sources/big_server/intervals/daily` containing "4". - -Source specific intervals always overwrite the default values. -If you have to specify it individually for every host, because -of different requirements, you can even omit creating -`/etc/ccollect/default/intervals/daily`. - - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - -If the whole `ccollect` process was interrupted, `ccollect` (since 0.6) can -detect that and remove the incomplete backups, so you can clone from a complete -backup instead. - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -How can I prevent missing the right time to enter my password? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As `ccollect` first deletes the old backups, it may take some time -until `rsync` requests the password for the `ssh` session from you. - -The easiest way not to miss that point is running `ccollect` in `screen`, -which has the ability to monitor the output for activity. So as soon as -your screen beeps, after `ccollect` began to remove the last directory, -you can enter your password (have a look at screen(1), especially "C-a M" -and "C-a _", for more information). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# ln -s /mnt/hdbackup/local-root destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# ln -s /mnt/hdbackup/srwali03 destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- - - -Processes running when doing ccollect -p -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Truncated output from `ps axuwwwf`: - -------------------------------------------------------------------------- - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily -p ddba034 ddba045 ddba046 ddba047 ddba049 ddna010 ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - R+ 11:40 23:40 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddba034 - S+ 11:40 0:00 | | | | | \_ ssh -l root ddba034.netstream.ch rsync --server --sender -vlogDtprR --numeric-ids . / - S+ 11:41 0:11 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddb - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba034\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba045/destination/daily.2006-10-19-1807.6934 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba045\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba046/destination/daily.2006-10-19-1810.7072 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba046\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba047/destination/daily.2006-10-19-1816.7268 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba047\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - D+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba049/destination/daily.2006-10-19-1821.7504 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba049\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddna010/destination/daily.2006-10-19-1805.6849 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddna010\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - R+ 12:08 0:00 | | | | \_ rm -rf /etc/ccollect/sources/ddna011/destination/daily.2006-10-20-1502.7824 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ sed s:^:\[ddna011\] : - -------------------------------------------------------------------------- -As you can see, six processes are deleting old backups, while one backup -(ddba034) is already copying data. diff --git a/software/ccollect/download/ccollect-0.6/doc/logwrapper.text b/software/ccollect/download/ccollect-0.6/doc/logwrapper.text deleted file mode 100644 index ec12db48..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/logwrapper.text +++ /dev/null @@ -1,29 +0,0 @@ -ccollect-logwrapper: Logging backup output -=========================================== -Nico Schottelius -0.1, for ccollect-logwrapper 0.1, Initial Version from 2007-06-08 -:Author Initials: NS - -This wrapper makes it easy to have logs of ccollect output. - - -Introduction ------------- -/etc/ccollect/logwrapper/ (also uses $CCOLLECT_CONF). - - - pipe: will pipe to a program - staticfile: link to a file - datefile: - contains a string that is passed to date that returns - dynamicfile: - is a program, that returns some string that we use as - a filename - syslog: - syslog-facility - syslog-level - only-stderr: - omit stdout output - -The logger will output to which destinations it logs and with which -parameters it was started. diff --git a/software/ccollect/download/ccollect-0.6/doc/man/add_ccollect_source.text b/software/ccollect/download/ccollect-0.6/doc/man/add_ccollect_source.text deleted file mode 100644 index 8421d698..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/man/add_ccollect_source.text +++ /dev/null @@ -1,72 +0,0 @@ -add_ccollect_source(1) -====================== -Nico Schottelius - - -NAME ----- -add_ccollect_source - create new source for ccollect(1) - - -SYNOPSIS --------- - -'add_ccollect_source.sh' - - -DESCRIPTION ------------ -add_ccollect_source.sh creates a new backup source for use with ccollect(1). -It copies the files from to the source directory with the hostname below -'$CCOLLECT_CONF/sources'. - - -FILES ------ -$CCOLLECT_CONF/defaults/sources:: - Main configuration directory. $CCOLLECT_CONF is '/etc/ccollect', if unset. - All the following files reside below this directory. - -exclude:: -summary:: -intervals:: -pre_exec:: -post_exec:: -rsync_options:: -verbose:: -very_verbose:: - Those are the standard configuration files known by ccollect(1). - If the file exist it will be copied to the newly created source. - Directories ('intervals') are copied recursively. - -destination_base:: - A link to the directory where to store the backups. Below this directory - `add_ccollect_source.sh` will create a directory with the hostname you - specified on the command line. - -source_prefix:: -source_postfix:: - `source_prefix` is put before the hostname, `source_postfix` is appended - after it. A common value for `source_prefix` maybe 'root@' and ':/' - for `source_postfix`. - - -SEE ALSO --------- -ccollect(1), delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.6/doc/man/ccollect.text deleted file mode 100644 index abe4ebe6..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/man/ccollect.text +++ /dev/null @@ -1,58 +0,0 @@ -ccollect(1) -=========== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the manual titled -"ccollect - Installing, Configuring and Using" (available as texinfo or html). - - -OPTIONS -------- --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - -SEE ALSO --------- -add_ccollect_source(1), delete_ccollect_source(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006-2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6/doc/man/delete_ccollect_source.text b/software/ccollect/download/ccollect-0.6/doc/man/delete_ccollect_source.text deleted file mode 100644 index 94014189..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/man/delete_ccollect_source.text +++ /dev/null @@ -1,55 +0,0 @@ -delete_ccollect_source(1) -========================= -Nico Schottelius - - -NAME ----- -delete_ccollect_source - delete sources from ccollect(1) - - -SYNOPSIS --------- -'delete_ccollect_source.sh' [-d] [-f] - - -DESCRIPTION ------------ -delete_ccollect_source.sh deletes backup sources from ccollect(1) and optional -also the backups created for that source. - -OPTIONS -------- --d: - Delete also the destination directory. `add_ccollect_source.sh` will change - to the source/'name'/destination directory, get the absolute name and delete - it recursively. --f: - Force deletion. Do not ask. Very handy for people who know what they do. - Very dangerous for everyone. - - -FILES ------ -$CCOLLECT_CONF/sources:: - Directory containing the sources. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), list_ccollect_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6/doc/man/list_ccollect_intervals.text b/software/ccollect/download/ccollect-0.6/doc/man/list_ccollect_intervals.text deleted file mode 100644 index 356e99be..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/man/list_ccollect_intervals.text +++ /dev/null @@ -1,45 +0,0 @@ -list_ccollect_intervals(1) -========================== -Nico Schottelius - - -NAME ----- -list_ccollect_intervals - list available intervals from ccollect(1) - - -SYNOPSIS --------- -'list_ccollect_intervals.sh' - - -DESCRIPTION ------------ -list_ccollect_intervals.sh shows intervals specified in the configuration -for ccollect(1). It displays the name of each interval, followed by a colon -followed by the number backups to keep. - -FILES ------ -$CCOLLECT_CONF/intervals:: - Directory containing the intervals. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -add_ccollect_source(1), ccollect(1), delete_ccollect_source(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.6/doc/release-checklist b/software/ccollect/download/ccollect-0.6/doc/release-checklist deleted file mode 100644 index 7cba30cd..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version and date in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.6/doc/todo/0.5.2 b/software/ccollect/download/ccollect-0.6/doc/todo/0.5.2 deleted file mode 100644 index 0c1c2250..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/todo/0.5.2 +++ /dev/null @@ -1,4 +0,0 @@ -x Fix $? problem -x Check last dir searching -x Check count generation -x Check general functionality (remove testing) diff --git a/software/ccollect/download/ccollect-0.6/doc/todo/0.5.3 b/software/ccollect/download/ccollect-0.6/doc/todo/0.5.3 deleted file mode 100644 index 00195812..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/todo/0.5.3 +++ /dev/null @@ -1,34 +0,0 @@ -Done: -==> screenshot -u0219 zrha166.netstream.ch # ~chdscni9/ccollect.sh weekly zrha166.netstream.ch -2007-08-16-21:49:44: ccollect 0.6: Beginning backup using interval weekly -[zrha166.netstream.ch] 2007-08-16-21:49:44: Beginning to backup -[zrha166.netstream.ch] 2007-08-16-21:49:45: Existing backups: 0 Total keeping backups: 8 -[zrha166.netstream.ch] 2007-08-16-21:49:45: Did not find existing backups for interval weekly. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Using backup from daily. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Beginning to backup, this may take some time... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Creating /etc/ccollect/sources/zrha166.netstream.ch/destination/weekly.20070816-2149.22188 ... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Transferring files... - -- beep-after-delete-hack? - -> tonnerre / #cLinux - -- replace nico-linux-ccollect with nico-ccollect - * ccollect is not Linux specific - -- remove exit-calls - * will leave behind unused temporary file! - * use _exit_err - -X join todos - -- fix possible quoting problems - * rsync_extra (redefine format) - * exclude - * other - * create _rsync, filtering args, creating new $@ - -- check and export variables for use in scripts! - -Contact Julian later: - * integrate updated german documentation diff --git a/software/ccollect/download/ccollect-0.6/doc/todo/0.5.3.tonnerre b/software/ccollect/download/ccollect-0.6/doc/todo/0.5.3.tonnerre deleted file mode 100644 index 4e7b7db5..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/todo/0.5.3.tonnerre +++ /dev/null @@ -1,11 +0,0 @@ -NetBSD/i386,amd64,sparc,sparc64 - -13:13 < Tonnerre> telmich, die kleine wä, 2 Variablen aus $(CCOLLECT) zu - machen -13:13 < Tonnerre> telmich, eine fü Sourcepfad und eine fü -Destinationfpad -13:13 < Tonnerre> pfa -13:13 < Tonnerre> d -13:14 < Tonnerre> telmich, die gröre wä die $() durch ${} zu ersetzen, so -dass der Kram auch mit !GNU-Make geht - diff --git a/software/ccollect/download/ccollect-0.6/doc/todo/0.6 b/software/ccollect/download/ccollect-0.6/doc/todo/0.6 deleted file mode 100644 index ee8e97fd..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/todo/0.6 +++ /dev/null @@ -1,63 +0,0 @@ -not did, did not remember why I wanted to do that: - -- do sed-time check: - -1.2. replace sed? -compare timing: -_echo () { echo "$name $msg" } -and create -_techo () { echo "$timestamp $name $msg" } -perhaps create -_eecho () { _techo "ERROR $msg" } -? - - - -done: -add note for - 09:24 < telmich> Obri: ~/.ssh/config! - -- implement use of different intervals as source for cloning - * use 'woechentlich' if available and no backup exists for 'daily' - * add 'prefer_latest' to prefer different interval, that's newer than - ours - * or add 'prefer_same_interval' instead? -- implement detection of partial backups -3. detect unfinished backups -sven / markierung - - wie seht der Marker aus? - -> .ccollect-YEAR-MM-DD.HHmm.pid (like the directory) - --> assume incomplete, when we did not finish. - --> means it's complete,when rsync was successful ----> partial implemented in 0.5.2 (commented out) -- do not check by name, but by time - * is ls -t posix? - * also check: -p -1 -- ccollect Zeitausgabe verbessern - - Wofuer wie lange gebraucht - * rm - * klonen (gibt es so ja nicht) - Wenn Summary angegeben ist am Ende ausgeben -- do we want rsync -H by default? - * no: takes much more memory -ssh / port change: - change rsync_extra format -- Variables: - source_$n - no_sources - name -- changed naming of sources: - YYYYMMDD-HHMM.PID (better readable) - => source / backup converter! => not needed! -config: - set destination-base - /etc/ccollect/defaults/source_config - -Documentation: -- hint: backuping backup -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- delete_incomplete - diff --git a/software/ccollect/download/ccollect-0.6/doc/todo/0.6.1 b/software/ccollect/download/ccollect-0.6/doc/todo/0.6.1 deleted file mode 100644 index 88db1225..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/todo/0.6.1 +++ /dev/null @@ -1,12 +0,0 @@ -- Improve finding backup from another interval: - o strip of interval name - o run sort -n - o use the last entry -- do not delete_incomplete, when there's only one backup left! -- Add filter support - * filter -- think about 'prefer_same_interval' / 'prefer_latest' -- add --version, -V -- add source/ignore_failed_pre_exec -- add source/ignore_failed_post_exec - diff --git a/software/ccollect/download/ccollect-0.6/doc/todo/extern b/software/ccollect/download/ccollect-0.6/doc/todo/extern deleted file mode 100644 index 9be8f2be..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/todo/extern +++ /dev/null @@ -1,23 +0,0 @@ -These todos are things that would be senseful todo, but are just nice -to have. This means I won't code them, so somebody can code them. --------------------------------------------------------------------------------- - -- Add ccollect-restore.sh - (new project, perhaps coordinated with jchome's ccollect-config) - - Helper (in dialog?) to restore backups - - Perhaps create ccollect-gui.{whatever} instead, which does all the - end user staff? - - Including cronjob, creating configuration, displaying status of - backups, allowing manual remove, allowing manual trigger of ccollect - (with realtime message window?)? - -- write mkccollectconfig (for 0.5!) - -> jchome works on it! - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.6/doc/todo/netstream-1 b/software/ccollect/download/ccollect-0.6/doc/todo/netstream-1 deleted file mode 100644 index a0a6eba0..00000000 --- a/software/ccollect/download/ccollect-0.6/doc/todo/netstream-1 +++ /dev/null @@ -1,53 +0,0 @@ -Preamble: - Netstream (www.netstream.ch) may consider using ccollect for backing up many - unix servers and needs some clean reporting. The following things - need to be done, so ccollect will be useful for netstream: - -Logger: - - Needs to write small mails (sysadmins don't have time to read mails) - - Needs to be able to only write a mail on error - * needs configuration option to also mail on warnings - - Should be able to send one mail per backup source - * or one for the whole backup job - -Messages: (to be used for filtering) - Errors: - Read from remote host .*: Connection timed out - - Warnings: - rsync: mknod .* failed: Invalid argument (22) - file has vanished: ".*" - --------------------------------------------------------------------------------- - -Analyzer: - - grosse Dateien - - grosse Veraenderungen --------------------------------------------------------------------------------- -exclude-lists-doku: -freebsd: - /usr/ports/* - /proc/* - /dev/* - /tmp/* - /var/tmp/* -linux: - /sys/* - /proc/* - /dev/* - /tmp/* - --------------------------------------------------------------------------------- -done: - -rsync_extra global! -- \n delimeted --------------------------------------------------------------------------------- - -S, --sparse - Try to handle sparse files efficiently so they take up less space on the des‐ - tination. Conflicts with --inplace because it’s not possible to overwrite - data in a sparse fashion. - --------------------------------------------------------------------------------- - Always report return code! - diff --git a/software/ccollect/download/ccollect-0.6/external/freebsd-port/Makefile b/software/ccollect/download/ccollect-0.6/external/freebsd-port/Makefile deleted file mode 100644 index c14c77d8..00000000 --- a/software/ccollect/download/ccollect-0.6/external/freebsd-port/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# New ports collection makefile for: oneko -# New ports collection makefile for: ccollect -# Date created: 2006-10-20 -# Whom: Nico Schottelius -# -# $FreeBSD$ -# - -PORTNAME= ccollect -PORTVERSION= 0.5.1 -CATEGORIES= sysutils archivers -MASTER_SITES= http://unix.schottelius.org/ccollect/ - -MAINTAINER= nico-fbsd-ccollect@schottelius.org -COMMENT= (pseudo) incremental (parallel) backup - -MAN1= ccollect.sh.1 -MANCOMPRESSED= no -USE_BZIP2= yes - -RUN_DEPENDS= rsync:${PORTSDIR}/net/rsync - -.include diff --git a/software/ccollect/download/ccollect-0.6/external/freebsd-port/distinfo b/software/ccollect/download/ccollect-0.6/external/freebsd-port/distinfo deleted file mode 100644 index 9e1b6fe5..00000000 --- a/software/ccollect/download/ccollect-0.6/external/freebsd-port/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -MD5 (ccollect-0.5.1.tar.bz2) = 8601a6d6de52ba839768e2804ca57499 -SIZE (ccollect-0.5.1.tar.bz2) = 37397 diff --git a/software/ccollect/download/ccollect-0.6/external/freebsd-port/pkg-descr b/software/ccollect/download/ccollect-0.6/external/freebsd-port/pkg-descr deleted file mode 100644 index c822c6ed..00000000 --- a/software/ccollect/download/ccollect-0.6/external/freebsd-port/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -This is a port of ccollect, a backup utility which creates -fullbackups with the space needed of incremental backups. - -WWW: http://unix.schottelius.org/ccollect/ diff --git a/software/ccollect/download/ccollect-0.6/external/freebsd-port/pkg-list b/software/ccollect/download/ccollect-0.6/external/freebsd-port/pkg-list deleted file mode 100644 index c1d82f97..00000000 --- a/software/ccollect/download/ccollect-0.6/external/freebsd-port/pkg-list +++ /dev/null @@ -1 +0,0 @@ -bin/ccollect.sh diff --git a/software/ccollect/download/ccollect-0.6/release.sh b/software/ccollect/download/ccollect-0.6/release.sh deleted file mode 100644 index 7a758bb3..00000000 --- a/software/ccollect/download/ccollect-0.6/release.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -# create documentation for the end user -( - cd "$NAME" - make dist - make publish-doc -) - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" - -cat "${NAME}/doc/release-checklist" diff --git a/software/ccollect/download/ccollect-0.6/tools/add_ccollect_source.sh b/software/ccollect/download/ccollect-0.6/tools/add_ccollect_source.sh deleted file mode 100644 index 7a238f5e..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/add_ccollect_source.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-16 -# Written for Netstream (www.netstream.ch) -# Creates a source from standard values specified in -# /etc/ccollect/defaults/sources -# Copying: GPLv3 - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -SCONFIG="${CDEFAULTS}/sources" - -# standard options: variable2filename -exclude="exclude" -summary="summary" -intervals="intervals" -pre_exec="pre_exec" -post_exec="post_exec" -rsync_options="rsync_options" -verbose="verbose" -very_verbose="very_verbose" - -# options that we simply copy over -standard_opts="exclude summary intervals pre_exec post_exec rsync_options verbose very_verbose" - -# options not in standard ccollect, used only for source generation -src_prefix="${SCONFIG}/source_prefix" -src_postfix="${SCONFIG}/source_postfix" -destination_base="${SCONFIG}/destination_base" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _exit_err "" -fi - -_echo "Reading defaults from ${SCONFIG} ..." - -while [ $# -gt 0 ]; do - source="$1"; shift - - # Create - _echo "Creating ${source} ..." - - fullname="${CSOURCES}/${source}" - - # create source - if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Skipping." - continue - fi - mkdir -p "${fullname}" || _exit_err Cannot create \"${fullname}\". - - # copy standard files - for file in $standard_opts; do - eval rfile=\"\$$file\" - eval filename=${SCONFIG}/${rfile} - if [ -e "${filename}" ]; then - _echo Copying \"$rfile\" to ${fullname} ... - cp -r "${filename}" "${fullname}/${rfile}" - fi - done - - # create source entry - if [ -f "${src_prefix}" ]; then - source_source="$(cat "${src_prefix}")" || _exit_err "${src_prefix}: Reading failed." - fi - source_source="${source_source}${source}" - if [ -f "${src_postfix}" ]; then - source_source="${source_source}$(cat "${src_postfix}")" || _exit_err "${src_postfix}: Reading failed." - fi - _echo "Adding \"${source_source}\" as source for ${source}" - echo "${source_source}" > "${fullname}/source" - - # create destination directory - dest="${destination_base}/${source}" - _echo "Creating destination ${dest} ..." - mkdir -p "${dest}" || _exit_err "${dest}: Cannot create." - - # link destination directory - dest_abs=$(cd "${dest}" && pwd -P) || _exit_err "${dest}: Changing to newly create dirctory failed." - ln -s "${dest_abs}" "${fullname}/destination" || \ - _exit_err "${fullname}/destination: Failed to link \"${dest_abs}\"" - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.6/tools/ccollect-logwrapper.sh b/software/ccollect/download/ccollect-0.6/tools/ccollect-logwrapper.sh deleted file mode 100644 index a3cb6d84..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/ccollect-logwrapper.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# written for Netstream (www.netstream.ch) -# Date: Fr 8. Jun 10:30:24 CEST 2007 -# Call the log-wrapper instead of ccollect.sh and it will log -# to your selected destinations - -# not implemented -exit 0 - -Analyses output produced by ccollect. - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -LOGCONF=$CCOLLECT_CONF/logwrapper -VERSION=0.1 -RELEASE="2007-XX-XX" - -HALF_VERSION="ccollect $VERSION" -FULL_VERSION="ccollect $VERSION ($RELEASE)" - -# syslog: logger -t ccollect-logwrapper - diff --git a/software/ccollect/download/ccollect-0.6/tools/ccollect-stats.sh b/software/ccollect/download/ccollect-0.6/tools/ccollect-stats.sh deleted file mode 100644 index 5ce171b1..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/ccollect-stats.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - - -if [ ! -e /tmp/ccollect-stats.lock ] -then - touch /tmp/ccollect-stats.lock - find /etc/ccollect/sources/ -type l | while read line - do - backupname=$(basename $(readlink $line)) - echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log - du -sh $line/* | tee -a /var/log/backup.log - done - rm /tmp/ccollect-stats.lock -fi - - - diff --git a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 9a7efd83..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index 5b17a726..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.6-to-0.6.sh b/software/ccollect/download/ccollect-0.6/tools/config-pre-0.6-to-0.6.sh deleted file mode 100644 index 5efce689..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.6-to-0.6.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Nico Schottelius, 20070816-2225 -# Transfer configuration to 0.6 layout -# Copying: GPLv3 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -type f -name rsync_options -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.6-to-0.6.sub.sh b/software/ccollect/download/ccollect-0.6/tools/config-pre-0.6-to-0.6.sub.sh deleted file mode 100644 index b4e0bd33..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/config-pre-0.6-to-0.6.sub.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# Nico Schottelius, 20070816-2227 -# Transfer configuration to 0.6 layout (subscript) -# Copying: GPLv3 -# - -if [ $# -ne 1 ]; then - echo "$0: rsync_options file" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) - -echo "Working on $1 ..." - -for option in $(cat "$1"); do - echo "${option}" >> "${tmp}" -done -mv ${tmp} "$1" diff --git a/software/ccollect/download/ccollect-0.6/tools/create_source.sh b/software/ccollect/download/ccollect-0.6/tools/create_source.sh deleted file mode 100644 index 7a34c6b0..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/create_source.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 3 ]; then - _echo " " - _echo "Example: \"my-notebook\" \"192.168.42.42\" \"/home/server/backup/my-notebook\"" - exit 1 -fi - -name="$1" -source="$2" -destination="$3" -fullname="${CSOURCES}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${source} ..." -ping -c1 "${source}" || _exit_err "Cannot reach ${source}. Aborting." - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${source}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6/tools/create_source2.sh b/software/ccollect/download/ccollect-0.6/tools/create_source2.sh deleted file mode 100644 index 842afb65..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/create_source2.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 2 ]; then - _echo " " - _echo "Example: \"192.168.42.42\" \"/home/server/backup/\"" - _echo " This will create ${CSOURCES}/192.168.42.42 and /home/server/backup/192.168.42.42." - exit 1 -fi - -# sourcename / servername -name="$1" - -# basedir -basedir="$2" - -fullname="${CSOURCES}/${name}" -destination="${basedir}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${name} ..." -ping -c1 "${name}" || _exit_err "Cannot reach ${name}. Aborting." - -if [ ! -d "${basedir}" ]; then - echo "${basedir} is not a directory. Aborting." - exit 7 -fi - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${name}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.6/tools/delete_ccollect_source.sh b/software/ccollect/download/ccollect-0.6/tools/delete_ccollect_source.sh deleted file mode 100644 index 8a811d32..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/delete_ccollect_source.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-16 -# Written for Netstream (www.netstream.ch) -# Delete sources and their backups (optionally). -# Copying: GPLv3 (See file COPYING in top directory) - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _echo "${self} [-f] [-d] " - _echo " -f: Do not ask, simply delete. Dangerous and good for sysadmins." - _echo " -d: Also delete the destination (removes all backups)" - _exit_err "Exiting." -fi - -params_possible=yes -force="" -backups="" - -while [ $# -gt 0 ]; do - - if [ "$params_possible" ]; then - case "$1" in - "-f"|"--force") - force=yes - shift; continue - ;; - "-d"|"--destination") - backups=yes - shift; continue - ;; - --) - params_possible="" - shift; continue - ;; - -*|--*) - _exit_err "Unknown option: $1" - ;; - esac - - fi - - # Reached here? So there are no more parameters. - params_possible="" - - source="$1"; shift - - # Create - _echo "Deleting ${source} ..." - fullname="${CSOURCES}/${source}" - - # ask the user per source, if she's not forcing us - if [ -z "$force" ]; then - sure="" - echo -n "Do you really want to delete ${source} (y/n)? " - read sure - - if [ "$sure" != "y" ]; then - _echo "Skipping ${source}." - continue - fi - fi - - if [ "$backups" ]; then - ddir=$(cd "${fullname}/destination" && pwd -P) || _exit_err "Cannot change to ${fullname}/destination" - _echo "Deleting ${ddir} ..." - rm -r "${ddir}" - fi - - _echo "Deleting ${fullname} ..." - rm -r "${fullname}" - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.6/tools/gnu-du-backup-size-compare.sh b/software/ccollect/download/ccollect-0.6/tools/gnu-du-backup-size-compare.sh deleted file mode 100644 index ea8b833e..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/gnu-du-backup-size-compare.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 2007-08-16 -# Last Modified: - -# - -exit 1 -# not yet finished. - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_SOURCES="$CCOLLECT_CONF/defaults/sources" - -me="$(basename "$0")" - -if [ $# -lt 1 ]; then - echo "${me}: sources names - exit 1 -fi - -if [ ! -d "$CCOLLECT_SOURCES" ]; then - echo "No sources defined in $CCOLLECT_SOURCES" - exit 1 -fi - -cd "$CCOLLECT_INTERVALS" - -for interval in *; do - eval int_$interval=$(cat $interval); - eval echo $interval: \$int_$interval; -done diff --git a/software/ccollect/download/ccollect-0.6/tools/list_ccollect_intervals.sh b/software/ccollect/download/ccollect-0.6/tools/list_ccollect_intervals.sh deleted file mode 100644 index 47c1481d..00000000 --- a/software/ccollect/download/ccollect-0.6/tools/list_ccollect_intervals.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 24-Jun-2006 -# Last Modified: - -# Copying: GPLv3 (See file COPYING in top directory) -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -me="$(basename $0)" - -_echo() -{ - echo "$me> $@" -} - -if [ ! -d "${CCOLLECT_INTERVALS}" ]; then - _echo "No intervals defined in ${CCOLLECT_INTERVALS}" - exit 1 -fi - -set -e -cd "${CCOLLECT_INTERVALS}" - -for interval in *; do - eval int_${interval}=$(cat "${interval}"); - eval echo ${interval}: \$int_${interval}; -done diff --git a/software/ccollect/download/ccollect-0.7.0/.gitignore b/software/ccollect/download/ccollect-0.7.0/.gitignore deleted file mode 100644 index 4e9c74d5..00000000 --- a/software/ccollect/download/ccollect-0.7.0/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.htm -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.htm -doc/man/*.texi -doc/man/*.man -test/* -.*.swp -doc/man/*.[0-9] -doc/*.xml -doc/*/*.xml -*.texi -*.fo diff --git a/software/ccollect/download/ccollect-0.7.0/COPYING b/software/ccollect/download/ccollect-0.7.0/COPYING deleted file mode 100644 index fc8a5de7..00000000 --- a/software/ccollect/download/ccollect-0.7.0/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/software/ccollect/download/ccollect-0.7.0/CREDITS b/software/ccollect/download/ccollect-0.7.0/CREDITS deleted file mode 100644 index 1616f6f3..00000000 --- a/software/ccollect/download/ccollect-0.7.0/CREDITS +++ /dev/null @@ -1,10 +0,0 @@ -Thanks go to the following people: - -* the whole #cLinux channel - - for testing and debugging (those I mean should know ;-) -* Alexey Maximov - - for finding return-value and shell limitation bugs -* Markus Meier - - for finding a really simple solution for choosing the right backup to - clone from: Make it independent of the interval, simply choose the last - one created. diff --git a/software/ccollect/download/ccollect-0.7.0/Makefile b/software/ccollect/download/ccollect-0.7.0/Makefile deleted file mode 100644 index f519c6a9..00000000 --- a/software/ccollect/download/ccollect-0.7.0/Makefile +++ /dev/null @@ -1,174 +0,0 @@ -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written on Fri Jan 13 12:13:08 CET 2006 -# -# FIXME: add prefix-support? -# - -INSTALL=install -CCOLLECT_SOURCE=ccollect.sh -CCOLLECT_DEST=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man -XSLTPROC=xsltproc -XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl -A2X=a2x - -prefix=/usr/packages/ccollect-git -bindir=${prefix}/bin -destination=${bindir}/${CCOLLECT_DEST} - -mandest=${prefix}/man/man1 -manlink=/usr/local/man/man1 - -path_dir=/usr/local/bin -path_destination=${path_dir}/${CCOLLECT_DEST} - -# where to publish -host=home.schottelius.org -dir=www/org/schottelius/unix/www/ccollect/ -docdir=${dir}/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text \ - doc/man/ccollect_add_source.text \ - doc/man/ccollect_analyse_logs.text \ - doc/man/ccollect_delete_source.text \ - doc/man/ccollect_logwrapper.text \ - doc/man/ccollect_list_intervals.text - -DOCS = ${MANDOCS} doc/ccollect.text doc/ccollect-DE.text - -# -# Doku -# -HTMLDOCS = ${DOCS:.text=.html} -DBHTMLDOCS = ${DOCS:.text=.htm} - -# texi is broken currently, don't know why xslt things complain yet -TEXIDOCS = ${DOCS:.text=.texi} -TEXIDOCS = - -# fop fails here, so disable it for now -PDFDOCS = ${DOCS:.text=.pdf} -PDFDOCS = - -MANPDOCS = ${MANDOCS:.text=.1} - -DOCBDOCS = ${DOCS:.text=.docbook} - -DOC_ALL = ${HTMLDOCS} ${DBHTMLDOCS} ${TEXIDOCS} ${MANPDOCS} ${PDFDOCS} - -html: ${HTMLDOCS} -htm: ${DBHTMLDOCS} -info: ${TEXIDOCS} -man: ${MANPDOCS} -pdf: ${PDFDOCS} -documentation: ${DOC_ALL} - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage{s}" - @echo "install: install ccollect to ${prefix}" - -install: install-link install-manlink - -install-link: install-script - ${LN} ${destination} ${path_destination} - -install-script: - ${INSTALL} -D -m 0755 ${CCOLLECT_SOURCE} ${destination} - -install-man: man - ${INSTALL} -d -m 0755 ${mandest} - ${INSTALL} -D -m 0644 doc/man/*.1 ${mandest} - -install-manlink: install-man - ${INSTALL} -d -m 0755 ${manlink} - for man in ${mandest}/*; do ${LN} $$man ${manlink}; done - - -# docbook gets .htm, asciidoc directly .html -%.htm: %.docbook - ${XSLTPROC} -o $@ ${XSL} $< - -%.html: %.text %.docbook - ${ASCIIDOC} -n -o $@ $< - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -#%.mandocbook: %.text -# ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -#%.man: %.mandocbook -# ${DOCBOOKTOMAN} --to-stdout $< > $@ - -#%.man: %.text -%.1: %.text - ${A2X} -f manpage $< - -%.pdf: %.text - ${A2X} -f pdf $< - - -# -# Developer targets -# -update: - @git push - -publish-doc: documentation - @echo "Transferring files to ${host}" - @chmod a+r ${DOCS} ${DOC_ALL} - @tar c ${DOCS} ${DOC_ALL} | ssh ${host} "cd ${dir}; tar xv" - -# -# Distribution -# -clean: - rm -f ${DOC_ALL} - rm -f doc/man/*.[0-9] doc/man/*.xml doc/*.fo doc/man/*.fo - -distclean: clean - rm -f ${DOCBDOCS} - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation - -test: ccollect.sh documentation - CCOLLECT_CONF=./conf ./ccollect.sh daily "source with spaces" diff --git a/software/ccollect/download/ccollect-0.7.0/README b/software/ccollect/download/ccollect-0.7.0/README deleted file mode 100644 index cab53f19..00000000 --- a/software/ccollect/download/ccollect-0.7.0/README +++ /dev/null @@ -1,63 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups (local or remote) data to local or remote destinations. - -You can retrieve the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - does unecessary moving of backup directories - - I didn't like the configuration at all, so I used the cconfig style [2]. - -Please use tools/report_success.sh to report success, if you are successfully -using ccollect. - -A small try to visualize the differences in a table: - -+---------------+-------------------------------------------------------------+ -| What? | rsnapshot | ccollect | -+---------------+-------------------------------------------------------------+ -| Configuration | tab separated, needs | plain cconfig-style | -| | parsing | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| post-/pre- | no | yes | -| execution | | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| exclude lists | no | yes | -+---------------+-------------------------------------------------------------+ -| Parallel | | | -| execution | | | -| of multiple | no | yes | -| backups | | | -+---------------+-------------------------------------------------------------+ -| Programming | perl | sh | -| language | | (posix compatible) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 6772 (5353 w/o comments, | 546 (375 w/o comments, | -| (2006-10-25) | 4794 w/o empty lines) | 288 w/o empty lines) | -+---------------+-------------------------------------------------------------+ -| Age | Available since 2002/2003 | Written at 2005-11-14 | -+---------------+-------------------------------------------------------------+ - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.7.0/ccollect.sh b/software/ccollect/download/ccollect-0.7.0/ccollect.sh deleted file mode 100644 index 1d719998..00000000 --- a/software/ccollect/download/ccollect-0.7.0/ccollect.sh +++ /dev/null @@ -1,607 +0,0 @@ -#!/bin/sh -# -# 2005-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/$(basename $0).XXXXXX") -VERSION=0.7.0 -RELEASE="2008-03-17" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - sed "s:^:\[${name}\] :" -} - -pcmd() -{ - if [ "$remote_host" ]; then - ssh "$remote_host" "$@" - else - "$@" - fi -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "$(basename $0): [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - c_incomplete="${backup}/delete_incomplete" - c_remote_host="${backup}/remote_host" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a file. Skipping." - else - ddir=$(cat "${c_dest}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Destination ${c_dest} is not readable. Skipping." - fi - fi - - # - # do we backup to a remote host? then set pre-cmd - # - if [ -f "${c_remote_host}" ]; then - # adjust ls and co - remote_host=$(cat "${c_remote_host}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Remote host file ${c_remote_host} exists, but is not readable. Skipping." - fi - destination="${remote_host}:${ddir}" - else - remote_host="" - destination="${ddir}" - fi - export remote_host - - # - # check for existence / use real name - # - pcmd cd "$ddir" || _exit_err "Cannot change to ${ddir}. Skipping." - - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null - - i=0 - while read incomplete; do - eval incomplete_$i=\"$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval realincomplete=\"\$incomplete_$j\" - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ - _exit_err "Removing ${realincomplete} failed." - fi - j=$((j+1)) - done - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g')" || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - pcmd ls -p1 "$ddir" | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - i=0 - while read to_remove; do - eval remove_$i=\"${to_remove}\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval to_remove=\"\$remove_$j\" - _techo "Removing ${to_remove} ..." - pcmd rm ${VVERBOSE} -rf "${ddir}/${to_remove}" || \ - _exit_err "Removing ${to_remove} failed." - j=$((j+1)) - done - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Use ls -1c instead of -1t, because last modification maybe the same on all - # and metadate update (-c) is updated by rsync locally. - # - last_dir="$(pcmd ls -tcp1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - set -- "$@" "--link-dest=${ddir}/${last_dir}" - _techo "Hard linking from ${last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${ddir}/${INTERVAL}.${destination_date}.$$" - destination_full="${destination}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - pcmd mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - pcmd touch "${destination_dir}.${c_marker}" - - # - # the rsync part - # - - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? - - # - # remove marking here - # - pcmd rm "${destination_dir}.${c_marker}" || \ - _exit_err "Removing ${destination_dir}/${c_marker} failed." - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" diff --git a/software/ccollect/download/ccollect-0.7.0/conf/README b/software/ccollect/download/ccollect-0.7.0/conf/README deleted file mode 100644 index 8402c76f..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/README +++ /dev/null @@ -1,3 +0,0 @@ -This is my personal test configuration. -It can perhaps be some example for you, although it may be pretty -unsorted and highly chaotic. diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.7.0/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.7.0/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/exclude b/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/exclude deleted file mode 100644 index ee4c9268..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/exclude +++ /dev/null @@ -1 +0,0 @@ -/test diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/rsync_options b/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/rsync_options deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/source_postfix b/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/source_postfix deleted file mode 100644 index 0b5cde79..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/source_postfix +++ /dev/null @@ -1 +0,0 @@ -:/ diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/source_prefix b/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/source_prefix deleted file mode 100644 index fc37f9d6..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/source_prefix +++ /dev/null @@ -1 +0,0 @@ -root@ diff --git a/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/verbose b/software/ccollect/download/ccollect-0.7.0/conf/defaults/sources/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.7.0/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/fehler b/software/ccollect/download/ccollect-0.7.0/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/destination b/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/exclude b/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/source deleted file mode 100644 index 96861383..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/local1/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/bin diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/destination b/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/exclude b/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/remote_host b/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/remote_host deleted file mode 100644 index 3c2693c9..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/remote_host +++ /dev/null @@ -1 +0,0 @@ -home.schottelius.org diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/source deleted file mode 100644 index 96861383..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/remote1/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/bin diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/delete_incomplete b/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/delete_incomplete deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/destination b/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/exclude b/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/intervalls/daily b/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/source deleted file mode 100644 index 2206a2c8..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/verbose b/software/ccollect/download/ccollect-0.7.0/conf/sources/source with spaces/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.7.0/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.7.0/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/source deleted file mode 100644 index 5e56e040..00000000 --- a/software/ccollect/download/ccollect-0.7.0/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/software/ccollect/download/ccollect-0.7.0/doc/CHANGES b/software/ccollect/download/ccollect-0.7.0/doc/CHANGES deleted file mode 100644 index 2c3f5228..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/CHANGES +++ /dev/null @@ -1,100 +0,0 @@ -0.6.2 to 0.7.0: - * Added tools/report_success.sh (try it out!) - * Added ccollect_analyse_logs.sh (see ccollect_analyse_logs(1)) - * Add capability to backup to a host - - Also updated documentation - * Changed "destination" format - - Use tools/config-pre-0.7-to-0.7.sh to convert pre 0.7.x configurations - * Renamed all tools to begin with "ccollect_" - * Updated ccollect_add_source.sh and added manpage - * Updated todos - * Changed license to GPLv3 (from GPLv2) - - -0.6.1 to 0.6.2: - * Added analyse-ccollect-logs.sh - * Fixed bug: Removing of backups was broken since update to 0.6 - (forgot to prepend path...) - * Fixed bug: The marker was always deleted, because rsync deleted it. - Create it outside of the backup destination now. - -0.6 to 0.6.1: - * Added check for destination_base in add_ccollect_source.sh - * Added support for -V and --version - * Added ccollect-logwrapper.sh (and a manpage ;-) - * Changed behaviour: ccollect now clones from the latest existing backup, - independent of the interval. This way different intervals do not - diverge. ccollect uses ls -c to determine latest backup. - -0.5.2 to 0.6: - * Always print return code of rsync - * Add much more timing information - * One option per line in rsync_options now (NOT space seperated) - * Added --sparse as default option - * Added management tools (including manpages): - * add_ccollect_source.sh - * delete_ccollect_source.sh - * list_ccollect_intervals.sh - * Cleaned up exit calls (now always cleanly removes temporary files) - * In theory, added pdf documentation (though, was unable to do it with fop) - * Changed license to GPLv3 (from GPLv2) - -0.5.1 to 0.5.2: - * Display correct error code, if rsync returns non-zero - * Unify messages - * Remove some potential quoting problems - -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.7.0/doc/braindumps/LOCAL_vs._REMOTE b/software/ccollect/download/ccollect-0.7.0/doc/braindumps/LOCAL_vs._REMOTE deleted file mode 100644 index f2a40b70..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/braindumps/LOCAL_vs._REMOTE +++ /dev/null @@ -1,35 +0,0 @@ - to Local to Remote - backup destination is exiting - pre/postexec runs locally - --link-dest? - /delete_incomplete - can chech ddir - - can check destination dir - -> dooooooo it before! - - - remote_host! - => rddir_ls: - incomplete: ls -1 "${INTERVAL}"*".${c_marker}" - - host support? - ssh-host-support? - - => ssh_host => save to host - execute commands there! - - rm! - - --link-dest? - - --link-dest=DIR - => remote dirs, rsync remote - => works!!!! - - local_destination - remote_destination - => remote_* - - both - configuration is local (what to where) - diff --git a/software/ccollect/download/ccollect-0.7.0/doc/braindumps/README b/software/ccollect/download/ccollect-0.7.0/doc/braindumps/README deleted file mode 100644 index 973addcb..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/braindumps/README +++ /dev/null @@ -1 +0,0 @@ -Do not read the files in this directory diff --git a/software/ccollect/download/ccollect-0.7.0/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.7.0/doc/ccollect-DE.text deleted file mode 100644 index 2fa62373..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/ccollect-DE.text +++ /dev/null @@ -1,192 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -*DIESE ANLEITUNG IST NICHT AKTUELL UND MUSS -AKTUALISIERT WERDEN (siehe Englische Version)* -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -*DIESE ANLEITUNG IST NICHT AKTUELL UND MUSS -AKTUALISIERT WERDEN (siehe Englische Version)* - -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.7.0/doc/ccollect.text b/software/ccollect/download/ccollect-0.7.0/doc/ccollect.text deleted file mode 100644 index b44c616a..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/ccollect.text +++ /dev/null @@ -1,1046 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.7, for ccollect 0.7.0, Initial Version from 2006-01-13 -:Author Initials: NS - - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - - -Introduction ------------- -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Supported and tested operating systems and architectures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`ccollect` was successfully tested on the following platforms: - -- GNU/Linux on amd64/hppa/i386/ppc -- NetBSD on amd64/i386/sparc/sparc64 -- OpenBSD on amd64 - -It *should* run on any Unix that supports `rsync` and has a POSIX-compatible -bourne shell. If your platform is not listed above and you have it successfully -running, please drop me a mail. - - -Why you COULD only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -But as more and more people requested this feature, it was implemented, -so you have the choice whether you want to use it or not. - - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall, not accessable from outside) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker sees connections from a host to the compromised -machine, she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - - -Versions 0.6 and 0.7 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `destination` changed: -- Before 0.7 it was a (link to a) directory -- As of 0.7 it is a textfile containing the destination - -You can update your configuration using `tools/config-pre-0.7-to-0.7.sh`. - -.Added 'remote_host' -- As of 0.7 it is possible to backup *to* hosts (see section remote_host below). - - -Versions 0.5 and 0.6 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `rsync_options` changed: -- Before 0.6 it was whitespace delimeted -- As of 0.6 it is newline seperated (so you can pass whitespaces to `rsync`) - -You can update your configuration using `tools/config-pre-0.6-to-0.6.sh`. - -.The name of the backup directories changed: -- Before 0.6: "date +%Y-%m-%d-%H%M" -- As of 0.6: "date +%Y%m%d-%H%M" (better readable, date is closer together) - -For the second change there is no updated needed, as XXXX- is always before -XXXXX (- comes before digit). - - - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace value for CCV with the current version -export CCV=0.7.0 - -# -# replace 'wget' with 'fetch' on bsd -# -holen=wget -"$holen" http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create sample intervals -echo 2 > miniconfig/defaults/intervals/testinterval -echo 3 > miniconfig/defaults/intervals/testinterval2 - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource - -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source - -# configure ccollect to use ~/DASI as destination -echo ~/DASI > miniconfig/sources/testsource/destination - -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -echo "do the backup, twice" -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "the third time ccollect begins to remove old backups" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "Now we add another interval, ccollect should clone from existent ones" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval2 testsource - -echo "Let's see how much space we used with two backups and compare it to /bin" -du -s ~/DASI /bin - -# report success -echo "Please report success using ./tools/report_success.sh" - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of some backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. If you would -like to use the new management scripts (available since 0.6), copy -the following scripts to a directory in $PATH: - -- `tools/ccollect_add_source.sh` -- `tools/ccollect_analyse_logs.sh.sh` -- `tools/ccollect_delete_source.sh` -- `tools/ccollect_list_intervals.sh` -- `tools/ccollect_logwrapper.sh` - -After having installed and used ccollect, report success using -'./tools/report_success.sh'. - - -Configuring ------------ -For configuration aid have a look at the above mentioned tools, which can assist -you quite well. When you are successfully using `ccollect`, report success using -`tools/report_success.sh`. - - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) -and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, -simply use `ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is -the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a text file containing the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (`mkdir -v`, `rm -v` and `rsync -vv`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline seperated list. - - `rsync_options` extra options for `rsync`. newline seperated list. - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - - `delete_incomplete` delete incomplete backups - - `remote_host` host to backup to - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a text file containing the destination directory. -`destination` *USED* to be a link to the destination directory in -earlier versions, so do not be confused if you see such examples. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/destination - /home/nico/backupdir --------------------------------------------------------------------------------- - - -Detailed description of "remote_host" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`remote_host` must be a text file containing the destination host. -If this file is existing, you are backing up your data *TO* this host -and *not* to you local host. - -Example: --------------------------------------------------------------------------------- - [10:17] denkbrett:ccollect-0.7.0% cat conf/sources/remote1/remote_host - home.schottelius.org --------------------------------------------------------------------------------- - -It may contain all the ssh-specific values like 'myuser@yourhost.ch'. - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Detailed description of "delete_incomplete" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `delete_incomplete` in a source specification directory, -`ccollect` will look for incomplete backups (when the whole `ccollect` process -was interrupted) and remove them. Without this file `ccollect` will only warn -the user. - - -Hints ------ - -Smart logging -~~~~~~~~~~~~~ -Since ccollect-0.6.1 you can use the ccollect-logwrapper.sh(1) for logging. -You call it the same way you call ccollect.sh and it will create a -logfile containing the output of ccollect.sh. For more information look -at the manpage 'ccollect-logwrapper'. The following is an example running -ccollect-logwrapper.sh: - --------------------------------------------------------------------------------- -u0219 ~ # ~chdscni9/ccollect-logwrapper.sh daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Starting with arguments: daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Finished. --------------------------------------------------------------------------------- - - -Using a different ssh port -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mostly easy is to use your ~/.ssh/config file: - --------------------------------------------------------------------------------- -host mx2.schottelius.org - Port 2342 --------------------------------------------------------------------------------- - -If you only use that port for backup and normally want to use another port, -you can add 'HostName' and "HostKeyAlias" (if you also have different -keys on the different ports): - --------------------------------------------------------------------------------- -Host hhydrogenium - Hostname bruehe.schottelius.org - Port 666 - HostKeyAlias hydrogenium - -Host bruehe - Hostname bruehe.schottelius.org - Port 22 - HostKeyAlias bruehe.schottelius.org --------------------------------------------------------------------------------- - - - -Using source names or interval in pre_/post_exec scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The pre-/post_exec scripts can access some internal variables from `ccollect`: - -- INTERVAL: The interval specified on the command line -- no_sources: number of sources -- source_$NUM: the name of the source -- name: the name of the currently being backuped source (not available for - generic pre_exec script) - - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a directory below the destination directory -and name it "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -It does not matter anymore how you name your directory, as `ccollect` uses -the -c option from `ls` to find out which directory to clone from. -=============================================================================== - - -[NOTE] -=============================================================================== -Older versions (pre 0.6, iirc) had a problem, if you named the first backup -something like "daily.initial". It was needed to use the "*0*" (or some -number that is lower than the current year) as extension. `ccollect` -used `sort` to find the latest backup. `ccollect` itself uses -'interval.YEARMONTHDAY-HOURMINUTE.PID'. This notation was *always* before -"daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you had a directory named "daily.initial", -`ccollect` always diffed against this backup and transfered and deleted -files which where deleted in previous backups. This means you simply -wasted resources, but your backup had beer complete anyway. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - - -Using source specific interval definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you are backing up multiple hosts via cron each night, it may be -a problem that host "big_server" may only have 4 daily backups, because -otherwise its backup device will be full. But for all other hosts -you want to keep 20 daily backups. In this case you would create -`/etc/ccollect/default/intervals/daily` containing "20" and -`/etc/ccollect/sources/big_server/intervals/daily` containing "4". - -Source specific intervals always overwrite the default values. -If you have to specify it individually for every host, because -of different requirements, you can even omit creating -`/etc/ccollect/default/intervals/daily`. - - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - -If the whole `ccollect` process was interrupted, `ccollect` (since 0.6) can -detect that and remove the incomplete backups, so you can clone from a complete -backup instead - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -How can I prevent missing the right time to enter my password? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As `ccollect` first deletes the old backups, it may take some time -until `rsync` requests the password for the `ssh` session from you. - -The easiest way not to miss that point is running `ccollect` in `screen`, -which has the ability to monitor the output for activity. So as soon as -your screen beeps, after `ccollect` began to remove the last directory, -you can enter your password (have a look at screen(1), especially "C-a M" -and "C-a _", for more information). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# echo /mnt/hdbackup/local-root > destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# echo /mnt/hdbackup/srwali03 > destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- - - -Processes running when doing ccollect -p -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Truncated output from `ps axuwwwf`: - -------------------------------------------------------------------------- - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily -p ddba034 ddba045 ddba046 ddba047 ddba049 ddna010 ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - R+ 11:40 23:40 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddba034 - S+ 11:40 0:00 | | | | | \_ ssh -l root ddba034.netstream.ch rsync --server --sender -vlogDtprR --numeric-ids . / - S+ 11:41 0:11 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddb - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba034\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba045/destination/daily.2006-10-19-1807.6934 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba045\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba046/destination/daily.2006-10-19-1810.7072 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba046\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba047/destination/daily.2006-10-19-1816.7268 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba047\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - D+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba049/destination/daily.2006-10-19-1821.7504 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba049\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddna010/destination/daily.2006-10-19-1805.6849 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddna010\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - R+ 12:08 0:00 | | | | \_ rm -rf /etc/ccollect/sources/ddna011/destination/daily.2006-10-20-1502.7824 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ sed s:^:\[ddna011\] : - -------------------------------------------------------------------------- -As you can see, six processes are deleting old backups, while one backup -(ddba034) is already copying data. diff --git a/software/ccollect/download/ccollect-0.7.0/doc/gpl3-header b/software/ccollect/download/ccollect-0.7.0/doc/gpl3-header deleted file mode 100644 index 5a1663dc..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/gpl3-header +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# diff --git a/software/ccollect/download/ccollect-0.7.0/doc/logwrapper.text b/software/ccollect/download/ccollect-0.7.0/doc/logwrapper.text deleted file mode 100644 index ec12db48..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/logwrapper.text +++ /dev/null @@ -1,29 +0,0 @@ -ccollect-logwrapper: Logging backup output -=========================================== -Nico Schottelius -0.1, for ccollect-logwrapper 0.1, Initial Version from 2007-06-08 -:Author Initials: NS - -This wrapper makes it easy to have logs of ccollect output. - - -Introduction ------------- -/etc/ccollect/logwrapper/ (also uses $CCOLLECT_CONF). - - - pipe: will pipe to a program - staticfile: link to a file - datefile: - contains a string that is passed to date that returns - dynamicfile: - is a program, that returns some string that we use as - a filename - syslog: - syslog-facility - syslog-level - only-stderr: - omit stdout output - -The logger will output to which destinations it logs and with which -parameters it was started. diff --git a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect.text deleted file mode 100644 index d824717c..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect.text +++ /dev/null @@ -1,61 +0,0 @@ -ccollect(1) -=========== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the manual titled -"ccollect - Installing, Configuring and Using" (available as text (asciidoc), -texinfo or html). - - -OPTIONS -------- --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - - -SEE ALSO --------- -ccollect_add_source(1), ccollect_analyse_logs(1), ccollect_logwrapper(1) -ccollect_delete_source(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_add_source.text b/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_add_source.text deleted file mode 100644 index 25e58a37..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_add_source.text +++ /dev/null @@ -1,75 +0,0 @@ -ccollect_add_source(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect_add_source - create new source for ccollect(1) - - -SYNOPSIS --------- - -'ccollect_add_source.sh' - - -DESCRIPTION ------------ -ccollect_add_source.sh creates a new backup source for use with ccollect(1). -It copies the files from to the source directory with the hostname below -'$CCOLLECT_CONF/sources'. It is designed to run on a backup server to create -new directories for new hosts. - - -FILES ------ -$CCOLLECT_CONF/defaults/sources:: - Main configuration directory. $CCOLLECT_CONF is '/etc/ccollect', if unset. - All the following files reside below this directory. - -exclude:: -summary:: -intervals:: -pre_exec:: -post_exec:: -rsync_options:: -verbose:: -very_verbose:: - Those are the standard configuration files known by ccollect(1). - If the file exist it will be copied to the newly created source. - Directories ('intervals') are copied recursively. - -destination_base:: - A link to the directory where to store the backups. Below this directory - `ccollect_add_source.sh` will create a directory with the hostname you - specified on the command line. A common valua for `destination_base` is - '/home/server/backup'. - -source_prefix:: -source_postfix:: - `source_prefix` is put before the hostname, `source_postfix` is appended - after it. A common value for `source_prefix` maybe 'root@' and ':/' - for `source_postfix`. - - -SEE ALSO --------- -ccollect(1), ccollect_analyse_logs.sh, ccollect_delete_source(1), -ccollect_list_intervals(1), ccollect_logwrapper(1), - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_analyse_logs.text b/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_analyse_logs.text deleted file mode 100644 index 26380142..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_analyse_logs.text +++ /dev/null @@ -1,56 +0,0 @@ -ccollect_analyse_logs(1) -======================== -Nico Schottelius - - -NAME ----- -ccollect_analyse_logs - analyse logs produced by ccollect(1) - - -SYNOPSIS --------- - -'ccollect_analyse_logs.sh' [iwe] - - -DESCRIPTION ------------ -ccollect_analyse_logs.sh reads the logfiles from stdin. You have to specify -at least one of the three loglevels (*i*nformational, *w*arning, *e*rror). Any -combination of them is allowed. - - -FILES ------ -ccollect log files:: - Are read from stdin - -EXAMPLES --------- -cat /var/log/ccollect/single/* | ccollect_analyse_logs.sh iw:: - Displays warnings and informational parts -ccollect_analyse_logs.sh iw < /var/log/ccollect/all_together:: - Displays only error messages (useful for the morning mail) - - -SEE ALSO --------- -ccollect(1), ccollect_add_source.sh, ccollect_delete_source(1), -ccollect_list_intervals(1), ccollect_logwrapper(1), - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_delete_source.text b/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_delete_source.text deleted file mode 100644 index 96562713..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_delete_source.text +++ /dev/null @@ -1,57 +0,0 @@ -ccollect_delete_source(1) -========================= -Nico Schottelius - - -NAME ----- -ccollect_delete_source - delete sources from ccollect(1) - - -SYNOPSIS --------- -'ccollect_delete_source.sh' [-d] [-f] - - -DESCRIPTION ------------ -ccollect_delete_source.sh deletes backup sources from ccollect(1) and optional -also the backups created for that source. - - -OPTIONS -------- --d: - Delete also the destination directory. `add_ccollect_source.sh` will change - to the source/'name'/destination directory, get the absolute name and delete - it recursively. --f: - Force deletion. Do not ask. Very handy for people who know what they do. - Very dangerous for everyone else. - - -FILES ------ -$CCOLLECT_CONF/sources:: - Directory containing the sources. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -ccollect(1), ccollect_add_source(1), ccollect_add_source(1), -ccollect_logwrapper(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_list_intervals.text b/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_list_intervals.text deleted file mode 100644 index 051b087c..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_list_intervals.text +++ /dev/null @@ -1,48 +0,0 @@ -ccollect_list_intervals(1) -========================== -Nico Schottelius - - -NAME ----- -ccollect_list_intervals - list available intervals from ccollect(1) - - -SYNOPSIS --------- -'ccollect_list_intervals.sh' - - -DESCRIPTION ------------ -ccollect_list_intervals.sh shows intervals specified in the configuration -for ccollect(1). It displays the name of each interval, followed by a colon -followed by the number backups to keep. - - -FILES ------ -$CCOLLECT_CONF/intervals:: - Directory containing the intervals. $CCOLLECT_CONF is '/etc/ccollect', if unset. - - -SEE ALSO --------- -collect(1), ccollect_add_source(1), ccollect_analyse_logs(1), -ccollect_delete_source(1), ccollect_logwrapper(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_logwrapper.text b/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_logwrapper.text deleted file mode 100644 index ce1c5f62..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/man/ccollect_logwrapper.text +++ /dev/null @@ -1,56 +0,0 @@ -ccollect_logwrapper(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect_logwrapper - start ccollect(1) and create a unique logfile - - -SYNOPSIS --------- -'ccollect_logwrapper.sh' - - -DESCRIPTION ------------ -ccollect_logwrapper.sh creates a unique logfile below -'$CCOLLECT_CONF/logwrapper' and redirects ccollect(1) output -(stdout and stderr) to it. - - -OPTIONS -------- -Options are passed directly to ccollect(1). - - -FILES ------ -$CCOLLECT_CONF/logwrapper:: - Directory containing the configuration. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -$CCOLLECT_CONF/logwrapper/destination:: - Link to the destination directory for the logfiles - - -SEE ALSO --------- -ccollect(1), ccollect_add_source(1), ccollect_analyse_logs(1), -ccollect_delete_source(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.0/doc/release-checklist b/software/ccollect/download/ccollect-0.7.0/doc/release-checklist deleted file mode 100644 index 7cba30cd..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version and date in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.2 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.2 deleted file mode 100644 index 0c1c2250..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.2 +++ /dev/null @@ -1,4 +0,0 @@ -x Fix $? problem -x Check last dir searching -x Check count generation -x Check general functionality (remove testing) diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.3 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.3 deleted file mode 100644 index 00195812..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.3 +++ /dev/null @@ -1,34 +0,0 @@ -Done: -==> screenshot -u0219 zrha166.netstream.ch # ~chdscni9/ccollect.sh weekly zrha166.netstream.ch -2007-08-16-21:49:44: ccollect 0.6: Beginning backup using interval weekly -[zrha166.netstream.ch] 2007-08-16-21:49:44: Beginning to backup -[zrha166.netstream.ch] 2007-08-16-21:49:45: Existing backups: 0 Total keeping backups: 8 -[zrha166.netstream.ch] 2007-08-16-21:49:45: Did not find existing backups for interval weekly. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Using backup from daily. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Beginning to backup, this may take some time... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Creating /etc/ccollect/sources/zrha166.netstream.ch/destination/weekly.20070816-2149.22188 ... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Transferring files... - -- beep-after-delete-hack? - -> tonnerre / #cLinux - -- replace nico-linux-ccollect with nico-ccollect - * ccollect is not Linux specific - -- remove exit-calls - * will leave behind unused temporary file! - * use _exit_err - -X join todos - -- fix possible quoting problems - * rsync_extra (redefine format) - * exclude - * other - * create _rsync, filtering args, creating new $@ - -- check and export variables for use in scripts! - -Contact Julian later: - * integrate updated german documentation diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.3.tonnerre b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.3.tonnerre deleted file mode 100644 index 4e7b7db5..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.5.3.tonnerre +++ /dev/null @@ -1,11 +0,0 @@ -NetBSD/i386,amd64,sparc,sparc64 - -13:13 < Tonnerre> telmich, die kleine wä, 2 Variablen aus $(CCOLLECT) zu - machen -13:13 < Tonnerre> telmich, eine fü Sourcepfad und eine fü -Destinationfpad -13:13 < Tonnerre> pfa -13:13 < Tonnerre> d -13:14 < Tonnerre> telmich, die gröre wä die $() durch ${} zu ersetzen, so -dass der Kram auch mit !GNU-Make geht - diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6 deleted file mode 100644 index ee8e97fd..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6 +++ /dev/null @@ -1,63 +0,0 @@ -not did, did not remember why I wanted to do that: - -- do sed-time check: - -1.2. replace sed? -compare timing: -_echo () { echo "$name $msg" } -and create -_techo () { echo "$timestamp $name $msg" } -perhaps create -_eecho () { _techo "ERROR $msg" } -? - - - -done: -add note for - 09:24 < telmich> Obri: ~/.ssh/config! - -- implement use of different intervals as source for cloning - * use 'woechentlich' if available and no backup exists for 'daily' - * add 'prefer_latest' to prefer different interval, that's newer than - ours - * or add 'prefer_same_interval' instead? -- implement detection of partial backups -3. detect unfinished backups -sven / markierung - - wie seht der Marker aus? - -> .ccollect-YEAR-MM-DD.HHmm.pid (like the directory) - --> assume incomplete, when we did not finish. - --> means it's complete,when rsync was successful ----> partial implemented in 0.5.2 (commented out) -- do not check by name, but by time - * is ls -t posix? - * also check: -p -1 -- ccollect Zeitausgabe verbessern - - Wofuer wie lange gebraucht - * rm - * klonen (gibt es so ja nicht) - Wenn Summary angegeben ist am Ende ausgeben -- do we want rsync -H by default? - * no: takes much more memory -ssh / port change: - change rsync_extra format -- Variables: - source_$n - no_sources - name -- changed naming of sources: - YYYYMMDD-HHMM.PID (better readable) - => source / backup converter! => not needed! -config: - set destination-base - /etc/ccollect/defaults/source_config - -Documentation: -- hint: backuping backup -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- delete_incomplete - diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6.1 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6.1 deleted file mode 100644 index 99a17eba..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6.1 +++ /dev/null @@ -1,23 +0,0 @@ -- Add filter support - * filter -- add source/ignore_failed_pre_exec -- add source/ignore_failed_post_exec -- do not delete_incomplete, when there's only one backup left! -- .ccollect-marker is deleted by rsync at the beginning! - - fix marking -- add logwrapper -- add loganalyser - speedup is - error codes - vanished files (see netstream)!!! - -Done: -- Improve finding backup from another interval: - o strip of interval name - o run sort -n - o use the last entry -- add --version, -V - -not needed: -- think about 'prefer_same_interval' / 'prefer_latest' - diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6.2 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6.2 deleted file mode 100644 index 05798ffd..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.6.2 +++ /dev/null @@ -1 +0,0 @@ -- fix delete_incomplete marker diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.1 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.1 deleted file mode 100644 index fb8d3a59..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.1 +++ /dev/null @@ -1,13 +0,0 @@ -- add global delete_incomplete (/etc/ccollect/defaults/delete_incomplete) -- add wrapper, to do logging and analyse - * output filename in the wrapper, save into variable - * call analyser -- fix german documentation! - -09:31 < Obri> telmich: hab nen kleinen tipp für ccollect -09:32 < Obri> telmich: ich habe hier hosts die nicht immer online sind, das ist dumm weil so das backup - kaputtgeht... -09:32 < Obri> telmich: ich habe jetzt das ein preexec script gebastelt: -09:32 < Obri> ping -c1 -q `cat /etc/ccollect/sources/$name/source | cut -d"@" -f2 | cut -d":" -f1` -09:33 < Obri> telmich: so bricht das backup ab wenn der host nicht erreichbar ist -09:33 < Obri> ohne dass ein altes backup entsorgt wird diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.2 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.2 deleted file mode 100644 index 9e43ba0a..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.2 +++ /dev/null @@ -1,59 +0,0 @@ --------------------------------------------------------------------------------- -Stats version --------------------------------------------------------------------------------- - -Add tools/ccollect_stats.sh, clearify license --------------------------------------------------------------------------------- -Preamble: - Netstream (www.netstream.ch) may consider using ccollect for backing up many - unix servers and needs some clean reporting. The following things - need to be done, so ccollect will be useful for netstream: - -Logger: - - Needs to write small mails (sysadmins don't have time to read mails) - - Needs to be able to only write a mail on error - * needs configuration option to also mail on warnings - - Should be able to send one mail per backup source - * or one for the whole backup job - -Messages: (to be used for filtering) - Errors: - Read from remote host .*: Connection timed out - - Warnings: - rsync: mknod .* failed: Invalid argument (22) - file has vanished: ".*" - --------------------------------------------------------------------------------- - -Analyzer: - - grosse Dateien - - grosse Veraenderungen --------------------------------------------------------------------------------- -exclude-lists-doku: -freebsd: - /usr/ports/* - /proc/* - /dev/* - /tmp/* - /var/tmp/* -linux: - /sys/* - /proc/* - /dev/* - /tmp/* - --------------------------------------------------------------------------------- -done: - -rsync_extra global! -- \n delimeted --------------------------------------------------------------------------------- - -S, --sparse - Try to handle sparse files efficiently so they take up less space on the des‐ - tination. Conflicts with --inplace because it’s not possible to overwrite - data in a sparse fashion. - --------------------------------------------------------------------------------- - Always report return code! - diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.3 b/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.3 deleted file mode 100644 index 73e5ffc6..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/0.7.3 +++ /dev/null @@ -1,2 +0,0 @@ -- add -a (archive) to ccollect_delete_source.text -- add listing of intervals to ccollect_list_intervals diff --git a/software/ccollect/download/ccollect-0.7.0/doc/todo/extern b/software/ccollect/download/ccollect-0.7.0/doc/todo/extern deleted file mode 100644 index 9be8f2be..00000000 --- a/software/ccollect/download/ccollect-0.7.0/doc/todo/extern +++ /dev/null @@ -1,23 +0,0 @@ -These todos are things that would be senseful todo, but are just nice -to have. This means I won't code them, so somebody can code them. --------------------------------------------------------------------------------- - -- Add ccollect-restore.sh - (new project, perhaps coordinated with jchome's ccollect-config) - - Helper (in dialog?) to restore backups - - Perhaps create ccollect-gui.{whatever} instead, which does all the - end user staff? - - Including cronjob, creating configuration, displaying status of - backups, allowing manual remove, allowing manual trigger of ccollect - (with realtime message window?)? - -- write mkccollectconfig (for 0.5!) - -> jchome works on it! - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.7.0/release.sh b/software/ccollect/download/ccollect-0.7.0/release.sh deleted file mode 100644 index e6ae08a9..00000000 --- a/software/ccollect/download/ccollect-0.7.0/release.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# -# 200?-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Standard release script for dummies like me -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect dir" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -NAME=$1 -TARNAME=${NAME}.tar.bz2 - -DHOST=nico@home.schottelius.org -DDIR=www/org/schottelius/unix/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -# create documentation for the end user -( - cd "$NAME" - make dist - make publish-doc -) - -tar cvfj "$TARNAME" \ - --exclude=.git \ - --exclude="conf/sources/*/destination/*" "$NAME" - -scp "${TARNAME}" "$DESTINATION" - -ssh "$DHOST" "( cd $DDIR; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd $DDIR; find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd $DDIR; find -type f -exec chmod 0644 {} \; )" - -cat "${NAME}/doc/release-checklist" diff --git a/software/ccollect/download/ccollect-0.7.0/tools/README b/software/ccollect/download/ccollect-0.7.0/tools/README deleted file mode 100644 index 73120184..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/README +++ /dev/null @@ -1,19 +0,0 @@ -Files and their tasks / destinations: - -ccollect_add_source.sh: bin -ccollect_analyse_logs.sh: bin -ccollect_create_source2.sh: ??? -ccollect_create_source.sh: ??? -ccollect_delete_source.sh: bin -ccollect_list_intervals.sh: bin -ccollect_logwrapper.sh: bin -ccollect-stats.sh: ??? -config-pre-0.4-to-0.4.BUGS: only to be used for converting -config-pre-0.4-to-0.4.sh: only to be used for converting -config-pre-0.4-to-0.4.sub.sh: only to be used for converting -config-pre-0.6-to-0.6.sh: only to be used for converting -config-pre-0.6-to-0.6.sub.sh: only to be used for converting -config-pre-0.7-to-0.7.sh: only to be used for converting -config-pre-0.7-to-0.7.sub.sh: only to be used for converting -gnu-du-backup-size-compare.sh -README diff --git a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_add_source.sh b/software/ccollect/download/ccollect-0.7.0/tools/ccollect_add_source.sh deleted file mode 100644 index 4a60d383..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_add_source.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# 2007-08-16: Written for Netstream (www.netstream.ch) -# -# Creates a source from standard values specified in -# /etc/ccollect/defaults/sources -# - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -SCONFIG="${CDEFAULTS}/sources" - -# standard options: variable2filename -exclude="exclude" -summary="summary" -intervals="intervals" -pre_exec="pre_exec" -post_exec="post_exec" -rsync_options="rsync_options" -verbose="verbose" -very_verbose="very_verbose" - -# options that we simply copy over -standard_opts="exclude summary intervals pre_exec post_exec rsync_options verbose very_verbose" - -# options not in standard ccollect, used only for source generation -src_prefix="${SCONFIG}/source_prefix" -src_postfix="${SCONFIG}/source_postfix" -destination_base="${SCONFIG}/destination_base" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _exit_err "" -fi - -_echo "Reading defaults from ${SCONFIG} ..." - -while [ $# -gt 0 ]; do - source="$1"; shift - - # Create - _echo "Creating ${source} ..." - - fullname="${CSOURCES}/${source}" - - # create source - if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Skipping." - continue - fi - mkdir -p "${fullname}" || _exit_err Cannot create \"${fullname}\". - - # copy standard files - for file in $standard_opts; do - eval rfile=\"\$$file\" - eval filename="${SCONFIG}/${rfile}" - if [ -e "${filename}" ]; then - _echo Copying \"$rfile\" to ${fullname} ... - cp -r "${filename}" "${fullname}/${rfile}" - fi - done - - # create source entry - if [ -f "${src_prefix}" ]; then - source_source="$(cat "${src_prefix}")" || _exit_err "${src_prefix}: Reading failed." - fi - source_source="${source_source}${source}" - if [ -f "${src_postfix}" ]; then - source_source="${source_source}$(cat "${src_postfix}")" || _exit_err "${src_postfix}: Reading failed." - fi - _echo "Adding \"${source_source}\" as source for ${source}" - echo "${source_source}" > "${fullname}/source" || _exit_err "Creating ${fullname}/source: failed." - - # create destination directory - absbase=$(cd "${destination_base}" 2>/dev/null && pwd -P) || \ - _exit_err "${destination_base} must exist before creating sources." - - dest="${absbase}/${source}" - _echo "Creating ${dest} ..." - mkdir -p "${dest}" || _exit_err "${dest}: Cannot create." - - # link destination directory - dest_abs=$(cd "${dest}" && pwd -P) || _exit_err "${dest}: Changing to newly created directory failed." - echo "${dest_abs}" > "${fullname}/destination" || \ - _exit_err "${fullname}/destination: Failed to create." - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_analyse_logs.sh b/software/ccollect/download/ccollect-0.7.0/tools/ccollect_analyse_logs.sh deleted file mode 100644 index e1484a28..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_analyse_logs.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written for Netstream (www.netstream.ch) on Di 21. Aug 17:10:15 CEST 2007 -# -# Analyse logs -# - -version=0.1 -date=2007-08-24 -fullversion="${version} (${date})" -args=iwe - -usage() { - echo "$(basename "$0") ${fullversion}: [iwe]" - echo "" - echo " i: print informational messages" - echo " w: print warning messages" - echo " e: print error messages" - echo "" - echo "Reading input from stdin, displaying to stdout." - exit 1 -} - -# -# read and verify argv -# -if [ "$#" -ne 1 ]; then - usage -fi -argv="$1"; shift - -wrong="$(echo ${argv} | grep -e "[^${args}]")" -if [ "${wrong}" ]; then - usage -fi - - -# set output levels -search_err="$(echo ${argv} | grep 'e')" -search_warn="$(echo ${argv} | grep 'w')" -search_info="$(echo ${argv} | grep 'i')" - -# -# Interesting strings in the logs: errors -# --------------------------------------- - -if [ "$search_err" ]; then - set -- "$@" "-e" 'Read from remote host .*: Connection timed out$' - set -- "$@" "-e" 'Read from remote host .*: Connection reset by peer$' - set -- "$@" "-e" 'rsync: .*: Invalid argument (22)$' - set -- "$@" "-e" 'rsync: .*: Input/output error (5)$' - set -- "$@" "-e" 'cannot send long-named file "' - set -- "$@" "-e" 'ERROR: .* failed verification -- update discarded.$' -fi - -# known error strings: -#[ddba049.netstream.ch] receiving file list ... rsync: readdir("/proc"): Invalid argument (22) -#[ddba033.netstream.ch] rsync: readlink "/usr/local/inetpub2/webmailroot/2wire.ch/royal@2wire.ch" failed: Input/output error (5) -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) -#[zrha165.netstream.ch] Read from remote host zrha165.netstream.ch: Connection reset by peer -#[ddba017.netstream.ch] receiving file list ... cannot send long-named file "/usr/local/www/apache22/cgi-bin/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/bac kup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup /backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ba ckup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backu p/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/back" -#[ddba033.netstream.ch] ERROR: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded. - - -# -# Interesting strings in the logs: warnings -# ----------------------------------------- -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) - -# [ddba015.netstream.ch] send_files failed to open /usr/local/dnscache/log/main/@4000000046ca0f3616939c14.s: No such file or directory -# [ddba015.netstream.ch] 2007-08-21-02:17:28: Finished backup (rsync return code: 23). -# [ddba017.netstream.ch] file has vanished: "/var/spool/postfix/active/657575D686" -#[ddba026.netstream.ch] 2007-08-21-05:35:13: Finished backup (rsync return code: 24). -#[ddba045.netstream.ch] send_files failed to open /data/hsphere/local/var/named/logs/@4000000046c98fa9079f39ac.s: No such file or directory -# file has vanished: ".*" - -if [ "$search_warn" ]; then - # warn on non-zero exit code - set -- "$@" "-e" 'Finished backup (rsync return code: [^0]' - set -- "$@" "-e" 'WARNING: .* failed verification -- update discarded (will try again).' -fi -# known warnings: -#[ddba033.netstream.ch] WARNING: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded (will try again). - - -# -# Interesting strings in the logs: informational -# ---------------------------------------------- -if [ "$search_info" ]; then - set -- "$@" "-e" 'total size is [[:digit:]]* speedup is' - set -- "$@" "-e" 'Backup lasted: [[:digit:]]*:[[:digit:]]\{1,2\}:[[:digit:]]* (h:m:s)$' - set -- "$@" "-e" 'send [[:digit:]]* bytes received [0-9]* bytes [0-9]* bytes/sec$' -fi - -# info includes: -#[ddba012.netstream.ch] total size is 22384627486 speedup is 13.75 -# [u0160.nshq.ch.netstream.com] 2007-08-20-18:26:06: Backup lasted: 0:43:34 (h:m:s) -#[ddba012.netstream.ch] sent 3303866 bytes received 1624630525 bytes 122700.92 bytes/sec - -grep "$@" diff --git a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_delete_source.sh b/software/ccollect/download/ccollect-0.7.0/tools/ccollect_delete_source.sh deleted file mode 100644 index 636ce673..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_delete_source.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# 2007-08-16 Written for Netstream (www.netstream.ch) -# Delete sources and their backups (optionally). -# - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _echo "${self} [-f] [-d] " - _echo " -f: Do not ask, simply delete. Dangerous and good for sysadmins." - _echo " -d: Also delete the destination (removes all backups)" - _exit_err "Exiting." -fi - -params_possible=yes -force="" -backups="" - -while [ $# -gt 0 ]; do - if [ "$params_possible" ]; then - case "$1" in - "-f"|"--force") - force="-r" - shift; continue - ;; - "-d"|"--destination") - backups=yes - shift; continue - ;; - --) - params_possible="" - shift; continue - ;; - -*|--*) - _exit_err "Unknown option: $1" - ;; - esac - - fi - - # Reached here? So there are no more parameters. - params_possible="" - - source="$1"; shift - - # Create - _echo "Deleting ${source} ..." - fullname="${CSOURCES}/${source}" - - # ask the user per source, if she's not forcing us - if [ -z "$force" ]; then - sure="" - echo -n "Do you really want to delete ${source} (y/n)? " - read sure - - if [ "$sure" != "y" ]; then - _echo "Skipping ${source}." - continue - fi - fi - - if [ "$backups" ]; then - ddir="$(cat "${fullname}/destination")" - addir="$(cd && pwd -P)" || _exit_err "Cannot change to ${ddir}" - _echo "Deleting ${addir} ..." - rm -r $force "${addir}" - fi - - _echo "Deleting ${fullname} ..." - rm -r $force "${fullname}" -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_list_intervals.sh b/software/ccollect/download/ccollect-0.7.0/tools/ccollect_list_intervals.sh deleted file mode 100644 index d95bbde7..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_list_intervals.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written on 24-Jun-2006 -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -me="$(basename $0)" - -_echo() -{ - echo "$me> $@" -} - -if [ ! -d "${CCOLLECT_INTERVALS}" ]; then - _echo "No intervals defined in ${CCOLLECT_INTERVALS}" - exit 1 -fi - -set -e -cd "${CCOLLECT_INTERVALS}" - -for interval in *; do - eval int_${interval}=$(cat "${interval}"); - eval echo ${interval}: \$int_${interval}; -done diff --git a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_logwrapper.sh b/software/ccollect/download/ccollect-0.7.0/tools/ccollect_logwrapper.sh deleted file mode 100644 index ac7f4961..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_logwrapper.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written for Netstream (www.netstream.ch) on Fr 8. Jun 10:30:24 CEST 2007 -# -# Call the log-wrapper instead of ccollect.sh and it will create nice logs -# - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -LOGCONF=$CCOLLECT_CONF/logwrapper - -logdir="${LOGCONF}/destination" -CDATE="date +%Y%m%d-%H%M" -we="$(basename $0)" -pid=$$ - -export ccollect_logfile="${logdir}/$(${CDATE}).${pid}" - -# use syslog normally -# Also use echo, can be redirected with > /dev/null if someone cares -_echo() -{ - string="${we} (${pid}): $@" - logger "${string}" - echo "${string}" -} - - -# exit on error -_exit_err() -{ - _echo "$@" >&2 - rm -f "${TMP}" - exit 1 -} - -# put everything into that specified file -_echo "Starting with arguments: $@" -touch "${ccollect_logfile}" || _exit_err "Failed to create ${ccollect_logfile}" - -# First line in the logfile is always the commandline -echo ccollect.sh "$@" > "${ccollect_logfile}" 2>&1 -ccollect.sh "$@" >> "${ccollect_logfile}" 2>&1 - -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_stats.sh b/software/ccollect/download/ccollect-0.7.0/tools/ccollect_stats.sh deleted file mode 100644 index f1f62adb..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/ccollect_stats.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2007 Daniel Aubry -# 2008 Nico Schottelius (added minimal header) -# -# Copying license unknown -# - -# TODO: -# add variables, add copying, add configuration - -if [ ! -e /tmp/ccollect-stats.lock ] -then - touch /tmp/ccollect-stats.lock - - # changes after license clearify - # for dest in /etc/ccollect/sources/ -type f -name destination | while read line - - find /etc/ccollect/sources/ -type l | while read line - d=$(basename $(readlink $line)) - echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log - du -sh $line/* | tee -a /var/log/backup.log - done - rm /tmp/ccollect-stats.lock -fi diff --git a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 23b3307e..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index e28e7184..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.6-to-0.6.sh b/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.6-to-0.6.sh deleted file mode 100644 index 58a538ae..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.6-to-0.6.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 20070816-2225 -# Transfer configuration to 0.6 layout -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -type f -name rsync_options -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.6-to-0.6.sub.sh b/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.6-to-0.6.sub.sh deleted file mode 100644 index 7744f9eb..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.6-to-0.6.sub.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 20070816-2227 -# Transfer configuration to 0.6 layout (subscript) -# - -if [ $# -ne 1 ]; then - echo "$0: rsync_options file" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) - -echo "Working on $1 ..." - -for option in $(cat "$1"); do - echo "${option}" >> "${tmp}" -done -mv ${tmp} "$1" diff --git a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.7-to-0.7.sh b/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.7-to-0.7.sh deleted file mode 100644 index 6d540abb..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.7-to-0.7.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Convert configuration to 0.7 layout -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.7 configuration directories to match 0.7 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -name destination -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.7-to-0.7.sub.sh b/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.7-to-0.7.sub.sh deleted file mode 100644 index bb43285f..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/config-pre-0.7-to-0.7.sub.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Helper script -# - -if [ $# -ne 1 ]; then - echo "$0: destination-file" - echo "" - echo " Fix pre 0.7 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) -file="$1" - -echo "Working on $file ..." - -if [ -L "${file}" ]; then - echo "Converting ${file} ..." - dir="$(cd "${file}" && pwd)"; ret=$? - - if [ $ret -ne 0 ]; then - echo "ERROR: $file is a broken link" - exit 1 - else - echo "${dir}" > "${tmp}" - rm -f "${file}"; ret=$? - if [ $ret -ne 0 ]; then - echo "ERROR: Removing $file failed" - exit 1 - fi - mv "${tmp}" "${file}"; ret=$? - if [ $ret -ne 0 ]; then - echo "ERROR: Moving ${tmp} to ${file} failed, your source is broken." - exit 1 - fi - fi -else - echo "$file is not a link, not converting" - exit 1 -fi diff --git a/software/ccollect/download/ccollect-0.7.0/tools/gnu-du-backup-size-compare.sh b/software/ccollect/download/ccollect-0.7.0/tools/gnu-du-backup-size-compare.sh deleted file mode 100644 index cf3b1948..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/gnu-du-backup-size-compare.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 2007-08-16 -# - -exit 1 -# not yet finished. - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_SOURCES="$CCOLLECT_CONF/defaults/sources" - -me="$(basename "$0")" - -if [ $# -lt 1 ]; then - echo "${me}: sources names - exit 1 -fi - -if [ ! -d "$CCOLLECT_SOURCES" ]; then - echo "No sources defined in $CCOLLECT_SOURCES" - exit 1 -fi - -cd "${CCOLLECT_SOURCES}" - -while [ "$#" -gt 0 ]; do - source="$1"; shift - fsource="${CCOLLECT_SOURCES}/${source}" - du -s "${fsource}/"* "${fsource}" - # du -l should follow -done diff --git a/software/ccollect/download/ccollect-0.7.0/tools/old/ccollect_create_source.sh b/software/ccollect/download/ccollect-0.7.0/tools/old/ccollect_create_source.sh deleted file mode 100644 index 7a34c6b0..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/old/ccollect_create_source.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 3 ]; then - _echo " " - _echo "Example: \"my-notebook\" \"192.168.42.42\" \"/home/server/backup/my-notebook\"" - exit 1 -fi - -name="$1" -source="$2" -destination="$3" -fullname="${CSOURCES}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${source} ..." -ping -c1 "${source}" || _exit_err "Cannot reach ${source}. Aborting." - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${source}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.0/tools/old/ccollect_create_source2.sh b/software/ccollect/download/ccollect-0.7.0/tools/old/ccollect_create_source2.sh deleted file mode 100644 index 842afb65..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/old/ccollect_create_source2.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 2 ]; then - _echo " " - _echo "Example: \"192.168.42.42\" \"/home/server/backup/\"" - _echo " This will create ${CSOURCES}/192.168.42.42 and /home/server/backup/192.168.42.42." - exit 1 -fi - -# sourcename / servername -name="$1" - -# basedir -basedir="$2" - -fullname="${CSOURCES}/${name}" -destination="${basedir}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${name} ..." -ping -c1 "${name}" || _exit_err "Cannot reach ${name}. Aborting." - -if [ ! -d "${basedir}" ]; then - echo "${basedir} is not a directory. Aborting." - exit 7 -fi - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${name}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.0/tools/report_success.sh b/software/ccollect/download/ccollect-0.7.0/tools/report_success.sh deleted file mode 100644 index b0f9d1bf..00000000 --- a/software/ccollect/download/ccollect-0.7.0/tools/report_success.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Sends feedback -# - -subject="==> success: ccollect" -to="nico-ccollect-success" -host="schottelius.org" -fullto="${to}@${host}" - -software="ccollect" -author="Nico Schottelius" -info="$(uname -s -v -r -m)" - -echo "Reporting success for $software to ${author}" -echo "-----------------" -echo -n "Your name (leave free for anonymous): " -read name -echo -n "Your email (leave free for anonymous): " -read email -echo -n "Comment (leave free for no comment): " -read comment - -echo "" -echo "The following information will be send to ${author}:" -echo "" - -cat << eof -Name: $name (will be used to contact you and kept secret) -E-Mail: $email (will be used to contact you and kept secret) -Comment: $comment -Info: $info - -eof - -echo -n "Is it ok to send out that mail (press enter to send or ctrl-c to abort)? " -read yes - -cat << eof | mail -s "$subject" "$fullto" -Name: $name (will be used to contact you and kept secret) -E-Mail: $email (will be used to contact you and kept secret) -Comment: $comment -Info: $info -eof - -echo "Send. Thank you for your feedback." diff --git a/software/ccollect/download/ccollect-0.7.1/.gitignore b/software/ccollect/download/ccollect-0.7.1/.gitignore deleted file mode 100644 index 4e9c74d5..00000000 --- a/software/ccollect/download/ccollect-0.7.1/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.htm -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.htm -doc/man/*.texi -doc/man/*.man -test/* -.*.swp -doc/man/*.[0-9] -doc/*.xml -doc/*/*.xml -*.texi -*.fo diff --git a/software/ccollect/download/ccollect-0.7.1/COPYING b/software/ccollect/download/ccollect-0.7.1/COPYING deleted file mode 100644 index fc8a5de7..00000000 --- a/software/ccollect/download/ccollect-0.7.1/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/software/ccollect/download/ccollect-0.7.1/CREDITS b/software/ccollect/download/ccollect-0.7.1/CREDITS deleted file mode 100644 index 72d59cc2..00000000 --- a/software/ccollect/download/ccollect-0.7.1/CREDITS +++ /dev/null @@ -1,12 +0,0 @@ -Thanks go to the following people: - -* the whole #cLinux channel - - for testing and debugging (those I mean should know ;-) -* Alexey Maximov - - for finding return-value and shell limitation bugs -* Daniel Aubry - - for reporting many hints -* Markus Meier - - for finding a really simple solution for choosing the right backup to - clone from: Make it independent of the interval, simply choose the last - one created. diff --git a/software/ccollect/download/ccollect-0.7.1/Makefile b/software/ccollect/download/ccollect-0.7.1/Makefile deleted file mode 100644 index cfafa7ab..00000000 --- a/software/ccollect/download/ccollect-0.7.1/Makefile +++ /dev/null @@ -1,195 +0,0 @@ -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written on Fri Jan 13 12:13:08 CET 2006 -# -# FIXME: add prefix-support? -# - -INSTALL=install -CCOLLECT_SOURCE=ccollect.sh -CCOLLECT_DEST=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man -XSLTPROC=xsltproc -XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl -A2X=a2x - -prefix=/usr/packages/ccollect-git -bindir=${prefix}/bin -destination=${bindir}/${CCOLLECT_DEST} - -mandest=${prefix}/man/man1 -manlink=/usr/local/man/man1 - -path_dir=/usr/local/bin -path_destination=${path_dir}/${CCOLLECT_DEST} - -# where to publish -host=home.schottelius.org -dir=/home/server/www/nico/unix.schottelius.org/www/ccollect/ -docdir=${dir}/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text \ - doc/man/ccollect_add_source.text \ - doc/man/ccollect_analyse_logs.text \ - doc/man/ccollect_delete_source.text \ - doc/man/ccollect_logwrapper.text \ - doc/man/ccollect_list_intervals.text - -DOCS = ${MANDOCS} doc/ccollect.text doc/ccollect-DE.text - -# -# Doku -# -HTMLDOCS = ${DOCS:.text=.html} -DBHTMLDOCS = ${DOCS:.text=.htm} - -# texi is broken currently, don't know why xslt things complain yet -TEXIDOCS = ${DOCS:.text=.texi} -TEXIDOCS = - -# fop fails here, so disable it for now -PDFDOCS = ${DOCS:.text=.pdf} -PDFDOCS = - -MANPDOCS = ${MANDOCS:.text=.1} - -DOCBDOCS = ${DOCS:.text=.docbook} - -DOC_ALL = ${HTMLDOCS} ${DBHTMLDOCS} ${TEXIDOCS} ${MANPDOCS} ${PDFDOCS} - -html: ${HTMLDOCS} -htm: ${DBHTMLDOCS} -info: ${TEXIDOCS} -man: ${MANPDOCS} -pdf: ${PDFDOCS} -documentation: ${DOC_ALL} - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage{s}" - @echo "install: install ccollect to ${prefix}" - -install: install-link install-manlink - -install-link: install-script - ${LN} ${destination} ${path_destination} - -install-script: - ${INSTALL} -D -m 0755 ${CCOLLECT_SOURCE} ${destination} - -install-man: man - ${INSTALL} -d -m 0755 ${mandest} - ${INSTALL} -D -m 0644 doc/man/*.1 ${mandest} - -install-manlink: install-man - ${INSTALL} -d -m 0755 ${manlink} - for man in ${mandest}/*; do ${LN} $$man ${manlink}; done - -# -# Tools -# -TOOLS=ccollect_add_source.sh \ - ccollect_analyse_logs.sh \ - ccollect_delete_source.sh \ - ccollect_list_intervals.sh \ - ccollect_logwrapper.sh \ - ccollect_list_intervals.sh - -TOOLSMAN1 = $(subst ccollect,doc/man/ccollect,$(TOOLS)) -TOOLSMAN = $(subst .sh,.text,$(TOOLSMAN1)) - -TOOLSFP = $(subst ccollect,tools/ccollect,$(TOOLS)) - -#t2: $(TOOLSMAN) -t2: - echo $(TOOLS) - $(TOOLSMAN) - $(TOOLSFP) - - -# docbook gets .htm, asciidoc directly .html -%.htm: %.docbook - ${XSLTPROC} -o $@ ${XSL} $< - -%.html: %.text %.docbook - ${ASCIIDOC} -n -o $@ $< - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -#%.mandocbook: %.text -# ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -#%.man: %.mandocbook -# ${DOCBOOKTOMAN} --to-stdout $< > $@ - -#%.man: %.text -%.1: %.text - ${A2X} -f manpage $< - -%.pdf: %.text - ${A2X} -f pdf $< - - -# -# Developer targets -# -update: - @git push - -publish-doc: documentation - @echo "Transferring files to ${host}" - @chmod a+r ${DOCS} ${DOC_ALL} - @tar c ${DOCS} ${DOC_ALL} | ssh ${host} "cd ${dir}; tar xv" - -# -# Distribution -# -clean: - rm -f ${DOC_ALL} - rm -f doc/man/*.[0-9] doc/man/*.xml doc/*.fo doc/man/*.fo - -distclean: clean - rm -f ${DOCBDOCS} - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation - -test: ccollect.sh documentation - mkdir -p /tmp/ccollect - CCOLLECT_CONF=./conf ./ccollect.sh daily "source with spaces" - CCOLLECT_CONF=./conf ./ccollect.sh normal 'local1&with-ampersand' diff --git a/software/ccollect/download/ccollect-0.7.1/README b/software/ccollect/download/ccollect-0.7.1/README deleted file mode 100644 index cab53f19..00000000 --- a/software/ccollect/download/ccollect-0.7.1/README +++ /dev/null @@ -1,63 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups (local or remote) data to local or remote destinations. - -You can retrieve the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - does unecessary moving of backup directories - - I didn't like the configuration at all, so I used the cconfig style [2]. - -Please use tools/report_success.sh to report success, if you are successfully -using ccollect. - -A small try to visualize the differences in a table: - -+---------------+-------------------------------------------------------------+ -| What? | rsnapshot | ccollect | -+---------------+-------------------------------------------------------------+ -| Configuration | tab separated, needs | plain cconfig-style | -| | parsing | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| post-/pre- | no | yes | -| execution | | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| exclude lists | no | yes | -+---------------+-------------------------------------------------------------+ -| Parallel | | | -| execution | | | -| of multiple | no | yes | -| backups | | | -+---------------+-------------------------------------------------------------+ -| Programming | perl | sh | -| language | | (posix compatible) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 6772 (5353 w/o comments, | 546 (375 w/o comments, | -| (2006-10-25) | 4794 w/o empty lines) | 288 w/o empty lines) | -+---------------+-------------------------------------------------------------+ -| Age | Available since 2002/2003 | Written at 2005-11-14 | -+---------------+-------------------------------------------------------------+ - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/ccollect-DE.text German manual in text format (externally maintained) -doc/ccollect-DE.html German manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://unix.schottelius.org/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.7.1/ccollect.sh b/software/ccollect/download/ccollect-0.7.1/ccollect.sh deleted file mode 100644 index e14dcfca..00000000 --- a/software/ccollect/download/ccollect-0.7.1/ccollect.sh +++ /dev/null @@ -1,615 +0,0 @@ -#!/bin/sh -# -# 2005-2009 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 - -# -# Standard variables (stolen from cconf) -# -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/${__myname}.XXXXXX") -VERSION=0.7.1 -RELEASE="2009-02-02" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - awk "{ print \"[${name}] \" \$0 }" -} - -pcmd() -{ - if [ "$remote_host" ]; then - ssh "$remote_host" "$@" - else - "$@" - fi -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "${__myname}: [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - f_incomplete="delete_incomplete" - c_incomplete="${backup}/${f_incomplete}" - c_remote_host="${backup}/remote_host" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a file. Skipping." - else - ddir=$(cat "${c_dest}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Destination ${c_dest} is not readable. Skipping." - fi - fi - - # - # do we backup to a remote host? then set pre-cmd - # - if [ -f "${c_remote_host}" ]; then - # adjust ls and co - remote_host=$(cat "${c_remote_host}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Remote host file ${c_remote_host} exists, but is not readable. Skipping." - fi - destination="${remote_host}:${ddir}" - else - remote_host="" - destination="${ddir}" - fi - export remote_host - - # - # check for existence / use real name - # - ( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping." - - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" -o -f "${CDEFAULTS}/${f_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null - - i=0 - while read incomplete; do - eval incomplete_$i=\"$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval realincomplete=\"\$incomplete_$j\" - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ - _exit_err "Removing ${realincomplete} failed." - fi - j=$(($j+1)) - done - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g')" || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - pcmd ls -p1 "$ddir" | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - i=0 - while read to_remove; do - eval remove_$i=\"${to_remove}\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval to_remove=\"\$remove_$j\" - _techo "Removing ${to_remove} ..." - pcmd rm ${VVERBOSE} -rf "${ddir}/${to_remove}" || \ - _exit_err "Removing ${to_remove} failed." - j=$(($j+1)) - done - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Use ls -1c instead of -1t, because last modification maybe the same on all - # and metadate update (-c) is updated by rsync locally. - # - last_dir="$(pcmd ls -tcp1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - set -- "$@" "--link-dest=${ddir}/${last_dir}" - _techo "Hard linking from ${last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${ddir}/${INTERVAL}.${destination_date}.$$" - destination_full="${destination}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - pcmd mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - pcmd touch "${destination_dir}.${c_marker}" - - # - # the rsync part - # - - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? - - # - # remove marking here - # - pcmd rm "${destination_dir}.${c_marker}" || \ - _exit_err "Removing ${destination_dir}/${c_marker} failed." - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" diff --git a/software/ccollect/download/ccollect-0.7.1/conf/README b/software/ccollect/download/ccollect-0.7.1/conf/README deleted file mode 100644 index 8402c76f..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/README +++ /dev/null @@ -1,3 +0,0 @@ -This is my personal test configuration. -It can perhaps be some example for you, although it may be pretty -unsorted and highly chaotic. diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/normal b/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/normal deleted file mode 100644 index 7273c0fa..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/normal +++ /dev/null @@ -1 +0,0 @@ -25 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.7.1/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.7.1/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/exclude b/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/exclude deleted file mode 100644 index ee4c9268..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/exclude +++ /dev/null @@ -1 +0,0 @@ -/test diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/rsync_options b/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/rsync_options deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/source_postfix b/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/source_postfix deleted file mode 100644 index 0b5cde79..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/source_postfix +++ /dev/null @@ -1 +0,0 @@ -:/ diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/source_prefix b/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/source_prefix deleted file mode 100644 index fc37f9d6..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/source_prefix +++ /dev/null @@ -1 +0,0 @@ -root@ diff --git a/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/verbose b/software/ccollect/download/ccollect-0.7.1/conf/defaults/sources/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/verbose b/software/ccollect/download/ccollect-0.7.1/conf/sources/bla blu/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/fehler b/software/ccollect/download/ccollect-0.7.1/conf/sources/fehler deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/README b/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/README deleted file mode 100644 index 6b192a64..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/README +++ /dev/null @@ -1 +0,0 @@ -This is a production example I use for my notebook. diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/destination deleted file mode 100644 index 8ac51bc3..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/server/raid/backup/ikn diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/exclude b/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/exclude deleted file mode 100644 index f5b5b7c8..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/exclude +++ /dev/null @@ -1 +0,0 @@ -/home/server/raid diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/source deleted file mode 100644 index b498fd49..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/source +++ /dev/null @@ -1 +0,0 @@ -/ diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/summary b/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/summary deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/verbose b/software/ccollect/download/ccollect-0.7.1/conf/sources/ikn/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/exclude b/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/source deleted file mode 100644 index 96861383..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1&with-ampersand/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/bin diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/exclude b/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/source deleted file mode 100644 index 96861383..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/local1/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/bin diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/exclude b/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/remote_host b/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/remote_host deleted file mode 100644 index 3c2693c9..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/remote_host +++ /dev/null @@ -1 +0,0 @@ -home.schottelius.org diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/source deleted file mode 100644 index 96861383..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/remote1/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/bin diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/delete_incomplete b/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/delete_incomplete deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/destination deleted file mode 120000 index 8de582ae..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/destination +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/backupdir/testsource1 \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/exclude b/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/intervalls/daily b/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/intervalls/daily deleted file mode 100644 index 0cfbf088..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/source deleted file mode 100644 index 2206a2c8..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/source +++ /dev/null @@ -1 +0,0 @@ -/home/user/nico/oeffentlich/computer/projekte/ccollect diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/verbose b/software/ccollect/download/ccollect-0.7.1/conf/sources/source with spaces/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source-without-intervall/exclude b/software/ccollect/download/ccollect-0.7.1/conf/sources/source-without-intervall/exclude deleted file mode 100644 index 54696611..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/source-without-intervall/exclude +++ /dev/null @@ -1 +0,0 @@ -manage diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/source-without-intervall/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/source-without-intervall/source deleted file mode 100644 index a1849b91..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/source-without-intervall/source +++ /dev/null @@ -1 +0,0 @@ -nico@creme.schottelius.org:bin diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/destination deleted file mode 120000 index b12e1532..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/exclude b/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/intervalls/daily b/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/intervalls/daily deleted file mode 100644 index 7ed6ff82..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/intervalls/daily +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/intervalls/yearly b/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/intervalls/yearly deleted file mode 100644 index 209e3ef4..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/intervalls/yearly +++ /dev/null @@ -1 +0,0 @@ -20 diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/source deleted file mode 100644 index 597ddcaf..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/testsource2/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/vpn/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/vpn/destination deleted file mode 120000 index fdfab7bd..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/vpn/destination +++ /dev/null @@ -1 +0,0 @@ -/home/nico/backupdir/vpn \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/vpn/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/vpn/source deleted file mode 100644 index 04b9f19f..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/vpn/source +++ /dev/null @@ -1 +0,0 @@ -/home/nico/vpn/ diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/destination deleted file mode 120000 index cad23091..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp \ No newline at end of file diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/source deleted file mode 100644 index 5e56e040..00000000 --- a/software/ccollect/download/ccollect-0.7.1/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/software/ccollect/download/ccollect-0.7.1/doc/braindumps/LOCAL_vs._REMOTE b/software/ccollect/download/ccollect-0.7.1/doc/braindumps/LOCAL_vs._REMOTE deleted file mode 100644 index f2a40b70..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/braindumps/LOCAL_vs._REMOTE +++ /dev/null @@ -1,35 +0,0 @@ - to Local to Remote - backup destination is exiting - pre/postexec runs locally - --link-dest? - /delete_incomplete - can chech ddir - - can check destination dir - -> dooooooo it before! - - - remote_host! - => rddir_ls: - incomplete: ls -1 "${INTERVAL}"*".${c_marker}" - - host support? - ssh-host-support? - - => ssh_host => save to host - execute commands there! - - rm! - - --link-dest? - - --link-dest=DIR - => remote dirs, rsync remote - => works!!!! - - local_destination - remote_destination - => remote_* - - both - configuration is local (what to where) - diff --git a/software/ccollect/download/ccollect-0.7.1/doc/braindumps/README b/software/ccollect/download/ccollect-0.7.1/doc/braindumps/README deleted file mode 100644 index 973addcb..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/braindumps/README +++ /dev/null @@ -1 +0,0 @@ -Do not read the files in this directory diff --git a/software/ccollect/download/ccollect-0.7.1/doc/ccollect-DE.text b/software/ccollect/download/ccollect-0.7.1/doc/ccollect-DE.text deleted file mode 100644 index 2fa62373..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/ccollect-DE.text +++ /dev/null @@ -1,192 +0,0 @@ -ccollect- Installieren, Konfigurieren und Anwenden -=================================================== -Julian Meier -v0.1, Initiale Version vom 2006-03-04 -:Author Initials: JM - -*DIESE ANLEITUNG IST NICHT AKTUELL UND MUSS -AKTUALISIERT WERDEN (siehe Englische Version)* -inkrementelle Datensicherung -mit 'hardlinks' und 'rsync' - -Einleitung ----------- -*DIESE ANLEITUNG IST NICHT AKTUELL UND MUSS -AKTUALISIERT WERDEN (siehe Englische Version)* - -'ccollect' ist ein Backuptool geschrieben in der sh-skript Programmiersprache. -Es braucht nichts besonderes nur die '/bin/sh'-Konsole (oder eine kompatible). - -Installation ------------- - -Anforderungen -~~~~~~~~~~~~~ - -.Die aufgelisteten Werkzeuge müssen für das Benutzen von ccollect installiert sein: -- bc -- cp -- rsync -- date -- ssh (optional, wenn man ssh-Verbindungen nutzen moechte) - -Am besten überprüfen Sie das mit dem Befehl 'apt-get install bc rsync ssh'. -Beim Fehlen eines Werkzeuges wird dieses nachinstalliert. - -Installieren -~~~~~~~~~~~~ - -. Laden Sie sich die neuste Version von ccollect herunter. - Diese finden Sie unter: 'http://linux.schottelius.org/ccollect' -. Wechseln Sie in der Konsole mit "cd 'Pfad" in das Verzeichniss, - indem sich das ccollect Archiv befindet. - Entpacken Sie das Archiv mit "tar xvfj ccollect-$version.tar.bz2". - Am Besten ist es, wenn Sie jetzt in das Verzeichniss mit den - entpackten Daten wechseln: "cd 'pfad/'ccollect-'version'. -. Danach kopieren Sie die Datei 'ccollect.sh' aus dem entpackten Archiv nach - /usr/local/bin. Das geht mit dem Befehl "cp ccollect.sh /usr/local/bin". -. Nun ändern Sie die Rechte für die Datei damit jeder Benutzer das - Programm verwenden kann: "chmod 0755 /usr/local/bin/ccollect.sh" -. Erstellen Sie nun das Konfigurationsverzeichnis für ccollect: - "mkdir /etc/ccollect/" -. Starten sie nun zum Testen das Programm ccollect mit dem Befehl - `ccollect.sh` in der Konsole. - - -Konfiguration -------------- - -Konfigurationsverzeichnisse -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Die Konfigurationsdaten befinden sich bei ccollect im oben erstellten Verzeichnis -"/etc/ccollect". Um ccollect richtig konfigurieren zu können benötigen Sie -noch ein paar weitere Verzeichnisse: - -- "/etc/ccollect/defaults" mit: - 'mkdir /etc/ccollect/defaults' -- "/etc/ccollect/defaults/intervals" mit: - 'mkdir /etc/ccollect/defaults/intervals' -- "/etc/ccollect/sources" mit: - 'mkdir /etc/ccollect/sources' - - -Intervalle -~~~~~~~~~~ - -Der Intervall-Wert definiert, wie viele Backup-Versionen ccollect von -den gesicherten Daten behalten soll. -Der Name der Datei, in der der Wert steht, ist zugleich auch der -Name des Intervalls. - --------------------------------------------------------------- -julian@flumy:/etc/ccollect/defaults/intervals$ ls -daily -julian@flumy:/etc/ccollect/defaults/intervals$ cat daily -7 -julian@flumy:/etc/ccollect/defaults/intervals$ --------------------------------------------------------------- - - -Intervall erstellen -^^^^^^^^^^^^^^^^^^^^ -Sie erstellen einen Intervall wie folgt: - -. Wechseln Sie in das Intervall-Verzeichnis: 'cd /etc/ccollect/defaults/intervals'. -. Erstellen Sie einen neuen Intervall mit dem Befehl - "echo 'wert' > 'Intervall-Name'" - - -Sources -~~~~~~~ - -Mit Sourcen meint man bei 'ccollect' die Quelldaten. Der Wert einer 'source'-Datei -verweist auf einen Pfad in dem sich die zu sichernden Daten befinden. - -.Im Ordner '/etc/ccollect/sources/*' wird festgelegt: -- Der Sicherungs-Titel -- Quell- und Ziel-Verzeichnis -- Spezielle Einstellungen - -Sicherungs-Titel -^^^^^^^^^^^^^^^^ -Der Sicherungstitel ist der Name eines Ordners in /etc/ccollect/sources. - - -Man erstellt also ein neue neue Sicherung mit dem Befehl -"mkdir '/etc/ccollect/sources/'Sicherungs-Titel'". -In diesem Verzeichnis folgen dann die spezifischen Konfigurationsdaten -(nur!) für diese Sicherung. - -Quelle -~~~~~~ -Mit Quelle ist gemeint welche Daten gesichert werden. -Dies wird in der Konfigurationsdatei 'source' festgelegt. - -Diese liegt im Verzeichnis "/etc/ccollect/sources/'Sicherungs-Titel'". -Wechseln Sie in das Verzeichnis mit dem Sicherungs-Titel und erstellen Sie die -Datei mit "echo 'Quellpfad' > source". - -Exclude -^^^^^^^ -Es kann vorkommen das man in einem Verzeichniss alles sichern will -bis auf ein paar Unterordner. -Für dieses Vorhaben gibt es die Datei 'exclude', die sich wiederum -im Verzeichnis 'Sicherungs-Titel' befindet. - -Die Datei wird mit folgenden Schritten angelegt: - -. "echo 'Quellpfad/verzeichnis1 > exclude" - Ein Pfad wird weggelassen. -. "echo 'Quellpfad/verzeichnis2 >> exclude" - Ein weiterer Pfad der weggelassen wird. Das zweite '>' bewirkt, - das an die 'exclude'-Datei angefügt wird (das einfache '>' - ueberschreibt eine vorhandene Datei). - - -Ziel -~~~~ -Mit dem Ziel ist gemeint wohin die Sicherung gespeichert wird. -Dies geschieht mit einer Verknüpfung (Link), die 'destination' heisst. - -.Erstellen Sie diese mit den Befehlen -- "ln -s '/Pfad/zum/Speicherort/' destination" -- Mit dem Befehl "ls -l destination" kann man die Richtigkeit der - Verknüpfung überprüfen. - -[IMPORTANT] -============================== -Es -darf -immer -nur -eine -'source', -'destination', -und -'exclude' -Datei -vorhanden -sein. -============================== - - -Spezielles -~~~~~~~~~~ -Im Ordner "/etc/ccollect/sources/'Sicherung'" kann man weitere Daten einfügen -und damit Optionen ein- oder auszuschalten. - -'verbose':: - Beim Sicherungsvorgang ausführlich berichten ('-v' für 'rsync'). -'very_verbose':: - Beim Sicherungsvorgang sehr ausführlich berichten - ('-v' für 'rsync', 'mkdir', 'cp' und 'rm'). -'summary':: - 'ccollect' erstellt beim Beenden des Sicherungsvorganges eine - Zusammenfassung des Geschehenen. -'rsync_option':: - Alle Befehle in dieser Datei zu 'rsync' werden ausgeführt beim Sicherungsvorgang. -'pre_exec':: - Die Befehle im Inhalt dieser Datei werden vor dem Backup ausgeführt. -'post_exec':: - Die Befehle im Inhalt dieser Datei werden nach dem Backup ausgeführt. diff --git a/software/ccollect/download/ccollect-0.7.1/doc/ccollect-restoring.text b/software/ccollect/download/ccollect-0.7.1/doc/ccollect-restoring.text deleted file mode 100644 index 7bb29eae..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/ccollect-restoring.text +++ /dev/null @@ -1,196 +0,0 @@ -ccollect - Restoring backups -============================ -Nico Schottelius -0.1, for all ccollect version, Initial Version from 2008-07-04 -:Author Initials: NS - - -Having backups is half the way to success on a failure. -Knowing how to restore the systems is the other half. - - -Introduction ------------- -You made your backup and now you want to restore your -data. If you backuped only parts of a computer and need -only to restore them, it is pretty easy to achieve. -Restoring a whole system is a little bit more -difficult and needs some knowledge of the operating system. - - -Restoring parts of a system -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Log into your backupserver. Change into the -backup directory you want to restore from. -Do `rsync -av './files/to/be/recovered/' 'sourcehost:/files/to/be/recovered/'. - -Restoring a complete system (general) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Boot the system to be rescued from a media that contains low level tools -for your OS (like partitioning, formatting) and the necessary tools -(ssh, tar or rsync). -Use -- create the necessary partition table (or however it is called - -Get a live-cd, that ships with -- rsync / tar -- ssh (d) -> from backupserver -- support for the filesystems - -Restoring a complete FreeBSD system -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Get a FreeBSD-live-cd (I used the FreeBSD 7.0 live CD, -but FreeSBIE (http://www.freesbie.org/), -Frenzy (http://frenzy.org.ua/en/) or the -FreeBSD LiveCD (http://livecd.sourceforge.net/) -may also be helpful. The following way uses the FreeBSD 7.0 -live cd. - -So boot it up, select your language. After that select -*Custom* then *Partition*. Create the slice like you want -to have it. Then let the installer write into the MBR, -select *BootMgr*. - -After that create the necessary labels, select *Label* and -make sure "Newfs" flag is set to "Y". - -Finally, select *Commit* and choose an installation type -that must fail, because we want the installer only to write -the partitions and labels, but not to install anything on it. - -At this point we have created the base for restoring the whole -system. Move back to the main menu and select *Fixit*, then -*CDROM/DVD*. This starts a shell on TTY4, which can be reached -by pressing *ALT+F4*. Then enter the following data: - --------------------------------------------------------------------------------- - rootdir=/ccollect - rootdev=/dev/ad0s1a - backupserver=192.42.23.5 - - # create destination directory - mkdir "$rootdir" - - # mount root; add other mounts if you created more labels - mount "$rootdev" "$rootdir" - - # find out which network devices exist - ifconfig - - # create the directory, because dhclient needs it - mkdir /var/db - - # retrieve an ip address - dhclient fxp0 - - # test connection - ssh "$backupserver" - - # go back - backupserver% exit --------------------------------------------------------------------------------- - -Now we've prepared everything for the real backup. The next problem maybe, -that we cannot (should not) be able to login as root to the backup server. -Additionally the system to be restored may not reachable from the backup server, -because it is behind a firewall or nat. -Thus I describe a way, that is a little bit more complicated for those, that -do not have these limitations, but works in both scenarios. - -I just start netcat on the local machine, pipe its output to tar and put -both into the background. Then I create a ssh tunnel to the backupserver, -which is then able to connect to my netcat "directly". - --------------------------------------------------------------------------------- - # user to connect to the backupserver - myuser=nico - - # our name in the backup - restorehost=server1 - - # the instance to be used - backup="weekly.20080718-2327.23053" - - # Need to setup lo0 first, the livecd did not do it for me - ifconfig lo0 127.0.0.1 up - - # change to the destination directory - cd "$rootdir" - - # start listener - ( nc -l 127.0.0.1 4242 | tar xvf - ) & - - # verify that it runs correctly - sockstat -4l - - # connect as a normal user to the backupserver - ssh -R4242:127.0.0.1:4242 "$myuser@$backupserver" - - # become root - backupserver% su - - - # change to the source directory - backupserver# cd /home/server/backup/$restorehost/$backup - - # begin the backup - backup # tar cf - . | nc 127.0.0.1 4242 - - # wait until it finishes, press ctrl-c to kill netcat - # logoff the backupserver - backupserver# exit - backupserver% exit --------------------------------------------------------------------------------- - -Now we are just right next to be finished. Still, we have to take care about -some things: - -- Do the block devices still have the same names? If not, correct /etc/fstab. -- Do the network devices still have the same names? If not, correct /etc/rc.conf. - -If everything is fixed, let us finish the restore: - --------------------------------------------------------------------------------- - # cleanly umount it - umount "$rootdir" - - # reboot, remove the cd and bootup the restored system - reboot --------------------------------------------------------------------------------- - -Restoring a complete Linux system -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Knoppix - knoppix 2 at boot prompt - - rootdir=/ccollect - dev=/dev/hda - rootdev="${dev}1" - fs=jfs - tar - - # create the needed partitions - cfdisk $dev - - mkfs.$fs $rootdev - - mkdir $rootdir - - mount $rootdev $rootdir - - cd $rootdir - - pump - ifconfig - - # start listener (from now on it is the same as - ( nc -l 127.0.0.1 4242 | tar xvf - ) & - - - -TO BE DONE - -Future ------- -I think about automating full system recoveries in the future. -I think it could be easily done and here are some hints for -people who would like to implement it. diff --git a/software/ccollect/download/ccollect-0.7.1/doc/ccollect.text b/software/ccollect/download/ccollect-0.7.1/doc/ccollect.text deleted file mode 100644 index 150803a9..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/ccollect.text +++ /dev/null @@ -1,1097 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.7.1, for ccollect 0.7.1, Initial Version from 2006-01-13 -:Author Initials: NS - - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - - -Introduction ------------- -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Supported and tested operating systems and architectures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`ccollect` was successfully tested on the following platforms: - -- GNU/Linux on amd64/hppa/i386/ppc -- FreeBSD on amd64/i386 -- NetBSD on alpha/amd64/i386/sparc/sparc64 -- OpenBSD on amd64 - -It *should* run on any Unix that supports `rsync` and has a POSIX-compatible -bourne shell. If your platform is not listed above and you have it successfully -running, please drop me a mail. - - -Why you COULD only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('Backup my notebook to the server now.'), in my opinion it is a -bad idea to backup to a remote host. - -But as more and more people requested this feature, it was implemented, -so you have the choice whether you want to use it or not. - - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall, not accessable from outside) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker sees connections from a host to the compromised -machine, she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities -~~~~~~~~~~~~~~~~~ - - -Versions 0.6 and 0.7 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `destination` changed: -- Before 0.7 it was a (link to a) directory -- As of 0.7 it is a textfile containing the destination - -You can update your configuration using `tools/config-pre-0.7-to-0.7.sh`. - -.Added 'remote_host' -- As of 0.7 it is possible to backup *to* hosts (see section remote_host below). - - -Versions 0.5 and 0.6 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `rsync_options` changed: -- Before 0.6 it was whitespace delimeted -- As of 0.6 it is newline seperated (so you can pass whitespaces to `rsync`) - -You can update your configuration using `tools/config-pre-0.6-to-0.6.sh`. - -.The name of the backup directories changed: -- Before 0.6: "date +%Y-%m-%d-%H%M" -- As of 0.6: "date +%Y%m%d-%H%M" (better readable, date is closer together) - -For the second change there is no updated needed, as XXXX- is always before -XXXXX (- comes before digit). - - - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://unix.schottelius.org/ccollect/ -# replace value for CCV with the current version -export CCV=0.7.1 - -# -# replace 'wget' with 'fetch' on bsd -# -holen=wget -"$holen" http://unix.schottelius.org/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create sample intervals -echo 2 > miniconfig/defaults/intervals/testinterval -echo 3 > miniconfig/defaults/intervals/testinterval2 - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource - -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source - -# configure ccollect to use ~/DASI as destination -echo ~/DASI > miniconfig/sources/testsource/destination - -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -echo "do the backup, twice" -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "the third time ccollect begins to remove old backups" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "Now we add another interval, ccollect should clone from existent ones" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval2 testsource - -echo "Let's see how much space we used with two backups and compare it to /bin" -du -s ~/DASI /bin - -# report success -echo "Please report success using ./tools/report_success.sh" - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of some backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://unix.schottelius.org/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. If you would -like to use the new management scripts (available since 0.6), copy -the following scripts to a directory in $PATH: - -- `tools/ccollect_add_source.sh` -- `tools/ccollect_analyse_logs.sh.sh` -- `tools/ccollect_delete_source.sh` -- `tools/ccollect_list_intervals.sh` -- `tools/ccollect_logwrapper.sh` - -After having installed and used ccollect, report success using -'./tools/report_success.sh'. - - -Configuring ------------ -For configuration aid have a look at the above mentioned tools, which can assist -you quite well. When you are successfully using `ccollect`, report success using -`tools/report_success.sh`. - - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (dash, zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) -and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, -simply use `ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files (use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is -the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -General delete_incomplete -^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`delete_incomplete`', this -option applies for all sources. See below for a longer -explanation. - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a text file containing the directory we should backup to) - -Additionally a source may have the following files: - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (`mkdir -v`, `rm -v` and `rsync -vv`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline seperated list. - - `rsync_options` extra options for `rsync`. newline seperated list. - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - - `delete_incomplete` delete incomplete backups - - `remote_host` host to backup to - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination -> /home/nico/backupdir - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a text file containing the destination directory. -`destination` *USED* to be a link to the destination directory in -earlier versions, so do not be confused if you see such examples. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/destination - /home/nico/backupdir --------------------------------------------------------------------------------- - - -Detailed description of "remote_host" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`remote_host` must be a text file containing the destination host. -If this file is existing, you are backing up your data *TO* this host -and *not* to you local host. - -*Warning*: You need to have `ssh` access to the remote host. `rsync` and -`ccollect` will connect to that host via `ssh`. `ccollect` needs the shell -access, because it needs to find out how many backups exist on the remote -host and to be able to delete them. - - -Example: --------------------------------------------------------------------------------- - [10:17] denkbrett:ccollect-0.7.0% cat conf/sources/remote1/remote_host - home.schottelius.org --------------------------------------------------------------------------------- - -It may contain all the ssh-specific values like 'myuser@yourhost.ch'. - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - -` -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Detailed description of "delete_incomplete" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `delete_incomplete` in a source specification directory, -`ccollect` will look for incomplete backups (when the whole `ccollect` process -was interrupted) and remove them. Without this file `ccollect` will only warn -the user. - - -Hints ------ - -Smart logging -~~~~~~~~~~~~~ -Since ccollect-0.6.1 you can use the ccollect-logwrapper.sh(1) for logging. -You call it the same way you call ccollect.sh and it will create a -logfile containing the output of ccollect.sh. For more information look -at the manpage 'ccollect-logwrapper'. The following is an example running -ccollect-logwrapper.sh: - --------------------------------------------------------------------------------- -u0219 ~ # ~chdscni9/ccollect-logwrapper.sh daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Starting with arguments: daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Finished. --------------------------------------------------------------------------------- - - -Using a different ssh port -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mostly easy is to use your ~/.ssh/config file: - --------------------------------------------------------------------------------- -host mx2.schottelius.org - Port 2342 --------------------------------------------------------------------------------- - -If you only use that port for backup only and normally want to use another port, -you can add 'HostName' and "HostKeyAlias" (if you also have different -keys on the different ports): - --------------------------------------------------------------------------------- -Host hhydrogenium - Hostname bruehe.schottelius.org - Port 666 - HostKeyAlias hydrogenium - -Host bruehe - Hostname bruehe.schottelius.org - Port 22 - HostKeyAlias bruehe.schottelius.org --------------------------------------------------------------------------------- - - -Using source names or interval in pre_/post_exec scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The pre-/post_exec scripts can access some internal variables from `ccollect`: - -- INTERVAL: The interval specified on the command line -- no_sources: number of sources -- source_$NUM: the name of the source -- name: the name of the currently being backuped source (not available for - generic pre_exec script) - - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a directory below the destination directory -and name it "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -It does not matter anymore how you name your directory, as `ccollect` uses -the -c option from `ls` to find out which directory to clone from. -=============================================================================== - - -[NOTE] -=============================================================================== -Older versions (pre 0.6, iirc) had a problem, if you named the first backup -something like "daily.initial". It was needed to use the "*0*" (or some -number that is lower than the current year) as extension. `ccollect` -used `sort` to find the latest backup. `ccollect` itself uses -'interval.YEARMONTHDAY-HOURMINUTE.PID'. This notation was *always* before -"daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you had a directory named "daily.initial", -`ccollect` always diffed against this backup and transfered and deleted -files which where deleted in previous backups. This means you simply -wasted resources, but your backup had beer complete anyway. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - - -Using source specific interval definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you are backing up multiple hosts via cron each night, it may be -a problem that host "big_server" may only have 4 daily backups, because -otherwise its backup device will be full. But for all other hosts -you want to keep 20 daily backups. In this case you would create -`/etc/ccollect/default/intervals/daily` containing "20" and -`/etc/ccollect/sources/big_server/intervals/daily` containing "4". - -Source specific intervals always overwrite the default values. -If you have to specify it individually for every host, because -of different requirements, you can even omit creating -`/etc/ccollect/default/intervals/daily`. - - -Comparing backups -~~~~~~~~~~~~~~~~~ -If you want to see what changed between two backups, you can use -`rsync` directly: - --------------------------------------------------------------------------------- -[12:00] u0255:ddba034.netstream.ch# rsync -n -a --delete --stats --progress daily.20080324-0313.17841/ daily.20080325-0313.31148/ --------------------------------------------------------------------------------- -This results in a listing of changes. Because we pass -n to rsync no transfer -is made (i.e. report only mode)" - -This hint was reported by Daniel Aubry. - - -Testing for host reachabilty -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you want to test whether the host you try to backup is reachable, you can use -the following script as source specific pre-exec: - --------------------------------------------------------------------------------- -#!/bin/sh -# ping -c1 -q `cat "/etc/ccollect/sources/$name/source" | cut -d"@" -f2 | cut -d":" -f1` --------------------------------------------------------------------------------- - -This prevents the deletion of old backups, if the host is not reachable. - -This hint was reported by Daniel Aubry. - - -Easy check for errors -~~~~~~~~~~~~~~~~~~~~~ -If you want to see whether there have been any errors while doing the backup, -you can run `ccollect` together with `ccollect_analyse_logs.sh`: --------------------------------------------------------------------------------- -$ ccollect | ccollect_analyse_logs.sh e --------------------------------------------------------------------------------- - - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - -If the whole `ccollect` process was interrupted, `ccollect` (since 0.6) can -detect that and remove the incomplete backups, so you can clone from a complete -backup instead - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -How can I prevent missing the right time to enter my password? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As `ccollect` first deletes the old backups, it may take some time -until `rsync` requests the password for the `ssh` session from you. - -The easiest way not to miss that point is running `ccollect` in `screen`, -which has the ability to monitor the output for activity. So as soon as -your screen beeps, after `ccollect` began to remove the last directory, -you can enter your password (have a look at screen(1), especially "C-a M" -and "C-a _", for more information). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# echo /mnt/hdbackup/local-root > destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# ln -s /mnt/hdbackup/wl6 destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# ln -s /mnt/hdbackup/windos-daten destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# echo /mnt/hdbackup/srwali03 > destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- - - -Processes running when doing ccollect -p -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Truncated output from `ps axuwwwf`: - -------------------------------------------------------------------------- - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily -p ddba034 ddba045 ddba046 ddba047 ddba049 ddna010 ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - R+ 11:40 23:40 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddba034 - S+ 11:40 0:00 | | | | | \_ ssh -l root ddba034.netstream.ch rsync --server --sender -vlogDtprR --numeric-ids . / - S+ 11:41 0:11 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddb - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba034\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba045/destination/daily.2006-10-19-1807.6934 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba045\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba046/destination/daily.2006-10-19-1810.7072 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba046\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba047/destination/daily.2006-10-19-1816.7268 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba047\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - D+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba049/destination/daily.2006-10-19-1821.7504 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba049\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddna010/destination/daily.2006-10-19-1805.6849 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddna010\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - R+ 12:08 0:00 | | | | \_ rm -rf /etc/ccollect/sources/ddna011/destination/daily.2006-10-20-1502.7824 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ sed s:^:\[ddna011\] : - -------------------------------------------------------------------------- -As you can see, six processes are deleting old backups, while one backup -(ddba034) is already copying data. diff --git a/software/ccollect/download/ccollect-0.7.1/doc/changes/0.7.1 b/software/ccollect/download/ccollect-0.7.1/doc/changes/0.7.1 deleted file mode 100644 index adf9ff43..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/changes/0.7.1 +++ /dev/null @@ -1,9 +0,0 @@ -* Added support for global delete_incomplete option -* Updated tools/ccollect_analyse_logs.sh: Added more error strings to find -* Removed use of 'basename': Replaced it with standard variables from cconf -* Updated documentation - * More hints - * Updated remote_host description -* Bugfix in shell artihmetic (Jeroen Bruijning) -* Bugfix: Allow "&" in sourcename (Reported by Tiziano Müller) -* Added ccollect_list_intervals.sh to list intervals with values diff --git a/software/ccollect/download/ccollect-0.7.1/doc/changes/pre-0.7.1 b/software/ccollect/download/ccollect-0.7.1/doc/changes/pre-0.7.1 deleted file mode 100644 index 2c3f5228..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/changes/pre-0.7.1 +++ /dev/null @@ -1,100 +0,0 @@ -0.6.2 to 0.7.0: - * Added tools/report_success.sh (try it out!) - * Added ccollect_analyse_logs.sh (see ccollect_analyse_logs(1)) - * Add capability to backup to a host - - Also updated documentation - * Changed "destination" format - - Use tools/config-pre-0.7-to-0.7.sh to convert pre 0.7.x configurations - * Renamed all tools to begin with "ccollect_" - * Updated ccollect_add_source.sh and added manpage - * Updated todos - * Changed license to GPLv3 (from GPLv2) - - -0.6.1 to 0.6.2: - * Added analyse-ccollect-logs.sh - * Fixed bug: Removing of backups was broken since update to 0.6 - (forgot to prepend path...) - * Fixed bug: The marker was always deleted, because rsync deleted it. - Create it outside of the backup destination now. - -0.6 to 0.6.1: - * Added check for destination_base in add_ccollect_source.sh - * Added support for -V and --version - * Added ccollect-logwrapper.sh (and a manpage ;-) - * Changed behaviour: ccollect now clones from the latest existing backup, - independent of the interval. This way different intervals do not - diverge. ccollect uses ls -c to determine latest backup. - -0.5.2 to 0.6: - * Always print return code of rsync - * Add much more timing information - * One option per line in rsync_options now (NOT space seperated) - * Added --sparse as default option - * Added management tools (including manpages): - * add_ccollect_source.sh - * delete_ccollect_source.sh - * list_ccollect_intervals.sh - * Cleaned up exit calls (now always cleanly removes temporary files) - * In theory, added pdf documentation (though, was unable to do it with fop) - * Changed license to GPLv3 (from GPLv2) - -0.5.1 to 0.5.2: - * Display correct error code, if rsync returns non-zero - * Unify messages - * Remove some potential quoting problems - -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.7.1/doc/gpl3-header b/software/ccollect/download/ccollect-0.7.1/doc/gpl3-header deleted file mode 100644 index 5a1663dc..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/gpl3-header +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# diff --git a/software/ccollect/download/ccollect-0.7.1/doc/logwrapper.text b/software/ccollect/download/ccollect-0.7.1/doc/logwrapper.text deleted file mode 100644 index ec12db48..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/logwrapper.text +++ /dev/null @@ -1,29 +0,0 @@ -ccollect-logwrapper: Logging backup output -=========================================== -Nico Schottelius -0.1, for ccollect-logwrapper 0.1, Initial Version from 2007-06-08 -:Author Initials: NS - -This wrapper makes it easy to have logs of ccollect output. - - -Introduction ------------- -/etc/ccollect/logwrapper/ (also uses $CCOLLECT_CONF). - - - pipe: will pipe to a program - staticfile: link to a file - datefile: - contains a string that is passed to date that returns - dynamicfile: - is a program, that returns some string that we use as - a filename - syslog: - syslog-facility - syslog-level - only-stderr: - omit stdout output - -The logger will output to which destinations it logs and with which -parameters it was started. diff --git a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect.text deleted file mode 100644 index d824717c..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect.text +++ /dev/null @@ -1,61 +0,0 @@ -ccollect(1) -=========== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the manual titled -"ccollect - Installing, Configuring and Using" (available as text (asciidoc), -texinfo or html). - - -OPTIONS -------- --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - - -SEE ALSO --------- -ccollect_add_source(1), ccollect_analyse_logs(1), ccollect_logwrapper(1) -ccollect_delete_source(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_add_source.text b/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_add_source.text deleted file mode 100644 index 25e58a37..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_add_source.text +++ /dev/null @@ -1,75 +0,0 @@ -ccollect_add_source(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect_add_source - create new source for ccollect(1) - - -SYNOPSIS --------- - -'ccollect_add_source.sh' - - -DESCRIPTION ------------ -ccollect_add_source.sh creates a new backup source for use with ccollect(1). -It copies the files from to the source directory with the hostname below -'$CCOLLECT_CONF/sources'. It is designed to run on a backup server to create -new directories for new hosts. - - -FILES ------ -$CCOLLECT_CONF/defaults/sources:: - Main configuration directory. $CCOLLECT_CONF is '/etc/ccollect', if unset. - All the following files reside below this directory. - -exclude:: -summary:: -intervals:: -pre_exec:: -post_exec:: -rsync_options:: -verbose:: -very_verbose:: - Those are the standard configuration files known by ccollect(1). - If the file exist it will be copied to the newly created source. - Directories ('intervals') are copied recursively. - -destination_base:: - A link to the directory where to store the backups. Below this directory - `ccollect_add_source.sh` will create a directory with the hostname you - specified on the command line. A common valua for `destination_base` is - '/home/server/backup'. - -source_prefix:: -source_postfix:: - `source_prefix` is put before the hostname, `source_postfix` is appended - after it. A common value for `source_prefix` maybe 'root@' and ':/' - for `source_postfix`. - - -SEE ALSO --------- -ccollect(1), ccollect_analyse_logs.sh, ccollect_delete_source(1), -ccollect_list_intervals(1), ccollect_logwrapper(1), - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_analyse_logs.text b/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_analyse_logs.text deleted file mode 100644 index 26380142..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_analyse_logs.text +++ /dev/null @@ -1,56 +0,0 @@ -ccollect_analyse_logs(1) -======================== -Nico Schottelius - - -NAME ----- -ccollect_analyse_logs - analyse logs produced by ccollect(1) - - -SYNOPSIS --------- - -'ccollect_analyse_logs.sh' [iwe] - - -DESCRIPTION ------------ -ccollect_analyse_logs.sh reads the logfiles from stdin. You have to specify -at least one of the three loglevels (*i*nformational, *w*arning, *e*rror). Any -combination of them is allowed. - - -FILES ------ -ccollect log files:: - Are read from stdin - -EXAMPLES --------- -cat /var/log/ccollect/single/* | ccollect_analyse_logs.sh iw:: - Displays warnings and informational parts -ccollect_analyse_logs.sh iw < /var/log/ccollect/all_together:: - Displays only error messages (useful for the morning mail) - - -SEE ALSO --------- -ccollect(1), ccollect_add_source.sh, ccollect_delete_source(1), -ccollect_list_intervals(1), ccollect_logwrapper(1), - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_delete_source.text b/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_delete_source.text deleted file mode 100644 index 96562713..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_delete_source.text +++ /dev/null @@ -1,57 +0,0 @@ -ccollect_delete_source(1) -========================= -Nico Schottelius - - -NAME ----- -ccollect_delete_source - delete sources from ccollect(1) - - -SYNOPSIS --------- -'ccollect_delete_source.sh' [-d] [-f] - - -DESCRIPTION ------------ -ccollect_delete_source.sh deletes backup sources from ccollect(1) and optional -also the backups created for that source. - - -OPTIONS -------- --d: - Delete also the destination directory. `add_ccollect_source.sh` will change - to the source/'name'/destination directory, get the absolute name and delete - it recursively. --f: - Force deletion. Do not ask. Very handy for people who know what they do. - Very dangerous for everyone else. - - -FILES ------ -$CCOLLECT_CONF/sources:: - Directory containing the sources. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -ccollect(1), ccollect_add_source(1), ccollect_add_source(1), -ccollect_logwrapper(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_list_intervals.text b/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_list_intervals.text deleted file mode 100644 index 051b087c..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_list_intervals.text +++ /dev/null @@ -1,48 +0,0 @@ -ccollect_list_intervals(1) -========================== -Nico Schottelius - - -NAME ----- -ccollect_list_intervals - list available intervals from ccollect(1) - - -SYNOPSIS --------- -'ccollect_list_intervals.sh' - - -DESCRIPTION ------------ -ccollect_list_intervals.sh shows intervals specified in the configuration -for ccollect(1). It displays the name of each interval, followed by a colon -followed by the number backups to keep. - - -FILES ------ -$CCOLLECT_CONF/intervals:: - Directory containing the intervals. $CCOLLECT_CONF is '/etc/ccollect', if unset. - - -SEE ALSO --------- -collect(1), ccollect_add_source(1), ccollect_analyse_logs(1), -ccollect_delete_source(1), ccollect_logwrapper(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_logwrapper.text b/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_logwrapper.text deleted file mode 100644 index ce1c5f62..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/man/ccollect_logwrapper.text +++ /dev/null @@ -1,56 +0,0 @@ -ccollect_logwrapper(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect_logwrapper - start ccollect(1) and create a unique logfile - - -SYNOPSIS --------- -'ccollect_logwrapper.sh' - - -DESCRIPTION ------------ -ccollect_logwrapper.sh creates a unique logfile below -'$CCOLLECT_CONF/logwrapper' and redirects ccollect(1) output -(stdout and stderr) to it. - - -OPTIONS -------- -Options are passed directly to ccollect(1). - - -FILES ------ -$CCOLLECT_CONF/logwrapper:: - Directory containing the configuration. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -$CCOLLECT_CONF/logwrapper/destination:: - Link to the destination directory for the logfiles - - -SEE ALSO --------- -ccollect(1), ccollect_add_source(1), ccollect_analyse_logs(1), -ccollect_delete_source(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://unix.schottelius.org/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.7.1/doc/release-checklist b/software/ccollect/download/ccollect-0.7.1/doc/release-checklist deleted file mode 100644 index 7cba30cd..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version and date in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.2 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.2 deleted file mode 100644 index 0c1c2250..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.2 +++ /dev/null @@ -1,4 +0,0 @@ -x Fix $? problem -x Check last dir searching -x Check count generation -x Check general functionality (remove testing) diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.3 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.3 deleted file mode 100644 index 00195812..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.3 +++ /dev/null @@ -1,34 +0,0 @@ -Done: -==> screenshot -u0219 zrha166.netstream.ch # ~chdscni9/ccollect.sh weekly zrha166.netstream.ch -2007-08-16-21:49:44: ccollect 0.6: Beginning backup using interval weekly -[zrha166.netstream.ch] 2007-08-16-21:49:44: Beginning to backup -[zrha166.netstream.ch] 2007-08-16-21:49:45: Existing backups: 0 Total keeping backups: 8 -[zrha166.netstream.ch] 2007-08-16-21:49:45: Did not find existing backups for interval weekly. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Using backup from daily. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Beginning to backup, this may take some time... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Creating /etc/ccollect/sources/zrha166.netstream.ch/destination/weekly.20070816-2149.22188 ... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Transferring files... - -- beep-after-delete-hack? - -> tonnerre / #cLinux - -- replace nico-linux-ccollect with nico-ccollect - * ccollect is not Linux specific - -- remove exit-calls - * will leave behind unused temporary file! - * use _exit_err - -X join todos - -- fix possible quoting problems - * rsync_extra (redefine format) - * exclude - * other - * create _rsync, filtering args, creating new $@ - -- check and export variables for use in scripts! - -Contact Julian later: - * integrate updated german documentation diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.3.tonnerre b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.3.tonnerre deleted file mode 100644 index 4e7b7db5..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.5.3.tonnerre +++ /dev/null @@ -1,11 +0,0 @@ -NetBSD/i386,amd64,sparc,sparc64 - -13:13 < Tonnerre> telmich, die kleine wä, 2 Variablen aus $(CCOLLECT) zu - machen -13:13 < Tonnerre> telmich, eine fü Sourcepfad und eine fü -Destinationfpad -13:13 < Tonnerre> pfa -13:13 < Tonnerre> d -13:14 < Tonnerre> telmich, die gröre wä die $() durch ${} zu ersetzen, so -dass der Kram auch mit !GNU-Make geht - diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6 deleted file mode 100644 index ee8e97fd..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6 +++ /dev/null @@ -1,63 +0,0 @@ -not did, did not remember why I wanted to do that: - -- do sed-time check: - -1.2. replace sed? -compare timing: -_echo () { echo "$name $msg" } -and create -_techo () { echo "$timestamp $name $msg" } -perhaps create -_eecho () { _techo "ERROR $msg" } -? - - - -done: -add note for - 09:24 < telmich> Obri: ~/.ssh/config! - -- implement use of different intervals as source for cloning - * use 'woechentlich' if available and no backup exists for 'daily' - * add 'prefer_latest' to prefer different interval, that's newer than - ours - * or add 'prefer_same_interval' instead? -- implement detection of partial backups -3. detect unfinished backups -sven / markierung - - wie seht der Marker aus? - -> .ccollect-YEAR-MM-DD.HHmm.pid (like the directory) - --> assume incomplete, when we did not finish. - --> means it's complete,when rsync was successful ----> partial implemented in 0.5.2 (commented out) -- do not check by name, but by time - * is ls -t posix? - * also check: -p -1 -- ccollect Zeitausgabe verbessern - - Wofuer wie lange gebraucht - * rm - * klonen (gibt es so ja nicht) - Wenn Summary angegeben ist am Ende ausgeben -- do we want rsync -H by default? - * no: takes much more memory -ssh / port change: - change rsync_extra format -- Variables: - source_$n - no_sources - name -- changed naming of sources: - YYYYMMDD-HHMM.PID (better readable) - => source / backup converter! => not needed! -config: - set destination-base - /etc/ccollect/defaults/source_config - -Documentation: -- hint: backuping backup -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- delete_incomplete - diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6.1 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6.1 deleted file mode 100644 index 99a17eba..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6.1 +++ /dev/null @@ -1,23 +0,0 @@ -- Add filter support - * filter -- add source/ignore_failed_pre_exec -- add source/ignore_failed_post_exec -- do not delete_incomplete, when there's only one backup left! -- .ccollect-marker is deleted by rsync at the beginning! - - fix marking -- add logwrapper -- add loganalyser - speedup is - error codes - vanished files (see netstream)!!! - -Done: -- Improve finding backup from another interval: - o strip of interval name - o run sort -n - o use the last entry -- add --version, -V - -not needed: -- think about 'prefer_same_interval' / 'prefer_latest' - diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6.2 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6.2 deleted file mode 100644 index 05798ffd..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.6.2 +++ /dev/null @@ -1 +0,0 @@ -- fix delete_incomplete marker diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.1 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.1 deleted file mode 100644 index 49df1545..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.1 +++ /dev/null @@ -1,35 +0,0 @@ - - --------------------------------------------------------------------------------- -done: -- tools in makefile -14:15 also alle tools/ccollect_* -14:15 mach mal n besseres Makefile :) -14:15 hatte die extra deswegen umbenannt -14:15 nehme ich mal als hinweis für 0.7.1 - - -- add global delete_incomplete (/etc/ccollect/defaults/delete_incomplete) - -09:31 < Obri> telmich: hab nen kleinen tipp für ccollect -09:32 < Obri> telmich: ich habe hier hosts die nicht immer online sind, das ist dumm weil so das backup - kaputtgeht... -09:32 < Obri> telmich: ich habe jetzt das ein preexec script gebastelt: -09:32 < Obri> ping -c1 -q `cat /etc/ccollect/sources/$name/source | cut -d"@" -f2 | cut -d":" -f1` -09:33 < Obri> telmich: so bricht das backup ab wenn der host nicht erreichbar ist -09:33 < Obri> ohne dass ein altes backup entsorgt wird - - -- remove basename - -> include config from cconf! -> standard! - -reject: --------------------------------------------------------------------------------- -- fix german documentation! - => I'm the coder, somebody else can fix it. -- add wrapper, to do logging and analyse - * output filename in the wrapper, save into variable - => mktemp - * call analyser - => output stdout? - => no use for that currently diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.2 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.2 deleted file mode 100644 index 79a50aa2..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.2 +++ /dev/null @@ -1,63 +0,0 @@ --------------------------------------------------------------------------------- -Stats version --------------------------------------------------------------------------------- - -Add tools/ccollect_stats.sh, clearify license --------------------------------------------------------------------------------- -Preamble: - Netstream (www.netstream.ch) may consider using ccollect for backing up many - unix servers and needs some clean reporting. The following things - need to be done, so ccollect will be useful for netstream: - -Logger: - - Needs to write small mails (sysadmins don't have time to read mails) - - Needs to be able to only write a mail on error - * needs configuration option to also mail on warnings - - Should be able to send one mail per backup source - * or one for the whole backup job - -Messages: (to be used for filtering) - Errors: - Read from remote host .*: Connection timed out - - Warnings: - rsync: mknod .* failed: Invalid argument (22) - file has vanished: ".*" - --------------------------------------------------------------------------------- - -Analyzer: - - grosse Dateien - - grosse Veraenderungen --------------------------------------------------------------------------------- -exclude-lists-doku: -freebsd: - /usr/ports/* - /proc/* - /dev/* - /tmp/* - /var/tmp/* -linux: - /sys/* - /proc/* - /dev/* - /tmp/* - --------------------------------------------------------------------------------- -done: - -rsync_extra global! -- \n delimeted --------------------------------------------------------------------------------- - -S, --sparse - Try to handle sparse files efficiently so they take up less space on the des‐ - tination. Conflicts with --inplace because it’s not possible to overwrite - data in a sparse fashion. - --------------------------------------------------------------------------------- - Always report return code! - -[12:00] u0255:ddba034.netstream.ch# rsync -n -a --delete --stats --progress daily.20080324-0313.17841/ daily.20080325-0313.31148/ - -$tool - diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.3 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.3 deleted file mode 100644 index 73e5ffc6..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.3 +++ /dev/null @@ -1,2 +0,0 @@ -- add -a (archive) to ccollect_delete_source.text -- add listing of intervals to ccollect_list_intervals diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.4 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.4 deleted file mode 100644 index 70515e76..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.7.4 +++ /dev/null @@ -1 +0,0 @@ -add support for wipe diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.8.0 b/software/ccollect/download/ccollect-0.7.1/doc/todo/0.8.0 deleted file mode 100644 index 2b5130dc..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/0.8.0 +++ /dev/null @@ -1,6 +0,0 @@ -- restructure code to easily allow global versus source options: - f_name=.... - check_option $f_name - => source - => defaults -- support all senseful options as default and source specific diff --git a/software/ccollect/download/ccollect-0.7.1/doc/todo/extern b/software/ccollect/download/ccollect-0.7.1/doc/todo/extern deleted file mode 100644 index 9be8f2be..00000000 --- a/software/ccollect/download/ccollect-0.7.1/doc/todo/extern +++ /dev/null @@ -1,23 +0,0 @@ -These todos are things that would be senseful todo, but are just nice -to have. This means I won't code them, so somebody can code them. --------------------------------------------------------------------------------- - -- Add ccollect-restore.sh - (new project, perhaps coordinated with jchome's ccollect-config) - - Helper (in dialog?) to restore backups - - Perhaps create ccollect-gui.{whatever} instead, which does all the - end user staff? - - Including cronjob, creating configuration, displaying status of - backups, allowing manual remove, allowing manual trigger of ccollect - (with realtime message window?)? - -- write mkccollectconfig (for 0.5!) - -> jchome works on it! - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based diff --git a/software/ccollect/download/ccollect-0.7.1/release.sh b/software/ccollect/download/ccollect-0.7.1/release.sh deleted file mode 100644 index 976a5c4b..00000000 --- a/software/ccollect/download/ccollect-0.7.1/release.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# -# 200?-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Standard release script for dummies like me -# - -if [ $# -ne 2 ]; then - echo "$0: version description" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -VERSION="$1"; shift -DESCRIPTION="$1"; shift -NAME=ccollect-${VERSION} -TARNAME=${NAME}.tar.bz2 -TARLOCAL=../${TARNAME} -DHOST=nico@home.schottelius.org -DDIR=www/unix.schottelius.org/www/ccollect/ -DESTINATION="$DHOST:$DDIR" - -set -e -set -x -git tag -m "$DESCRIPTION" "$VERSION" -git push --mirror -git archive --prefix="${NAME}/" "$VERSION" | bzip2 > "$TARLOCAL" -scp "${TARLOCAL}" "$DESTINATION" - -# create & publish documentation for the end user -make publish-doc - - -ssh "$DHOST" "( cd "$DDIR" &&; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd "$DDIR" && find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd "$DDIR" &&; find -type f -exec chmod 0644 {} \; )" - -cat "doc/release-checklist" -exit 0 diff --git a/software/ccollect/download/ccollect-0.7.1/tools/README b/software/ccollect/download/ccollect-0.7.1/tools/README deleted file mode 100644 index 73120184..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/README +++ /dev/null @@ -1,19 +0,0 @@ -Files and their tasks / destinations: - -ccollect_add_source.sh: bin -ccollect_analyse_logs.sh: bin -ccollect_create_source2.sh: ??? -ccollect_create_source.sh: ??? -ccollect_delete_source.sh: bin -ccollect_list_intervals.sh: bin -ccollect_logwrapper.sh: bin -ccollect-stats.sh: ??? -config-pre-0.4-to-0.4.BUGS: only to be used for converting -config-pre-0.4-to-0.4.sh: only to be used for converting -config-pre-0.4-to-0.4.sub.sh: only to be used for converting -config-pre-0.6-to-0.6.sh: only to be used for converting -config-pre-0.6-to-0.6.sub.sh: only to be used for converting -config-pre-0.7-to-0.7.sh: only to be used for converting -config-pre-0.7-to-0.7.sub.sh: only to be used for converting -gnu-du-backup-size-compare.sh -README diff --git a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_add_source.sh b/software/ccollect/download/ccollect-0.7.1/tools/ccollect_add_source.sh deleted file mode 100644 index 4a60d383..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_add_source.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# 2007-08-16: Written for Netstream (www.netstream.ch) -# -# Creates a source from standard values specified in -# /etc/ccollect/defaults/sources -# - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -SCONFIG="${CDEFAULTS}/sources" - -# standard options: variable2filename -exclude="exclude" -summary="summary" -intervals="intervals" -pre_exec="pre_exec" -post_exec="post_exec" -rsync_options="rsync_options" -verbose="verbose" -very_verbose="very_verbose" - -# options that we simply copy over -standard_opts="exclude summary intervals pre_exec post_exec rsync_options verbose very_verbose" - -# options not in standard ccollect, used only for source generation -src_prefix="${SCONFIG}/source_prefix" -src_postfix="${SCONFIG}/source_postfix" -destination_base="${SCONFIG}/destination_base" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _exit_err "" -fi - -_echo "Reading defaults from ${SCONFIG} ..." - -while [ $# -gt 0 ]; do - source="$1"; shift - - # Create - _echo "Creating ${source} ..." - - fullname="${CSOURCES}/${source}" - - # create source - if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Skipping." - continue - fi - mkdir -p "${fullname}" || _exit_err Cannot create \"${fullname}\". - - # copy standard files - for file in $standard_opts; do - eval rfile=\"\$$file\" - eval filename="${SCONFIG}/${rfile}" - if [ -e "${filename}" ]; then - _echo Copying \"$rfile\" to ${fullname} ... - cp -r "${filename}" "${fullname}/${rfile}" - fi - done - - # create source entry - if [ -f "${src_prefix}" ]; then - source_source="$(cat "${src_prefix}")" || _exit_err "${src_prefix}: Reading failed." - fi - source_source="${source_source}${source}" - if [ -f "${src_postfix}" ]; then - source_source="${source_source}$(cat "${src_postfix}")" || _exit_err "${src_postfix}: Reading failed." - fi - _echo "Adding \"${source_source}\" as source for ${source}" - echo "${source_source}" > "${fullname}/source" || _exit_err "Creating ${fullname}/source: failed." - - # create destination directory - absbase=$(cd "${destination_base}" 2>/dev/null && pwd -P) || \ - _exit_err "${destination_base} must exist before creating sources." - - dest="${absbase}/${source}" - _echo "Creating ${dest} ..." - mkdir -p "${dest}" || _exit_err "${dest}: Cannot create." - - # link destination directory - dest_abs=$(cd "${dest}" && pwd -P) || _exit_err "${dest}: Changing to newly created directory failed." - echo "${dest_abs}" > "${fullname}/destination" || \ - _exit_err "${fullname}/destination: Failed to create." - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_analyse_logs.sh b/software/ccollect/download/ccollect-0.7.1/tools/ccollect_analyse_logs.sh deleted file mode 100644 index 7ff9916b..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_analyse_logs.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written for Netstream (www.netstream.ch) on Di 21. Aug 17:10:15 CEST 2007 -# -# Analyse logs -# - -version=0.2 -date=2008-06-13 -fullversion="${version} (${date})" -args=iwe - -usage() { - echo "$(basename "$0") ${fullversion}: [iwe]" - echo "" - echo " i: print informational messages" - echo " w: print warning messages" - echo " e: print error messages" - echo "" - echo "Reading input from stdin, displaying to stdout." - exit 1 -} - -# -# read and verify argv -# -if [ "$#" -ne 1 ]; then - usage -fi -argv="$1"; shift - -wrong="$(echo ${argv} | grep -e "[^${args}]")" -if [ "${wrong}" ]; then - usage -fi - - -# set output levels -search_err="$(echo ${argv} | grep 'e')" -search_warn="$(echo ${argv} | grep 'w')" -search_info="$(echo ${argv} | grep 'i')" - -# -# Interesting strings in the logs: errors -# --------------------------------------- - -if [ "$search_err" ]; then - set -- "$@" "-e" 'Read from remote host .*: Connection timed out$' - set -- "$@" "-e" 'Read from remote host .*: Connection reset by peer$' - set -- "$@" "-e" 'rsync: .*: Invalid argument (22)$' - set -- "$@" "-e" 'rsync: .*: Input/output error (5)$' - set -- "$@" "-e" 'cannot send long-named file "' - set -- "$@" "-e" 'ERROR: .* failed verification -- update discarded.$' - set -- "$@" "-e" 'Host key verification failed.' - set -- "$@" "-e" 'ssh: connect to host .*: Connection timed out' - set -- "$@" "-e" 'rsync error: unexplained error (code 255)' - set -- "$@" "-e" 'rsync: connection unexpectedly closed' -fi - -# known error strings: -#[ddba049.netstream.ch] receiving file list ... rsync: readdir("/proc"): Invalid argument (22) -#[ddba033.netstream.ch] rsync: readlink "/usr/local/inetpub2/webmailroot/2wire.ch/royal@2wire.ch" failed: Input/output error (5) -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) -#[zrha165.netstream.ch] Read from remote host zrha165.netstream.ch: Connection reset by peer -#[ddba017.netstream.ch] receiving file list ... cannot send long-named file "/usr/local/www/apache22/cgi-bin/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/bac kup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup /backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ba ckup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backu p/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/back" -#[ddba033.netstream.ch] ERROR: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded. -# [ddba034.netstream.ch] Host key verification failed. -# [ddba034.netstream.ch] rsync error: unexplained error (code 255) at io.c(454) [receiver=2.6.9] -# [ddba034.netstream.ch] rsync: connection unexpectedly closed (0 bytes received so far) [receiver] - - - - -# -# Interesting strings in the logs: warnings -# ----------------------------------------- -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) - -# [ddba015.netstream.ch] send_files failed to open /usr/local/dnscache/log/main/@4000000046ca0f3616939c14.s: No such file or directory -# [ddba015.netstream.ch] 2007-08-21-02:17:28: Finished backup (rsync return code: 23). -# [ddba017.netstream.ch] file has vanished: "/var/spool/postfix/active/657575D686" -#[ddba026.netstream.ch] 2007-08-21-05:35:13: Finished backup (rsync return code: 24). -#[ddba045.netstream.ch] send_files failed to open /data/hsphere/local/var/named/logs/@4000000046c98fa9079f39ac.s: No such file or directory -# file has vanished: ".*" - -if [ "$search_warn" ]; then - # warn on non-zero exit code - set -- "$@" "-e" 'Finished backup (rsync return code: [^0]' - set -- "$@" "-e" 'WARNING: .* failed verification -- update discarded (will try again).' -fi -# known warnings: -#[ddba033.netstream.ch] WARNING: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded (will try again). - - -# -# Interesting strings in the logs: informational -# ---------------------------------------------- -if [ "$search_info" ]; then - set -- "$@" "-e" 'total size is [[:digit:]]* speedup is' - set -- "$@" "-e" 'Backup lasted: [[:digit:]]*:[[:digit:]]\{1,2\}:[[:digit:]]* (h:m:s)$' - set -- "$@" "-e" 'send [[:digit:]]* bytes received [0-9]* bytes [0-9]* bytes/sec$' -fi - -# info includes: -#[ddba012.netstream.ch] total size is 22384627486 speedup is 13.75 -# [u0160.nshq.ch.netstream.com] 2007-08-20-18:26:06: Backup lasted: 0:43:34 (h:m:s) -#[ddba012.netstream.ch] sent 3303866 bytes received 1624630525 bytes 122700.92 bytes/sec - -grep "$@" diff --git a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_check_config.sh b/software/ccollect/download/ccollect-0.7.1/tools/ccollect_check_config.sh deleted file mode 100644 index c24a4006..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_check_config.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# - -################################################################################ -# standard vars stolen from cconf -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - - -################################################################################ -# ccollect standard vars -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -CLOGDIR="${CDEFAULTS}/logdir" -CRONTAB="${CRONTAB:-/etc/crontab}" - -# Parameters: -# -c, --crontab -# -f, --fix -# -l, --logs - - diff --git a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_delete_source.sh b/software/ccollect/download/ccollect-0.7.1/tools/ccollect_delete_source.sh deleted file mode 100644 index 636ce673..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_delete_source.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# 2007-08-16 Written for Netstream (www.netstream.ch) -# Delete sources and their backups (optionally). -# - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _echo "${self} [-f] [-d] " - _echo " -f: Do not ask, simply delete. Dangerous and good for sysadmins." - _echo " -d: Also delete the destination (removes all backups)" - _exit_err "Exiting." -fi - -params_possible=yes -force="" -backups="" - -while [ $# -gt 0 ]; do - if [ "$params_possible" ]; then - case "$1" in - "-f"|"--force") - force="-r" - shift; continue - ;; - "-d"|"--destination") - backups=yes - shift; continue - ;; - --) - params_possible="" - shift; continue - ;; - -*|--*) - _exit_err "Unknown option: $1" - ;; - esac - - fi - - # Reached here? So there are no more parameters. - params_possible="" - - source="$1"; shift - - # Create - _echo "Deleting ${source} ..." - fullname="${CSOURCES}/${source}" - - # ask the user per source, if she's not forcing us - if [ -z "$force" ]; then - sure="" - echo -n "Do you really want to delete ${source} (y/n)? " - read sure - - if [ "$sure" != "y" ]; then - _echo "Skipping ${source}." - continue - fi - fi - - if [ "$backups" ]; then - ddir="$(cat "${fullname}/destination")" - addir="$(cd && pwd -P)" || _exit_err "Cannot change to ${ddir}" - _echo "Deleting ${addir} ..." - rm -r $force "${addir}" - fi - - _echo "Deleting ${fullname} ..." - rm -r $force "${fullname}" -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_list_intervals.sh b/software/ccollect/download/ccollect-0.7.1/tools/ccollect_list_intervals.sh deleted file mode 100644 index d95bbde7..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_list_intervals.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written on 24-Jun-2006 -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -me="$(basename $0)" - -_echo() -{ - echo "$me> $@" -} - -if [ ! -d "${CCOLLECT_INTERVALS}" ]; then - _echo "No intervals defined in ${CCOLLECT_INTERVALS}" - exit 1 -fi - -set -e -cd "${CCOLLECT_INTERVALS}" - -for interval in *; do - eval int_${interval}=$(cat "${interval}"); - eval echo ${interval}: \$int_${interval}; -done diff --git a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_logwrapper.sh b/software/ccollect/download/ccollect-0.7.1/tools/ccollect_logwrapper.sh deleted file mode 100644 index ac7f4961..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_logwrapper.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written for Netstream (www.netstream.ch) on Fr 8. Jun 10:30:24 CEST 2007 -# -# Call the log-wrapper instead of ccollect.sh and it will create nice logs -# - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -LOGCONF=$CCOLLECT_CONF/logwrapper - -logdir="${LOGCONF}/destination" -CDATE="date +%Y%m%d-%H%M" -we="$(basename $0)" -pid=$$ - -export ccollect_logfile="${logdir}/$(${CDATE}).${pid}" - -# use syslog normally -# Also use echo, can be redirected with > /dev/null if someone cares -_echo() -{ - string="${we} (${pid}): $@" - logger "${string}" - echo "${string}" -} - - -# exit on error -_exit_err() -{ - _echo "$@" >&2 - rm -f "${TMP}" - exit 1 -} - -# put everything into that specified file -_echo "Starting with arguments: $@" -touch "${ccollect_logfile}" || _exit_err "Failed to create ${ccollect_logfile}" - -# First line in the logfile is always the commandline -echo ccollect.sh "$@" > "${ccollect_logfile}" 2>&1 -ccollect.sh "$@" >> "${ccollect_logfile}" 2>&1 - -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_stats.sh b/software/ccollect/download/ccollect-0.7.1/tools/ccollect_stats.sh deleted file mode 100644 index bfaefab8..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/ccollect_stats.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2007 Daniel Aubry -# 2008 Nico Schottelius (added minimal header) -# -# Copying license: GPL2-only -# - -# TODO: -# add variables, add copying, add configuration - -if [ ! -e /tmp/ccollect-stats.lock ] -then - touch /tmp/ccollect-stats.lock - - # changes after license clearify - # for dest in /etc/ccollect/sources/ -type f -name destination | while read line - - find /etc/ccollect/sources/ -type l | while read line - d=$(basename $(readlink $line)) - echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log - du -sh $line/* | tee -a /var/log/backup.log - done - rm /tmp/ccollect-stats.lock -fi diff --git a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 23b3307e..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index e28e7184..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.6-to-0.6.sh b/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.6-to-0.6.sh deleted file mode 100644 index 58a538ae..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.6-to-0.6.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 20070816-2225 -# Transfer configuration to 0.6 layout -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -type f -name rsync_options -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.6-to-0.6.sub.sh b/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.6-to-0.6.sub.sh deleted file mode 100644 index 7744f9eb..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.6-to-0.6.sub.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 20070816-2227 -# Transfer configuration to 0.6 layout (subscript) -# - -if [ $# -ne 1 ]; then - echo "$0: rsync_options file" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) - -echo "Working on $1 ..." - -for option in $(cat "$1"); do - echo "${option}" >> "${tmp}" -done -mv ${tmp} "$1" diff --git a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.7-to-0.7.sh b/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.7-to-0.7.sh deleted file mode 100644 index 6d540abb..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.7-to-0.7.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Convert configuration to 0.7 layout -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.7 configuration directories to match 0.7 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -name destination -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.7-to-0.7.sub.sh b/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.7-to-0.7.sub.sh deleted file mode 100644 index 5bc6f759..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/config-pre-0.7-to-0.7.sub.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Helper script -# - -if [ $# -ne 1 ]; then - echo "$0: destination-file" - echo "" - echo " Fix pre 0.7 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) -file="$1" - -echo "Working on $file ..." - -if [ -L "${file}" ]; then - echo "Converting ${file} ..." - dir="$(cd "${file}" && pwd -P)"; ret=$? - - if [ $ret -ne 0 ]; then - echo "ERROR: $file is a broken link" - exit 1 - else - echo "${dir}" > "${tmp}" - rm -f "${file}"; ret=$? - if [ $ret -ne 0 ]; then - echo "ERROR: Removing $file failed" - exit 1 - fi - mv "${tmp}" "${file}"; ret=$? - if [ $ret -ne 0 ]; then - echo "ERROR: Moving ${tmp} to ${file} failed, your source is broken." - exit 1 - fi - fi -else - echo "$file is not a link, not converting" - exit 1 -fi diff --git a/software/ccollect/download/ccollect-0.7.1/tools/gnu-du-backup-size-compare.sh b/software/ccollect/download/ccollect-0.7.1/tools/gnu-du-backup-size-compare.sh deleted file mode 100644 index cf3b1948..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/gnu-du-backup-size-compare.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 2007-08-16 -# - -exit 1 -# not yet finished. - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_SOURCES="$CCOLLECT_CONF/defaults/sources" - -me="$(basename "$0")" - -if [ $# -lt 1 ]; then - echo "${me}: sources names - exit 1 -fi - -if [ ! -d "$CCOLLECT_SOURCES" ]; then - echo "No sources defined in $CCOLLECT_SOURCES" - exit 1 -fi - -cd "${CCOLLECT_SOURCES}" - -while [ "$#" -gt 0 ]; do - source="$1"; shift - fsource="${CCOLLECT_SOURCES}/${source}" - du -s "${fsource}/"* "${fsource}" - # du -l should follow -done diff --git a/software/ccollect/download/ccollect-0.7.1/tools/old/ccollect_create_source.sh b/software/ccollect/download/ccollect-0.7.1/tools/old/ccollect_create_source.sh deleted file mode 100644 index 7a34c6b0..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/old/ccollect_create_source.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 3 ]; then - _echo " " - _echo "Example: \"my-notebook\" \"192.168.42.42\" \"/home/server/backup/my-notebook\"" - exit 1 -fi - -name="$1" -source="$2" -destination="$3" -fullname="${CSOURCES}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${source} ..." -ping -c1 "${source}" || _exit_err "Cannot reach ${source}. Aborting." - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${source}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.1/tools/old/ccollect_create_source2.sh b/software/ccollect/download/ccollect-0.7.1/tools/old/ccollect_create_source2.sh deleted file mode 100644 index 842afb65..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/old/ccollect_create_source2.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 2 ]; then - _echo " " - _echo "Example: \"192.168.42.42\" \"/home/server/backup/\"" - _echo " This will create ${CSOURCES}/192.168.42.42 and /home/server/backup/192.168.42.42." - exit 1 -fi - -# sourcename / servername -name="$1" - -# basedir -basedir="$2" - -fullname="${CSOURCES}/${name}" -destination="${basedir}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${name} ..." -ping -c1 "${name}" || _exit_err "Cannot reach ${name}. Aborting." - -if [ ! -d "${basedir}" ]; then - echo "${basedir} is not a directory. Aborting." - exit 7 -fi - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${name}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.7.1/tools/report_success.sh b/software/ccollect/download/ccollect-0.7.1/tools/report_success.sh deleted file mode 100644 index b0f9d1bf..00000000 --- a/software/ccollect/download/ccollect-0.7.1/tools/report_success.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Sends feedback -# - -subject="==> success: ccollect" -to="nico-ccollect-success" -host="schottelius.org" -fullto="${to}@${host}" - -software="ccollect" -author="Nico Schottelius" -info="$(uname -s -v -r -m)" - -echo "Reporting success for $software to ${author}" -echo "-----------------" -echo -n "Your name (leave free for anonymous): " -read name -echo -n "Your email (leave free for anonymous): " -read email -echo -n "Comment (leave free for no comment): " -read comment - -echo "" -echo "The following information will be send to ${author}:" -echo "" - -cat << eof -Name: $name (will be used to contact you and kept secret) -E-Mail: $email (will be used to contact you and kept secret) -Comment: $comment -Info: $info - -eof - -echo -n "Is it ok to send out that mail (press enter to send or ctrl-c to abort)? " -read yes - -cat << eof | mail -s "$subject" "$fullto" -Name: $name (will be used to contact you and kept secret) -E-Mail: $email (will be used to contact you and kept secret) -Comment: $comment -Info: $info -eof - -echo "Send. Thank you for your feedback." diff --git a/software/ccollect/download/ccollect-0.8/.gitignore b/software/ccollect/download/ccollect-0.8/.gitignore deleted file mode 100644 index 4e9c74d5..00000000 --- a/software/ccollect/download/ccollect-0.8/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -conf/sources/*/destination/* -doc/old -doc/*.html -doc/*.htm -doc/*.docbook -doc/*.texi -doc/man/*.html -doc/man/*.htm -doc/man/*.texi -doc/man/*.man -test/* -.*.swp -doc/man/*.[0-9] -doc/*.xml -doc/*/*.xml -*.texi -*.fo diff --git a/software/ccollect/download/ccollect-0.8/COPYING b/software/ccollect/download/ccollect-0.8/COPYING deleted file mode 100644 index 94a9ed02..00000000 --- a/software/ccollect/download/ccollect-0.8/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/software/ccollect/download/ccollect-0.8/CREDITS b/software/ccollect/download/ccollect-0.8/CREDITS deleted file mode 100644 index aac73e27..00000000 --- a/software/ccollect/download/ccollect-0.8/CREDITS +++ /dev/null @@ -1,16 +0,0 @@ -Thanks go to the following people (sorted by alphabet): - -* Alexey Maximov - - for finding return-value and shell limitation bugs -* #cLinux IRC channel on irc.freenode.org - - for testing and debugging (those I mean should know ;-) -* Daniel Aubry - - for reporting many hints -* Jens-Christoph Brendel - - Added automatic backup manager (contrib/jbrendel-autobackup) -* John Lawless - - A lot of patches and some very interesting discussions. -* Markus Meier - - for finding a really simple solution for choosing the right backup to - clone from: Make it independent of the interval, simply choose the last - one created. diff --git a/software/ccollect/download/ccollect-0.8/Makefile b/software/ccollect/download/ccollect-0.8/Makefile deleted file mode 100644 index 82bab0e6..00000000 --- a/software/ccollect/download/ccollect-0.8/Makefile +++ /dev/null @@ -1,207 +0,0 @@ -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written on Fri Jan 13 12:13:08 CET 2006 -# -# FIXME: add prefix-support? -# - -INSTALL=install -CCOLLECT_SOURCE=ccollect.sh -CCOLLECT_DEST=ccollect.sh -LN=ln -sf -ASCIIDOC=asciidoc -DOCBOOKTOTEXI=docbook2x-texi -DOCBOOKTOMAN=docbook2x-man -XSLTPROC=xsltproc -XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl -A2X=a2x - -prefix=/usr/packages/ccollect-git -bindir=${prefix}/bin -destination=${bindir}/${CCOLLECT_DEST} - -mandest=${prefix}/man/man1 -manlink=/usr/local/man/man1 - -path_dir=/usr/local/bin -path_destination=${path_dir}/${CCOLLECT_DEST} - -# where to publish -host=localhost -dir=/home/users/nico/privat/computer/net/netzseiten/www.nico.schottelius.org/src/software/ccollect -docdir=${dir}/doc - -# -# Asciidoc will be used to generate other formats later -# -MANDOCS = doc/man/ccollect.text \ - doc/man/ccollect_add_source.text \ - doc/man/ccollect_analyse_logs.text \ - doc/man/ccollect_delete_source.text \ - doc/man/ccollect_logwrapper.text \ - doc/man/ccollect_list_intervals.text - -DOCS = ${MANDOCS} doc/ccollect.text - -# -# Doku -# -HTMLDOCS = ${DOCS:.text=.html} -DBHTMLDOCS = ${DOCS:.text=.htm} - -# texi is broken currently, don't know why xslt things complain yet -TEXIDOCS = ${DOCS:.text=.texi} -TEXIDOCS = - -# fop fails here, so disable it for now -PDFDOCS = ${DOCS:.text=.pdf} -PDFDOCS = - -MANPDOCS = ${MANDOCS:.text=.1} - -DOCBDOCS = ${DOCS:.text=.docbook} - -DOC_ALL = ${HTMLDOCS} ${DBHTMLDOCS} ${TEXIDOCS} ${MANPDOCS} ${PDFDOCS} - -html: ${HTMLDOCS} -htm: ${DBHTMLDOCS} -info: ${TEXIDOCS} -man: ${MANPDOCS} -pdf: ${PDFDOCS} -documentation: ${DOC_ALL} - -# -# End user targets -# -all: - @echo "----------- ccollect make targets --------------" - @echo "documentation: generate HTMl, Texinfo and manpage" - @echo "html: only generate HTML" - @echo "info: only generate Texinfo" - @echo "man: only generate manpage{s}" - @echo "install: install ccollect to ${prefix}" - -install: install-link install-manlink - -install-link: install-script - ${LN} ${destination} ${path_destination} - -install-script: - ${INSTALL} -D -m 0755 ${CCOLLECT_SOURCE} ${destination} - -install-man: man - ${INSTALL} -d -m 0755 ${mandest} - ${INSTALL} -D -m 0644 doc/man/*.1 ${mandest} - -install-manlink: install-man - ${INSTALL} -d -m 0755 ${manlink} - for man in ${mandest}/*; do ${LN} $$man ${manlink}; done - -# -# Tools -# -TOOLS=ccollect_add_source.sh \ - ccollect_analyse_logs.sh \ - ccollect_delete_source.sh \ - ccollect_list_intervals.sh \ - ccollect_logwrapper.sh \ - ccollect_list_intervals.sh - -TOOLSMAN1 = $(subst ccollect,doc/man/ccollect,$(TOOLS)) -TOOLSMAN = $(subst .sh,.text,$(TOOLSMAN1)) - -TOOLSFP = $(subst ccollect,tools/ccollect,$(TOOLS)) - -#t2: $(TOOLSMAN) -t2: - echo $(TOOLS) - $(TOOLSMAN) - $(TOOLSFP) - - -# docbook gets .htm, asciidoc directly .html -%.htm: %.docbook - ${XSLTPROC} -o $@ ${XSL} $< - -%.html: %.text %.docbook - ${ASCIIDOC} -n -o $@ $< - -%.html: %.text - ${ASCIIDOC} -n -o $@ $< - -%.docbook: %.text - ${ASCIIDOC} -n -b docbook -o $@ $< - -%.texi: %.docbook - ${DOCBOOKTOTEXI} --to-stdout $< > $@ - -#%.mandocbook: %.text -# ${ASCIIDOC} -b docbook -d manpage -o $@ $< - -#%.man: %.mandocbook -# ${DOCBOOKTOMAN} --to-stdout $< > $@ - -#%.man: %.text -%.1: %.text - ${A2X} -f manpage $< - -%.pdf: %.text - ${A2X} -f pdf $< - - -# -# Developer targets -# -update: - @git push - -publish-doc: documentation - @echo "Transferring files to ${host}" - @chmod a+r ${DOCS} ${DOC_ALL} - @tar c ${DOCS} ${DOC_ALL} | ssh ${host} "cd ${dir}; tar xv" - -# -# Distribution -# -clean: - rm -f ${DOC_ALL} - rm -f doc/man/*.[0-9] doc/man/*.xml doc/*.fo doc/man/*.fo - -distclean: clean - rm -f ${DOCBDOCS} - -# -# Be nice with the users and generate documentation for them -# -dist: distclean documentation - -#test: ccollect.sh documentation -test: ccollect.sh - mkdir -p /tmp/ccollect - CCOLLECT_CONF=./conf ./ccollect.sh daily from-remote - CCOLLECT_CONF=./conf ./ccollect.sh daily local - CCOLLECT_CONF=./conf ./ccollect.sh daily "local-with&ersand" - CCOLLECT_CONF=./conf ./ccollect.sh daily source-without-destination - CCOLLECT_CONF=./conf ./ccollect.sh daily "source with spaces and interval" - CCOLLECT_CONF=./conf ./ccollect.sh daily to-remote - CCOLLECT_CONF=./conf ./ccollect.sh daily with_exec - CCOLLECT_CONF=./conf ./ccollect.sh daily very_verbose - touch /tmp/ccollect/$$(ls /tmp/ccollect | head -n1).ccollect-marker - CCOLLECT_CONF=./conf ./ccollect.sh daily delete_incomplete - CCOLLECT_CONF=./conf ./ccollect.sh daily no-source-must-fail -# for s in $$(ls ./conf/sources); do CCOLLECT_CONF=./conf echo ./ccollect.sh daily $$s; done -# CCOLLECT_CONF=./conf ./ccollect.sh -a daily diff --git a/software/ccollect/download/ccollect-0.8/README b/software/ccollect/download/ccollect-0.8/README deleted file mode 100644 index 558594d8..00000000 --- a/software/ccollect/download/ccollect-0.8/README +++ /dev/null @@ -1,65 +0,0 @@ --------------------------------------------------------------------------------- -ccollect.sh, Nico Schottelius, 2005-12-06 --------------------------------------------------------------------------------- - -ccollect backups (local or remote) data to local or remote destinations. - -You can retrieve the latest version of ccollect at [0]. - -ccollect was inspired by rsnapshot [1], which has some problems: - - configuration parameters has to be TAB seperated - - you can not specify per source exclude lists - - no per source pre/post execution support - - no parallel execution - - does unecessary moving of backup directories - - I didn't like the configuration at all, so I used the cconfig style [2]. - -Please use tools/report_success.sh to report success, if you are successfully -using ccollect. - -Have a look at doc/HACKING, if you plan to change ccollect. - -A small try to visualize the differences in a table: - -+---------------+-------------------------------------------------------------+ -| What? | rsnapshot | ccollect | -+---------------+-------------------------------------------------------------+ -| Configuration | tab separated, needs | plain cconfig-style | -| | parsing | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| post-/pre- | no | yes | -| execution | | | -+---------------+-------------------------------------------------------------+ -| Per source | | | -| exclude lists | no | yes | -+---------------+-------------------------------------------------------------+ -| Parallel | | | -| execution | | | -| of multiple | no | yes | -| backups | | | -+---------------+-------------------------------------------------------------+ -| Programming | perl | sh | -| language | | (posix compatible) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 6772 (5353 w/o comments, | 546 (375 w/o comments, | -| (2006-10-25) | 4794 w/o empty lines) | 288 w/o empty lines) | -+---------------+-------------------------------------------------------------+ -| Lines of code | 7269 (6778 w/o comments, | 587 (397 w/o comments, | -| (2009-07-23) | 6139 w/o empty lines) | 315 w/o empty lines) | -+---------------+-------------------------------------------------------------+ -| Age | Available since 2002/2003 | Written at 2005-11-14 | -+---------------+-------------------------------------------------------------+ - -Included documentation: - -doc/ccollect.text Manual in text format -doc/ccollect.html Manual in xhtml (generated) - -doc/man/ccollect.text Manpage in text format -doc/man/ccollect.man Manpage in manpage format (generated) - --------------------------------------------------------------------------------- -[0]: ccollect: http://www.nico.schottelius.org/software/ccollect/ -[1]: rsnapshot: http://www.rsnapshot.org/ -[2]: cconfig: http://nico.schotteli.us/papers/linux/cconfig/ diff --git a/software/ccollect/download/ccollect-0.8/ccollect.sh b/software/ccollect/download/ccollect-0.8/ccollect.sh deleted file mode 100644 index 13ceb339..00000000 --- a/software/ccollect/download/ccollect-0.8/ccollect.sh +++ /dev/null @@ -1,596 +0,0 @@ -#!/bin/sh -# -# 2005-2009 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 - -# Error upon expanding unset variables: -set -u - -# -# Standard variables (stolen from cconf) -# -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -export TMP=$(mktemp "/tmp/${__myname}.XXXXXX") -VERSION="0.8" -RELEASE="2009-08-20" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" -SDATE="date +%s" - -# -# unset values -# -PARALLEL="" -USE_ALL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - awk "{ print \"[${name}] \" \$0 }" -} - -# -# Execute on remote host, if backing up to a remote host -# -pcmd() -{ - if [ "${remote_host}" ]; then - ssh "${remote_host}" "$@" - else - "$@" - fi -} - -delete_from_file() -{ - # - # ssh-"feature": we cannot do '... read ...; ssh ...; < file', - # because ssh reads stdin! -n does not work -> does not ask for password - # - file="$1"; shift - while read to_remove; do set -- "$@" "${ddir}/${to_remove}"; done < "${file}" - _techo "Removing $@ ..." - pcmd rm ${VVERBOSE} -rf "$@" || _exit_err "Removing $@ failed." -} - -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -usage() -{ - cat << eof -${__myname}: [args] - - ccollect creates (pseudo) incremental backups - - -h, --help: Show this help screen - -p, --parallel: Parallelise backup processes - -a, --all: Backup all sources specified in ${CSOURCES} - -v, --verbose: Be very verbose (uses set -x) - -V, --version: Print version information - - This is version ${VERSION}, released on ${RELEASE} - (the first version was written on 2005-12-05 by Nico Schottelius). - - Retrieve latest ccollect at http://www.nico.schottelius.org/software/ccollect/ -eof - exit 0 -} - -# -# Parse options -# -while [ "$#" -ge 1 ]; do - case "$1" in - -a|--all) - USE_ALL=1 - ;; - -v|--verbose) - set -x - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - -V|--version) - display_version - ;; - -h|--help|-*) - usage - ;; - --) - # ignore the -- itself - shift - break - ;; - *) - break - ;; - esac - shift -done - -# -# Setup interval -# -if [ $# -ge 1 ]; then - export INTERVAL="$1" - shift -else - usage -fi - -# -# Check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Create (portable!) source "array" -# -export no_sources=0 - -if [ "${USE_ALL}" = 1 ]; then - # - # Get sources from source configuration - # - ( cd "${CSOURCES}" && ls -1 > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval export source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -else - # - # Get sources from command line - # - while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - eval export source_${no_sources}=\"${arg}\" - no_sources="$((${no_sources}+1))" - done -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - backup="${CSOURCES}/${name}" - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Record start of backup: internal and for the user - # - begin_s="$(${SDATE})" - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # Configuration _must_ be a directory (cconfig style) - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # Read / create configuration - # - c_source="${backup}/source" - c_dest="${backup}/destination" - c_pre_exec="${backup}/pre_exec" - c_post_exec="${backup}/post_exec" - c_marker="ccollect-marker" - for opt in verbose very_verbose summary exclude rsync_options \ - delete_incomplete remote_host rsync_failure_codes \ - mtime quiet_if_down ; do - if [ -f "${backup}/${opt}" -o -f "${backup}/no_${opt}" ]; then - eval c_$opt=\"${backup}/$opt\" - else - eval c_$opt=\"${CDEFAULTS}/$opt\" - fi - done - - # - # Sort by ctime (default) or mtime (configuration option) - # - if [ -f "$c_mtime" ] ; then - TSORT="t" - else - TSORT="tc" - fi - - # - # First execute pre_exec, which may generate destination or other parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # Source configuration checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a file. Skipping." - else - ddir="$(cat "${c_dest}")"; ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Destination ${c_dest} is not readable. Skipping." - fi - fi - - # - # Set pre-cmd, if we backup to a remote host. - # - if [ -f "${c_remote_host}" ]; then - remote_host="$(cat "${c_remote_host}")"; ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Remote host file ${c_remote_host} exists, but is not readable. Skipping." - fi - destination="${remote_host}:${ddir}" - else - remote_host="" - destination="${ddir}" - fi - export remote_host - - # - # Parameters: ccollect defaults, configuration options, user options - # - - # - # Rsync standard options - # - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # Exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync, rm, and mkdir - # - VVERBOSE="" - if [ -f "${c_very_verbose}" ]; then - set -- "$@" "-vv" - VVERBOSE="-v" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # Extra options for rsync provided by the user - # - if [ -f "${c_rsync_options}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_options}" - fi - - # - # Check: source is up and accepting connections (before deleting old backups!) - # - if ! rsync "${source}" >/dev/null 2>"${TMP}" ; then - if [ ! -f "${c_quiet_if_down}" ]; then - cat "${TMP}" - fi - _exit_err "Source ${source} is not readable. Skipping." - fi - - # - # Check: destination exists? - # - ( pcmd cd "${ddir}" ) || _exit_err "Cannot change to ${ddir}. Skipping." - - # - # Check: incomplete backups? (needs echo to remove newlines) - # - incomplete="$(echo \ - $(pcmd ls -1 "${ddir}/" | \ - awk "/\.${c_marker}\$/ { print \$0; gsub(\"\.${c_marker}\$\",\"\",\$0); print \$0 }" | \ - tee "${TMP}"))" - - if [ "${incomplete}" ]; then - _techo "Incomplete backups: ${incomplete}" - if [ -f "${c_delete_incomplete}" ]; then - delete_from_file "${TMP}" - fi - fi - - # - # Interval definition: First try source specific, fallback to default - # - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="$(cat "${CDEFAULTS}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Check: maximum number of backups is reached? - # If so remove. Use grep and ls -p so we only look at directories - # - count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g')" || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract="$((${c_interval} - 1))" - remove="$((${count} - ${substract}))" - _techo "Removing ${remove} backup(s)..." - - pcmd ls -${TSORT}p1r "${ddir}" | grep "^${INTERVAL}\..*/\$" | \ - head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - delete_from_file "${TMP}" - fi - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - last_dir="$(pcmd ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - set -- "$@" "--link-dest=${ddir}/${last_dir}" - _techo "Hard linking from ${last_dir}" - fi - - # set time when we really begin to backup, not when we began to remove above - destination_date="$(${CDATE})" - destination_dir="${ddir}/${INTERVAL}.${destination_date}.$$" - destination_full="${destination}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - pcmd mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - pcmd touch "${destination_dir}.${c_marker}" - - # - # the rsync part - # - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? - _techo "Finished backup (rsync return code: $ret)." - - # - # Set modification time (mtime) to current time, if sorting by mtime is enabled - # - [ -f "$c_mtime" ] && pcmd touch "${destination_dir}" - - # - # Check if rsync exit code indicates failure. - # - fail="" - if [ -f "$c_rsync_failure_codes" ]; then - while read code ; do - if [ "$ret" = "$code" ]; then - fail=1 - fi - done <"$c_rsync_failure_codes" - fi - - # - # Remove marking here unless rsync failed. - # - if [ -z "$fail" ]; then - pcmd rm "${destination_dir}.${c_marker}" || \ - _exit_err "Removing ${destination_dir}.${c_marker} failed." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - else - _techo "Warning: rsync failed with return code $ret." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s="$(${SDATE})" - - full_seconds="$((${end_s} - ${begin_s}))" - hours="$((${full_seconds} / 3600))" - seconds="$((${full_seconds} - (${hours} * 3600)))" - minutes="$((${seconds} / 60))" - seconds="$((${seconds} - (${minutes} * 60)))" - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ "${ret}" -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished" diff --git a/software/ccollect/download/ccollect-0.8/conf/README b/software/ccollect/download/ccollect-0.8/conf/README deleted file mode 100644 index 8402c76f..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/README +++ /dev/null @@ -1,3 +0,0 @@ -This is my personal test configuration. -It can perhaps be some example for you, although it may be pretty -unsorted and highly chaotic. diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/daily b/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/daily deleted file mode 100644 index 9902f178..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -28 diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/monthly b/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/monthly deleted file mode 100644 index 48082f72..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/monthly +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/normal b/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/normal deleted file mode 100644 index 7273c0fa..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/normal +++ /dev/null @@ -1 +0,0 @@ -25 diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/weekly b/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/weekly deleted file mode 100644 index b8626c4c..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/intervals/weekly +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/post_exec b/software/ccollect/download/ccollect-0.8/conf/defaults/post_exec deleted file mode 100644 index 29655746..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/cat - -###################################################################### -If you see this content, post_exec was executed. (general post_exec) -###################################################################### diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/pre_exec b/software/ccollect/download/ccollect-0.8/conf/defaults/pre_exec deleted file mode 100644 index 09084a62..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/pre_exec +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/cat - -If you see this content, pre_exec was executed. -(general pre_exec, not source dependent) diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/exclude b/software/ccollect/download/ccollect-0.8/conf/defaults/sources/exclude deleted file mode 100644 index ee4c9268..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/exclude +++ /dev/null @@ -1 +0,0 @@ -/test diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/rsync_options b/software/ccollect/download/ccollect-0.8/conf/defaults/sources/rsync_options deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/source_postfix b/software/ccollect/download/ccollect-0.8/conf/defaults/sources/source_postfix deleted file mode 100644 index 0b5cde79..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/source_postfix +++ /dev/null @@ -1 +0,0 @@ -:/ diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/source_prefix b/software/ccollect/download/ccollect-0.8/conf/defaults/sources/source_prefix deleted file mode 100644 index fc37f9d6..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/source_prefix +++ /dev/null @@ -1 +0,0 @@ -root@ diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/sources/verbose b/software/ccollect/download/ccollect-0.8/conf/defaults/sources/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/defaults/verbose b/software/ccollect/download/ccollect-0.8/conf/defaults/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/delete_incomplete b/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/delete_incomplete deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/destination b/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/source b/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/delete_incomplete/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/README b/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/README deleted file mode 100644 index c778cfe8..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/README +++ /dev/null @@ -1 +0,0 @@ -This is based on a production example I use for my notebook. diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/destination b/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/exclude deleted file mode 100644 index f5b5b7c8..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/exclude +++ /dev/null @@ -1 +0,0 @@ -/home/server/raid diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/source b/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/source deleted file mode 100644 index 540dd91c..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/source +++ /dev/null @@ -1 +0,0 @@ -localhost:/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/summary b/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/summary deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/verbose b/software/ccollect/download/ccollect-0.8/conf/sources/from-remote/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/destination b/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/source b/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/local-with&ersand/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/local/destination b/software/ccollect/download/ccollect-0.8/conf/sources/local/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/local/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/local/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/local/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/local/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/local/no_verbose b/software/ccollect/download/ccollect-0.8/conf/sources/local/no_verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/local/source b/software/ccollect/download/ccollect-0.8/conf/sources/local/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/local/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/delete_incomplete b/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/delete_incomplete deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/destination b/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/exclude deleted file mode 100644 index bbdbdf1a..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/exclude +++ /dev/null @@ -1,3 +0,0 @@ -openvpn-2.0.1.tar.gz -nicht_reinnehmen -etwas mit leerzeichenli diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/intervals/daily b/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/intervals/daily deleted file mode 100644 index 64bb6b74..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/intervals/daily +++ /dev/null @@ -1 +0,0 @@ -30 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/source b/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/verbose b/software/ccollect/download/ccollect-0.8/conf/sources/source with spaces and interval/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source-without-destination/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/source-without-destination/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/source-without-destination/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/source-without-destination/source b/software/ccollect/download/ccollect-0.8/conf/sources/source-without-destination/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/source-without-destination/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/this_is_not_a_source b/software/ccollect/download/ccollect-0.8/conf/sources/this_is_not_a_source deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/destination b/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/exclude deleted file mode 100644 index 6b8710a7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/exclude +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/remote_host b/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/remote_host deleted file mode 100644 index 2fbb50c4..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/remote_host +++ /dev/null @@ -1 +0,0 @@ -localhost diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/source b/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/to-remote/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/README b/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/README deleted file mode 100644 index c778cfe8..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/README +++ /dev/null @@ -1 +0,0 @@ -This is based on a production example I use for my notebook. diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/destination b/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/exclude b/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/exclude deleted file mode 100644 index f5b5b7c8..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/exclude +++ /dev/null @@ -1 +0,0 @@ -/home/server/raid diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/source b/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/summary b/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/summary deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/verbose b/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/very_verbose b/software/ccollect/download/ccollect-0.8/conf/sources/very_verbose/very_verbose deleted file mode 100644 index e69de29b..00000000 diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/destination b/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/destination deleted file mode 100644 index 8cac69d3..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/destination +++ /dev/null @@ -1 +0,0 @@ -/tmp/ccollect diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/post_exec b/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/post_exec deleted file mode 100644 index fb8e8e05..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/post_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free after - -df -h diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/pre_exec b/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/pre_exec deleted file mode 100644 index 869e6d6a..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/pre_exec +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Show whats free before - -df -h diff --git a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/source b/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/source deleted file mode 100644 index e64611b7..00000000 --- a/software/ccollect/download/ccollect-0.8/conf/sources/with_exec/source +++ /dev/null @@ -1 +0,0 @@ -/home/users/nico/bin diff --git a/software/ccollect/download/ccollect-0.8/contrib/README b/software/ccollect/download/ccollect-0.8/contrib/README deleted file mode 100644 index ab30b7a7..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains patches or programs contributed by others -which are either not yet integrated into ccollect or may be kept -seperated generally. diff --git a/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/backup.sh b/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/backup.sh deleted file mode 100644 index ea21635c..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/backup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -function mkbackup { - find /etc/ccollect/logwrapper/destination -type f -atime +2 -exec sudo rm {} \; - /home/jcb/bm.pl & -} - -mkdir -p /media/backupdisk -grep backupdisk /etc/mtab &> /dev/null - -if [ $? == 0 ] -then - mkbackup -else - mount /media/backupdisk - if [ $? == 0 ] - then - mkbackup - else - echo "Error mounting backup disk" - fi -fi diff --git a/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/bm.pl b/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/bm.pl deleted file mode 100644 index 3a3da84e..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/bm.pl +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/perl - -############################### -# -# Jens-Christoph Brendel, 2009 -# licensed under GPL3 NO WARRANTY -# -############################### - -use Date::Calc qw(:all); -use strict; -use warnings; - -# -#!!!!!!!!!!!!!!!!! you need to customize these settings !!!!!!!!!!!!!!!!!!!! -# -my $backupdir = "/media/backupdisk"; -my $logwrapper = "/home/jcb/ccollect/tools/ccollect_logwrapper.sh"; - -#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -# +------------------------------------------------------------------------+ -# | | -# | V A R I A B L E S | -# | | -# +------------------------------------------------------------------------+ -# - -# get the current date -# -my ($sek, $min, $hour, $day, $month, $year) = localtime(); - -my $curr_year = $year + 1900; -my $curr_month = $month +1; -my ($curr_week,$cur_year) = Week_of_Year($curr_year,$curr_month,$day); - -# initialize some variables -# -my %most_recent_daily = ( - 'age' => 9999, - 'file' => '' -); - -my %most_recent_weekly = ( - 'age' => 9999, - 'file' => '' -); - -my %most_recent_monthly = ( - 'age' => 9999, - 'file' => '' -); - -# prepare the output formatting -# -#--------------------------------------------------------------------------- -my ($msg1, $msg2, $msg3, $msg4); - -format = - @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - $msg1 - @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<< - $msg2, $msg3 - - @|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - $msg4 -. - -my @months = (' ','January', 'February', 'March', 'April', - 'May', 'June', 'July', 'August', - 'September', 'October', 'November', - 'December'); - -# +------------------------------------------------------------------------+ -# | | -# | P r o c e d u r e s | -# | | -# +------------------------------------------------------------------------+ -# - -# PURPOSE: extract the date from the file name -# PARAMETER VALUE: file name -# RETURN VALUE: pointer of a hash containing year, month, day -# -sub decodeDate { - my $file = shift; - $file =~ /^(daily|weekly|monthly)\.(\d+)-.*/; - my %date = ( - 'y' => substr($2,0,4), - 'm' => substr($2,4,2), - 'd' => substr($2,6,2) - ); - return \%date; -} - -# PURPOSE: calculate the file age in days -# PARAMETER VALUE: name of a ccollect backup file -# RETURN VALUE: age in days -# -sub AgeInDays { - my $file = shift; - my $date=decodeDate($file); - my $ageindays = Delta_Days($$date{'y'}, $$date{'m'}, $$date{'d'}, $curr_year, $curr_month, $day); - return $ageindays; -} - -# PURPOSE: calculate the file age in number of weeks -# PARAMETER VALUE: name of a ccollect backup file -# RETURN VALUE: age in weeks -# -sub AgeInWeeks { - my($y,$m,$d); - - my $file = shift; - my $date = decodeDate($file); - my ($weeknr,$yr) = Week_of_Year($$date{'y'}, $$date{'m'}, $$date{'d'}); - my $ageinweeks = $curr_week - $weeknr; - return $ageinweeks; -} - -# PURPOSE: calculate the file age in number of months -# PARAMETER VALUE: name of a ccollect backup file -# RETURN VALUE: age in months -# -sub AgeInMonths { - my $ageinmonths; - my $ageinmonths; - my $file = shift; - my $date = decodeDate($file); - if ($curr_year == $$date{'y'}) { - $ageinmonths = $curr_month - $$date{'m'}; - } else { - $ageinmonths = $curr_month + (12-$$date{'m'}) + ($curr_year-$$date{'y'}-1)*12; - } - return $ageinmonths; -} - -# +------------------------------------------------------------------------+ -# | | -# | M A I N | -# | | -# +------------------------------------------------------------------------+ -# - -# -# find the most recent daily, weekly and monthly backup file -# - -opendir(DIRH, $backupdir) or die "Can't open $backupdir \n"; - -my @files = readdir(DIRH); - -die "Zielverzeichnis leer \n" if ( $#files <= 1 ); - -foreach my $file (@files) { - - next if $file eq "." or $file eq ".."; - - SWITCH: { - if ($file =~ /^daily/) { - my $curr_age=AgeInDays($file); - if ($curr_age<$most_recent_daily{'age'}) { - $most_recent_daily{'age'} =$curr_age; - $most_recent_daily{'file'}= $file; - } - last SWITCH; - } - - if ($file =~ /^weekly/) { - my $curr_week_age = AgeInWeeks($file); - if ($curr_week_age<$most_recent_weekly{'age'}) { - $most_recent_weekly{'age'} =$curr_week_age; - $most_recent_weekly{'file'}=$file; - } - last SWITCH; - } - - if ($file =~ /^monthly/) { - my $curr_month_age=AgeInMonths($file); - if ($curr_month_age < $most_recent_monthly{'age'}) { - $most_recent_monthly{'age'} =$curr_month_age; - $most_recent_monthly{'file'}=$file; - } - last SWITCH; - } - print "\n\n unknown file $file \n\n"; - } -} - -printf("\nBackup Manager started: %02u.%02u. %u, week %02u\n\n", $day, $curr_month, $curr_year, $curr_week); - -# -# compare the most recent daily, weekly and monthly backup file -# and decide if it's necessary to start a new backup process in -# each category -# - -if ($most_recent_monthly{'age'} == 0) { - $msg1="The most recent monthly backup"; - $msg2="$most_recent_monthly{'file'} from $months[$curr_month - $most_recent_monthly{'age'}]"; - $msg3="is still valid."; - $msg4=""; - write; -} else { - $msg1="The most recent monthly backup"; - $msg2="$most_recent_monthly{'file'} from $months[$curr_month - $most_recent_monthly{'age'}]"; - $msg3="is out-dated."; - $msg4="Starting new monthly backup."; - write; - exec "sudo $logwrapper monthly FULL"; - exit; -} - -if ($most_recent_weekly{'age'} == 0) { - $msg1="The most recent weekly backup"; - $msg2="$most_recent_weekly{'file'} from week nr: $curr_week-$most_recent_weekly{'age'}"; - $msg3="is still valid."; - $msg4=""; - write; -} else { - $msg1="The most recent weekly backup"; - $msg2="$most_recent_weekly{'file'} from week nr: $curr_week-$most_recent_weekly{'age'}"; - $msg3="is out-dated."; - $msg4="Starting new weekly backup."; - write; - exec "sudo $logwrapper weekly FULL"; - exit; -} - -if ($most_recent_daily{'age'} == 0 ) { - $msg1=" The most recent daily backup"; - $msg2="$most_recent_daily{'file'}"; - $msg3="is still valid."; - $msg4=""; - write; -} else { - $msg1="The most recent daily backup"; - $msg2="$most_recent_daily{'file'}"; - $msg3="is out-dated."; - $msg4="Starting new daily backup."; - write; - exec "sudo $logwrapper daily FULL"; diff --git a/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/correction_1 b/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/correction_1 deleted file mode 100644 index 4fec4408..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jbrendel-autobackup/correction_1 +++ /dev/null @@ -1,3 +0,0 @@ -- Zeile 126/127 (my $ageinmonths;) ist doppelt, einmal streichen. -- in die allerletzte Zeile gehört eine schließende geschweifte Klammer -"}", die irgendwo verlorengegangen ist. diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/README_g-i.txt b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/README_g-i.txt deleted file mode 100644 index b782d63d..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/README_g-i.txt +++ /dev/null @@ -1,15 +0,0 @@ -Hello Nico, - - I have attached three more patches for ccollect. Each patch -has comments explaining its motivation. - - All of these patches work-for-me (but I continue to test -them). I would be interested in your opinion on, for example, the -general approach used in i.patch which changes the way options are -handled. I think it is a big improvement. If, however, you wanted -the code to go in a different direction, let me know before we -diverge too far. - -Regards, - -John diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/ccollect-f.sh b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/ccollect-f.sh deleted file mode 100644 index 5c8952e8..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/ccollect-f.sh +++ /dev/null @@ -1,683 +0,0 @@ -#!/bin/sh -# -# 2005-2009 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 - -# -# Standard variables (stolen from cconf) -# -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/${__myname}.XXXXXX") -VERSION=0.7.1 -RELEASE="2009-02-02" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -#TSORT="tc" ; NEWER="cnewer" -TSORT="t" ; NEWER="newer" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - awk "{ print \"[${name}] \" \$0 }" -} - -pcmd() -{ - if [ "$remote_host" ]; then - ssh "$remote_host" "$@" - else - "$@" - fi -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "${__myname}: [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# Select interval if AUTO -# -# For this to work nicely, you have to choose interval names that sort nicely -# such as int1, int2, int3 or a_daily, b_weekly, c_monthly, etc. -# -auto_interval() -{ - if [ -d "${backup}/intervals" -a -n "$(ls "${backup}/intervals" 2>/dev/null)" ] ; then - intervals_dir="${backup}/intervals" - elif [ -d "${CDEFAULTS}/intervals" -a -n "$(ls "${CDEFAULTS}/intervals" 2>/dev/null)" ] ; then - intervals_dir="${CDEFAULTS}/intervals" - else - _exit_err "No intervals are defined. Skipping." - fi - echo intervals_dir=${intervals_dir} - - trial_interval="$(ls -1r "${intervals_dir}/" | head -n 1)" || \ - _exit_err "Failed to list contents of ${intervals_dir}/." - _techo "Considering interval ${trial_interval}" - most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${trial_interval}.*/$" | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}/." - _techo " Most recent ${trial_interval}: '${most_recent}'" - if [ -n "${most_recent}" ]; then - no_intervals="$(ls -1 "${intervals_dir}/" | wc -l)" - n=1 - while [ "${n}" -le "${no_intervals}" ]; do - trial_interval="$(ls -p1 "${intervals_dir}/" | tail -n+${n} | head -n 1)" - _techo "Considering interval '${trial_interval}'" - c_interval="$(cat "${intervals_dir}/${trial_interval}" 2>/dev/null)" - m=$((${n}+1)) - set -- "${ddir}" -maxdepth 1 - while [ "${m}" -le "${no_intervals}" ]; do - interval_m="$(ls -1 "${intervals_dir}/" | tail -n+${m} | head -n 1)" - most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${interval_m}\..*/$" | head -n 1)" - _techo " Most recent ${interval_m}: '${most_recent}'" - if [ -n "${most_recent}" ] ; then - set -- "$@" -$NEWER "${ddir}/${most_recent}" - fi - m=$((${m}+1)) - done - count=$(pcmd find "$@" -iname "${trial_interval}*" | wc -l) - _techo " Found $count more recent backups of ${trial_interval} (limit: ${c_interval})" - if [ "$count" -lt "${c_interval}" ] ; then - break - fi - n=$((${n}+1)) - done - fi - export INTERVAL="${trial_interval}" - D_FILE_INTERVAL="${intervals_dir}/${INTERVAL}" - D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - f_incomplete="delete_incomplete" - c_incomplete="${backup}/${f_incomplete}" - c_remote_host="${backup}/remote_host" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a file. Skipping." - else - ddir=$(cat "${c_dest}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Destination ${c_dest} is not readable. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - if [ ${INTERVAL} = "AUTO" ] ; then - auto_interval - _techo "Selected interval: '$INTERVAL'" - fi - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - # Verify source is up and accepting connections before deleting any old backups - rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping." - - # - # do we backup to a remote host? then set pre-cmd - # - if [ -f "${c_remote_host}" ]; then - # adjust ls and co - remote_host=$(cat "${c_remote_host}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Remote host file ${c_remote_host} exists, but is not readable. Skipping." - fi - destination="${remote_host}:${ddir}" - else - remote_host="" - destination="${ddir}" - fi - export remote_host - - # - # check for existence / use real name - # - ( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping." - - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" -o -f "${CDEFAULTS}/${f_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null - - i=0 - while read incomplete; do - eval incomplete_$i=\"$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval realincomplete=\"\$incomplete_$j\" - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ - _exit_err "Removing ${realincomplete} failed." - fi - j=$(($j+1)) - done - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g')" || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - pcmd ls -${TSORT}p1r "$ddir" | grep "^${INTERVAL}\..*/\$" | \ - head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - i=0 - while read to_remove; do - eval remove_$i=\"${to_remove}\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval to_remove=\"\$remove_$j\" - _techo "Removing ${to_remove} ..." - pcmd rm ${VVERBOSE} -rf "${ddir}/${to_remove}" || \ - _exit_err "Removing ${to_remove} failed." - j=$(($j+1)) - done - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Depending on your file system, you may want to sort on: - # 1. mtime (modification time) with TSORT=t, or - # 2. ctime (last change time, usually) with TSORT=tc - last_dir="$(pcmd ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - set -- "$@" "--link-dest=${ddir}/${last_dir}" - _techo "Hard linking from ${last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${ddir}/${INTERVAL}.${destination_date}.$$" - destination_full="${destination}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - pcmd mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - pcmd touch "${destination_dir}.${c_marker}" - - # - # the rsync part - # - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? - # Correct the modification time: - pcmd touch "${destination_dir}" - - # - # remove marking here - # - if [ "$ret" -ne 12 ] ; then - pcmd rm "${destination_dir}.${c_marker}" || \ - _exit_err "Removing ${destination_dir}/${c_marker} failed." - fi - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" - -# vim: set shiftwidth=3 tabstop=3 expandtab : diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/ccollect-i.sh b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/ccollect-i.sh deleted file mode 100644 index 58fab09d..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/ccollect-i.sh +++ /dev/null @@ -1,663 +0,0 @@ -#!/bin/sh -# -# 2005-2009 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 - -# -# Standard variables (stolen from cconf) -# -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/${__myname}.XXXXXX") -VERSION=0.7.1 -RELEASE="2009-02-02" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -#TSORT="tc" ; NEWER="cnewer" -TSORT="t" ; NEWER="newer" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - awk "{ print \"[${name}] \" \$0 }" -} - -pcmd() -{ - if [ "$remote_host" ]; then - ssh "$remote_host" "$@" - else - "$@" - fi -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "${__myname}: [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# Select interval if AUTO -# -# For this to work nicely, you have to choose interval names that sort nicely -# such as int1, int2, int3 or a_daily, b_weekly, c_monthly, etc. -# -auto_interval() -{ - if [ -d "${backup}/intervals" -a -n "$(ls "${backup}/intervals" 2>/dev/null)" ] ; then - intervals_dir="${backup}/intervals" - elif [ -d "${CDEFAULTS}/intervals" -a -n "$(ls "${CDEFAULTS}/intervals" 2>/dev/null)" ] ; then - intervals_dir="${CDEFAULTS}/intervals" - else - _exit_err "No intervals are defined. Skipping." - fi - echo intervals_dir=${intervals_dir} - - trial_interval="$(ls -1r "${intervals_dir}/" | head -n 1)" || \ - _exit_err "Failed to list contents of ${intervals_dir}/." - _techo "Considering interval ${trial_interval}" - most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${trial_interval}.*/$" | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}/." - _techo " Most recent ${trial_interval}: '${most_recent}'" - if [ -n "${most_recent}" ]; then - no_intervals="$(ls -1 "${intervals_dir}/" | wc -l)" - n=1 - while [ "${n}" -le "${no_intervals}" ]; do - trial_interval="$(ls -p1 "${intervals_dir}/" | tail -n+${n} | head -n 1)" - _techo "Considering interval '${trial_interval}'" - c_interval="$(cat "${intervals_dir}/${trial_interval}" 2>/dev/null)" - m=$((${n}+1)) - set -- "${ddir}" -maxdepth 1 - while [ "${m}" -le "${no_intervals}" ]; do - interval_m="$(ls -1 "${intervals_dir}/" | tail -n+${m} | head -n 1)" - most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${interval_m}\..*/$" | head -n 1)" - _techo " Most recent ${interval_m}: '${most_recent}'" - if [ -n "${most_recent}" ] ; then - set -- "$@" -$NEWER "${ddir}/${most_recent}" - fi - m=$((${m}+1)) - done - count=$(pcmd find "$@" -iname "${trial_interval}*" | wc -l) - _techo " Found $count more recent backups of ${trial_interval} (limit: ${c_interval})" - if [ "$count" -lt "${c_interval}" ] ; then - break - fi - n=$((${n}+1)) - done - fi - export INTERVAL="${trial_interval}" - D_FILE_INTERVAL="${intervals_dir}/${INTERVAL}" - D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_pre_exec="${backup}/pre_exec" - c_post_exec="${backup}/post_exec" - for opt in exclude verbose very_verbose rsync_options summary delete_incomplete remote_host ; do - if [ -f "${backup}/$opt" -o -f "${backup}/no_$opt" ]; then - eval c_$opt=\"${backup}/$opt\" - else - eval c_$opt=\"${CDEFAULTS}/$opt\" - fi - done - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - VERBOSE="" - VVERBOSE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a file. Skipping." - else - ddir=$(cat "${c_dest}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Destination ${c_dest} is not readable. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - if [ "${INTERVAL}" = "AUTO" ] ; then - auto_interval - _techo "Selected interval: '$INTERVAL'" - fi - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - # Verify source is up and accepting connections before deleting any old backups - rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping." - - # - # do we backup to a remote host? then set pre-cmd - # - if [ -f "${c_remote_host}" ]; then - # adjust ls and co - remote_host=$(cat "${c_remote_host}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Remote host file ${c_remote_host} exists, but is not readable. Skipping." - fi - destination="${remote_host}:${ddir}" - else - remote_host="" - destination="${ddir}" - fi - export remote_host - - # - # check for existence / use real name - # - ( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping." - - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_very_verbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_options}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_options}" - fi - - # - # Check for incomplete backups - # - pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" 2>/dev/null | while read marker; do - incomplete="$(echo ${marker} | sed "s/\\.${c_marker}\$//")" - _techo "Incomplete backup: ${incomplete}" - if [ -f "${c_delete_incomplete}" ]; then - _techo "Deleting ${incomplete} ..." - pcmd rm $VVERBOSE -rf "${incomplete}" || \ - _exit_err "Removing ${incomplete} failed." - pcmd rm $VVERBOSE -f "${marker}" || \ - _exit_err "Removing ${marker} failed." - fi - done - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g')" || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - pcmd ls -${TSORT}p1r "$ddir" | grep "^${INTERVAL}\..*/\$" | \ - head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - i=0 - while read to_remove; do - eval remove_$i=\"${to_remove}\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval to_remove=\"\$remove_$j\" - _techo "Removing ${to_remove} ..." - pcmd rm ${VVERBOSE} -rf "${ddir}/${to_remove}" || \ - _exit_err "Removing ${to_remove} failed." - j=$(($j+1)) - done - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Depending on your file system, you may want to sort on: - # 1. mtime (modification time) with TSORT=t, or - # 2. ctime (last change time, usually) with TSORT=tc - last_dir="$(pcmd ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - set -- "$@" "--link-dest=${ddir}/${last_dir}" - _techo "Hard linking from ${last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${ddir}/${INTERVAL}.${destination_date}.$$" - destination_full="${destination}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - pcmd mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - pcmd touch "${destination_dir}.${c_marker}" - - # - # the rsync part - # - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? - # Correct the modification time: - pcmd touch "${destination_dir}" - - # - # remove marking here - # - if [ "$ret" -ne 12 ] ; then - pcmd rm "${destination_dir}.${c_marker}" || \ - _exit_err "Removing ${destination_dir}/${c_marker} failed." - fi - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" - -# vim: set shiftwidth=3 tabstop=3 expandtab : diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/g.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/g.patch deleted file mode 100644 index 0c9a73eb..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/g.patch +++ /dev/null @@ -1,74 +0,0 @@ -# I found that ccollect was not deleting incomplete backups despite the -# delete_incomplete option being specified. I traced the problem to: -# -# < pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ -# -# which, at least on all the systems I tested, should read: -# -# > pcmd rm $VVERBOSE -rf "${realincomplete}" || \ -# -# Also, the marker file is not deleted. I didn't see any reason to keep -# those files around (what do you think?), so I deleted them also: -# -# > pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ -# > _exit_err "Removing ${realincomplete} failed." -# -# As long as I was messing with the delete incomplete code and therefore need -# to test it, I took the liberty of simplifying it. The v0.7.1 code uses -# multiple loops with multiple loop counters and creates many variables. I -# simplified that to a single loop: -# -# > pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" 2>/dev/null | while read marker; do -# > incomplete="$(echo ${marker} | sed "s/\\.${c_marker}\$//")" -# > _techo "Incomplete backup: ${incomplete}" -# > if [ "${DELETE_INCOMPLETE}" = "yes" ]; then -# > _techo "Deleting ${incomplete} ..." -# > pcmd rm $VVERBOSE -rf "${incomplete}" || \ -# > _exit_err "Removing ${incomplete} failed." -# > pcmd rm $VVERBOSE -f "${marker}" || \ -# > _exit_err "Removing ${marker} failed." -# > fi -# > done -# -# The final code (a) fixes the delete bug, (b) also deletes the marker, and -# (c) is eight lines shorter than the original. -# ---- ccollect-f.sh 2009-05-12 12:49:28.000000000 -0700 -+++ ccollect-g.sh 2009-06-03 14:32:03.000000000 -0700 -@@ -516,28 +516,20 @@ - fi - - # - # Check for incomplete backups - # -- pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null -- -- i=0 -- while read incomplete; do -- eval incomplete_$i=\"$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")\" -- i=$(($i+1)) -- done < "${TMP}" -- -- j=0 -- while [ "$j" -lt "$i" ]; do -- eval realincomplete=\"\$incomplete_$j\" -- _techo "Incomplete backup: ${realincomplete}" -+ pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" 2>/dev/null | while read marker; do -+ incomplete="$(echo ${marker} | sed "s/\\.${c_marker}\$//")" -+ _techo "Incomplete backup: ${incomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then -- _techo "Deleting ${realincomplete} ..." -- pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ -- _exit_err "Removing ${realincomplete} failed." -+ _techo "Deleting ${incomplete} ..." -+ pcmd rm $VVERBOSE -rf "${incomplete}" || \ -+ _exit_err "Removing ${incomplete} failed." -+ pcmd rm $VVERBOSE -f "${marker}" || \ -+ _exit_err "Removing ${marker} failed." - fi -- j=$(($j+1)) - done - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/h.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/h.patch deleted file mode 100644 index b850b734..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/h.patch +++ /dev/null @@ -1,18 +0,0 @@ -# A line in my f.patch was missing needed quotation marks. -# This fixes that. -# ---- ccollect-g.sh 2009-06-03 14:32:03.000000000 -0700 -+++ ccollect-h.sh 2009-06-03 14:32:19.000000000 -0700 -@@ -412,11 +412,11 @@ - fi - - # - # interval definition: First try source specific, fallback to default - # -- if [ ${INTERVAL} = "AUTO" ] ; then -+ if [ "${INTERVAL}" = "AUTO" ] ; then - auto_interval - _techo "Selected interval: '$INTERVAL'" - fi - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/i.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/i.patch deleted file mode 100644 index e8edbafb..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/i.patch +++ /dev/null @@ -1,134 +0,0 @@ -# I have many sources that use the same options so I put those -# options in the defaults directory. I found that ccollect was -# ignoring most of them. I thought that this was a bug so I wrote -# some code to correct this: -# -# > for opt in exclude verbose very_verbose rsync_options summary delete_incomplete remote_host ; do -# > if [ -f "${backup}/$opt" -o -f "${backup}/no_$opt" ]; then -# > eval c_$opt=\"${backup}/$opt\" -# > else -# > eval c_$opt=\"${CDEFAULTS}/$opt\" -# > fi -# > done -# -# This also adds a new feature: if some option, say verbose, is -# specified in the defaults directory, it can be turned off for -# particular sources by specifying no_verbose as a source option. -# -# A side effect of this approach is that it forces script variable -# names to be consistent with option file names. Thus, there are -# several changes such as: -# -# < if [ -f "${c_rsync_extra}" ]; then -# > if [ -f "${c_rsync_options}" ]; then -# -# and -# -# < if [ -f "${c_vverbose}" ]; then -# > if [ -f "${c_very_verbose}" ]; then -# -# After correcting the bug and adding the "no_" feature, the code is -# 12 lines shorter. -# ---- ccollect-h.sh 2009-06-01 15:59:11.000000000 -0700 -+++ ccollect-i.sh 2009-06-03 14:27:58.000000000 -0700 -@@ -336,20 +336,19 @@ - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" -- c_exclude="${backup}/exclude" -- 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" -- f_incomplete="delete_incomplete" -- c_incomplete="${backup}/${f_incomplete}" -- c_remote_host="${backup}/remote_host" -+ for opt in exclude verbose very_verbose rsync_options summary delete_incomplete remote_host ; do -+ if [ -f "${backup}/$opt" -o -f "${backup}/no_$opt" ]; then -+ eval c_$opt=\"${backup}/$opt\" -+ else -+ eval c_$opt=\"${CDEFAULTS}/$opt\" -+ fi -+ done - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" -@@ -360,16 +359,12 @@ - begin_s=$(date +%s) - - # - # unset possible options - # -- EXCLUDE="" -- RSYNC_EXTRA="" -- SUMMARY="" - VERBOSE="" - VVERBOSE="" -- DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks -@@ -462,17 +457,10 @@ - # check for existence / use real name - # - ( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping." - - -- # -- # Check whether to delete incomplete backups -- # -- if [ -f "${c_incomplete}" -o -f "${CDEFAULTS}/${f_incomplete}" ]; then -- DELETE_INCOMPLETE="yes" -- fi -- - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - -@@ -498,32 +486,32 @@ - fi - - # - # Verbosity for rsync - # -- if [ -f "${c_vverbose}" ]; then -+ if [ -f "${c_very_verbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # -- if [ -f "${c_rsync_extra}" ]; then -+ if [ -f "${c_rsync_options}" ]; then - while read line; do - set -- "$@" "$line" -- done < "${c_rsync_extra}" -+ done < "${c_rsync_options}" - fi - - # - # Check for incomplete backups - # - pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" 2>/dev/null | while read marker; do - incomplete="$(echo ${marker} | sed "s/\\.${c_marker}\$//")" - _techo "Incomplete backup: ${incomplete}" -- if [ "${DELETE_INCOMPLETE}" = "yes" ]; then -+ if [ -f "${c_delete_incomplete}" ]; then - _techo "Deleting ${incomplete} ..." - pcmd rm $VVERBOSE -rf "${incomplete}" || \ - _exit_err "Removing ${incomplete} failed." - pcmd rm $VVERBOSE -f "${marker}" || \ - _exit_err "Removing ${marker} failed." diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/README_a-f.txt b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/README_a-f.txt deleted file mode 100644 index e3bfe575..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/README_a-f.txt +++ /dev/null @@ -1,296 +0,0 @@ -Dear Nico Schottelius, - - I have started using ccollect and I very much like its design: -it is elegant and effective. - - In the process of getting ccollect setup and running, I made -five changes, including one major new feature, that I hope you will -find useful. - - First, I added the following before any old backup gets deleted: - -> # Verify source is up and accepting connections before deleting any old backups -> rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping." - -I think that this quick test is a much better than, say, pinging -the source in a pre-exec script: this tests not only that the -source is up and connected to the net, it also verifies (1) that -ssh is up and accepting our key (if we are using ssh), and (2) that -the source directory is mounted (if it needs to be mounted) and -readable. - - Second, I found ccollect's use of ctime problematic. After -copying an old backup over to my ccollect destination, I adjusted -mtime and atime where needed using touch, e.g.: - -touch -d"28 Apr 2009 3:00" destination/daily.01 - -However, as far as I know, there is no way to correct a bad ctime. -I ran into this issue repeatedly while adjusting my backup -configuration. (For example, "cp -a" preserves mtime but not -ctime. Even worse, "cp -al old new" also changes ctime on old.) - - Another potential problem with ctime is that it is file-system -dependent: I have read that Windows sets ctime to create-time not -last change-time. - - However, It is simple to give a new backup the correct mtime. -After the rsync step, I added the command: - -553a616,617 -> # Correct the modification time: -> pcmd touch "${destination_dir}" - -Even if ccollect continues to use ctime for sorting, I see no -reason not to have the backup directory have the correct mtime. - - To allow the rest of the code to use either ctime or mtime, I -added definitions: - -44a45,47 -> #TSORT="tc" ; NEWER="cnewer" -> TSORT="t" ; NEWER="newer" - -(It would be better if this choice was user-configurable because -those with existing backup directories should continue to use ctime -until the mtimes of their directories are correct. The correction -would happen passively over time as new backups created using the -above touch command and the old ones are deleted.) - -With these definitions, the proper link-dest directory can then be -found using this minor change (and comment update): - -516,519c579,582 -< # Use ls -1c instead of -1t, because last modification maybe the same on all -< # and metadate update (-c) is updated by rsync locally. -< # -< last_dir="$(pcmd ls -tcp1 "${ddir}" | grep '/$' | head -n 1)" || \ ---- -> # Depending on your file system, you may want to sort on: -> # 1. mtime (modification time) with TSORT=t, or -> # 2. ctime (last change time, usually) with TSORT=tc -> last_dir="$(pcmd ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \ - - Thirdly, after I copied my old backups over to my ccollect -destination directory, I found that ccollect would delete a -recent backup not an old backup! My problem was that, unknown to -me, the algorithm to find the oldest backup (for deletion) was -inconsistent with that used to find the newest (for link-dest). I -suggest that these two should be consistent. Because time-sorting -seemed more consistent with the ccollect documentation, I suggest: - -492,493c555,556 -< pcmd ls -p1 "$ddir" | grep "^${INTERVAL}\..*/\$" | \ -< sort -n | head -n "${remove}" > "${TMP}" || \ ---- -> pcmd ls -${TSORT}p1r "$ddir" | grep "^${INTERVAL}\..*/\$" | \ -> head -n "${remove}" > "${TMP}" || \ - - Fourthly, in my experience, rsync error code 12 means complete -failure, usually because the source refuses the ssh connection. -So, I left the marker in that case: - -558,559c622,625 -< pcmd rm "${destination_dir}.${c_marker}" || \ -< _exit_err "Removing ${destination_dir}/${c_marker} failed." ---- -> if [ "$ret" -ne 12 ] ; then -> pcmd rm "${destination_dir}.${c_marker}" || \ -> _exit_err "Removing ${destination_dir}/${c_marker} failed." -> fi - -(A better solution might allow a user-configurable list of error -codes that are treated the same as a fail.) - - Fifth, because I was frustrated by the problems of having a -cron-job decide which interval to backup, I added a major new -feature: the modified ccollect can now automatically select an -interval to use for backup. - - Cron-job controlled backup works well if all machines are up and -running all the time and nothing ever goes wrong. I have, however, -some machines that are occasionally turned off, or that are mobile -and only sometimes connected to local net. For these machines, the -use of cron-jobs to select intervals can be a disaster. - - There are several ways one could automatically choose an -appropriate interval. The method I show below has the advantage -that it works with existing ccollect configuration files. The only -requirement is that interval names be chosen to sort nicely (under -ls). For example, I currently use: - -$ ls -1 intervals -a_daily -b_weekly -c_monthly -d_quarterly -e_yearly -$ cat intervals/* -6 -3 -2 -3 -30 - -A simpler example would be: - -$ ls -1 intervals -int1 -int2 -int3 -$ cat intervals/* -2 -3 -4 - -The algorithm works as follows: - - If no backup exists for the least frequent interval (int3 in the - simpler example), then use that interval. Otherwise, use the - most frequent interval (int1) unless there are "$(cat - intervals/int1)" int1 backups more recent than any int2 or int3 - backup, in which case select int2 unless there are "$(cat - intervals/int2)" int2 backups more recent than any int3 backups - in which case choose int3. - -This algorithm works well cycling through all the backups for my -always connected machines as well as for my usually connected -machines, and rarely connected machines. (For a rarely connected -machine, interval names like "b_weekly" lose their English meaning -but it still does a reasonable job of rotating through the -intervals.) - - In addition to being more robust, the automatic interval -selection means that crontab is greatly simplified: only one line -is needed. I use: - -30 3 * * * ccollect.sh AUTO host1 host2 host3 | tee -a /var/log/ccollect-full.log | ccollect_analyse_logs.sh iwe - - Some users might prefer a calendar-driven algorithm such as: do -a yearly backup the first time a machine is connected during a new -year; do a monthly backup the first that a machine is connected -during a month; etc. This, however, would require a change to the -ccollect configuration files. So, I didn't pursue the idea any -further. - - The code checks to see if the user specified the interval as -AUTO. If so, the auto_interval function is called to select the -interval: - -347a417,420 -> if [ ${INTERVAL} = "AUTO" ] ; then -> auto_interval -> _techo "Selected interval: '$INTERVAL'" -> fi - -The code for auto_interval is as follows (note that it allows 'more -recent' to be defined by either ctime or mtime as per the TSORT -variable): - -125a129,182 -> # Select interval if AUTO -> # -> # For this to work nicely, you have to choose interval names that sort nicely -> # such as int1, int2, int3 or a_daily, b_weekly, c_monthly, etc. -> # -> auto_interval() -> { -> if [ -d "${backup}/intervals" -a -n "$(ls "${backup}/intervals" 2>/dev/null)" ] ; then -> intervals_dir="${backup}/intervals" -> elif [ -d "${CDEFAULTS}/intervals" -a -n "$(ls "${CDEFAULTS}/intervals" 2>/dev/null)" ] ; then -> intervals_dir="${CDEFAULTS}/intervals" -> else -> _exit_err "No intervals are defined. Skipping." -> fi -> echo intervals_dir=${intervals_dir} -> -> trial_interval="$(ls -1r "${intervals_dir}/" | head -n 1)" || \ -> _exit_err "Failed to list contents of ${intervals_dir}/." -> _techo "Considering interval ${trial_interval}" -> most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${trial_interval}.*/$" | head -n 1)" || \ -> _exit_err "Failed to list contents of ${ddir}/." -> _techo " Most recent ${trial_interval}: '${most_recent}'" -> if [ -n "${most_recent}" ]; then -> no_intervals="$(ls -1 "${intervals_dir}/" | wc -l)" -> n=1 -> while [ "${n}" -le "${no_intervals}" ]; do -> trial_interval="$(ls -p1 "${intervals_dir}/" | tail -n+${n} | head -n 1)" -> _techo "Considering interval '${trial_interval}'" -> c_interval="$(cat "${intervals_dir}/${trial_interval}" 2>/dev/null)" -> m=$((${n}+1)) -> set -- "${ddir}" -maxdepth 1 -> while [ "${m}" -le "${no_intervals}" ]; do -> interval_m="$(ls -1 "${intervals_dir}/" | tail -n+${m} | head -n 1)" -> most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${interval_m}\..*/$" | head -n 1)" -> _techo " Most recent ${interval_m}: '${most_recent}'" -> if [ -n "${most_recent}" ] ; then -> set -- "$@" -$NEWER "${ddir}/${most_recent}" -> fi -> m=$((${m}+1)) -> done -> count=$(pcmd find "$@" -iname "${trial_interval}*" | wc -l) -> _techo " Found $count more recent backups of ${trial_interval} (limit: ${c_interval})" -> if [ "$count" -lt "${c_interval}" ] ; then -> break -> fi -> n=$((${n}+1)) -> done -> fi -> export INTERVAL="${trial_interval}" -> D_FILE_INTERVAL="${intervals_dir}/${INTERVAL}" -> D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) -> } -> -> # - -While I consider the auto_interval code to be developmental, I have -been using it for my nightly backups and it works for me. - - One last change: For auto_interval to work, it needs "ddir" to -be defined first. Consequently, I had to move the following code -so it gets run before auto_interval is called: - -369,380c442,443 -< -< # -< # Destination is a path -< # -< if [ ! -f "${c_dest}" ]; then -< _exit_err "Destination ${c_dest} is not a file. Skipping." -< else -< ddir=$(cat "${c_dest}"); ret="$?" -< if [ "${ret}" -ne 0 ]; then -< _exit_err "Destination ${c_dest} is not readable. Skipping." -< fi -< fi -345a403,414 -> # Destination is a path -> # -> if [ ! -f "${c_dest}" ]; then -> _exit_err "Destination ${c_dest} is not a file. Skipping." -> else -> ddir=$(cat "${c_dest}"); ret="$?" -> if [ "${ret}" -ne 0 ]; then -> _exit_err "Destination ${c_dest} is not readable. Skipping." -> fi -> fi -> -> # - - I have some other ideas but this is all I have implemented at -the moment. Files are attached. - - Thanks again for developing ccollect and let me know what you -think. - -Regards, - -John - --- - John L. Lawless, Ph.D. - Redwood Scientific, Inc. - 1005 Terra Nova Blvd - Pacifica, CA 94044-4300 - 1-650-738-8083 - diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/a.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/a.patch deleted file mode 100644 index bf4b6625..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/a.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- ccollect-0.7.1.sh 2009-02-02 03:39:42.000000000 -0800 -+++ ccollect-0.7.1-a.sh 2009-05-24 21:30:38.000000000 -0700 -@@ -364,10 +364,12 @@ - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi -+ # Verify source is up and accepting connections before deleting any old backups -+ rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping." - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/b.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/b.patch deleted file mode 100644 index c0266d2d..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/b.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- ccollect-0.7.1-a.sh 2009-05-24 21:30:38.000000000 -0700 -+++ ccollect-0.7.1-b.sh 2009-05-24 21:32:00.000000000 -0700 -@@ -551,10 +551,12 @@ - # the rsync part - # - - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? -+ # Correct the modification time: -+ pcmd touch "${destination_dir}" - - # - # remove marking here - # - pcmd rm "${destination_dir}.${c_marker}" || \ diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/c.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/c.patch deleted file mode 100644 index 7b5f9a8e..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/c.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- ccollect-0.7.1-b.sh 2009-05-24 21:32:00.000000000 -0700 -+++ ccollect-0.7.1-c.sh 2009-05-24 21:39:43.000000000 -0700 -@@ -40,10 +40,13 @@ - VERSION=0.7.1 - RELEASE="2009-02-02" - HALF_VERSION="ccollect ${VERSION}" - FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -+#TSORT="tc" ; NEWER="cnewer" -+TSORT="t" ; NEWER="newer" -+ - # - # CDATE: how we use it for naming of the archives - # DDATE: how the user should see it in our output (DISPLAY) - # - CDATE="date +%Y%m%d-%H%M" -@@ -513,14 +516,14 @@ - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # -- # Use ls -1c instead of -1t, because last modification maybe the same on all -- # and metadate update (-c) is updated by rsync locally. -- # -- last_dir="$(pcmd ls -tcp1 "${ddir}" | grep '/$' | head -n 1)" || \ -+ # Depending on your file system, you may want to sort on: -+ # 1. mtime (modification time) with TSORT=t, or -+ # 2. ctime (last change time, usually) with TSORT=tc -+ last_dir="$(pcmd ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/ccollect-0.7.1.sh b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/ccollect-0.7.1.sh deleted file mode 100644 index e14dcfca..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/ccollect-0.7.1.sh +++ /dev/null @@ -1,615 +0,0 @@ -#!/bin/sh -# -# 2005-2009 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 - -# -# Standard variables (stolen from cconf) -# -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/${__myname}.XXXXXX") -VERSION=0.7.1 -RELEASE="2009-02-02" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - awk "{ print \"[${name}] \" \$0 }" -} - -pcmd() -{ - if [ "$remote_host" ]; then - ssh "$remote_host" "$@" - else - "$@" - fi -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "${__myname}: [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - f_incomplete="delete_incomplete" - c_incomplete="${backup}/${f_incomplete}" - c_remote_host="${backup}/remote_host" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a file. Skipping." - else - ddir=$(cat "${c_dest}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Destination ${c_dest} is not readable. Skipping." - fi - fi - - # - # do we backup to a remote host? then set pre-cmd - # - if [ -f "${c_remote_host}" ]; then - # adjust ls and co - remote_host=$(cat "${c_remote_host}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Remote host file ${c_remote_host} exists, but is not readable. Skipping." - fi - destination="${remote_host}:${ddir}" - else - remote_host="" - destination="${ddir}" - fi - export remote_host - - # - # check for existence / use real name - # - ( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping." - - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" -o -f "${CDEFAULTS}/${f_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null - - i=0 - while read incomplete; do - eval incomplete_$i=\"$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval realincomplete=\"\$incomplete_$j\" - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ - _exit_err "Removing ${realincomplete} failed." - fi - j=$(($j+1)) - done - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g')" || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - pcmd ls -p1 "$ddir" | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - i=0 - while read to_remove; do - eval remove_$i=\"${to_remove}\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval to_remove=\"\$remove_$j\" - _techo "Removing ${to_remove} ..." - pcmd rm ${VVERBOSE} -rf "${ddir}/${to_remove}" || \ - _exit_err "Removing ${to_remove} failed." - j=$(($j+1)) - done - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Use ls -1c instead of -1t, because last modification maybe the same on all - # and metadate update (-c) is updated by rsync locally. - # - last_dir="$(pcmd ls -tcp1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - set -- "$@" "--link-dest=${ddir}/${last_dir}" - _techo "Hard linking from ${last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${ddir}/${INTERVAL}.${destination_date}.$$" - destination_full="${destination}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - pcmd mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - pcmd touch "${destination_dir}.${c_marker}" - - # - # the rsync part - # - - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? - - # - # remove marking here - # - pcmd rm "${destination_dir}.${c_marker}" || \ - _exit_err "Removing ${destination_dir}/${c_marker} failed." - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/ccollect-f.sh b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/ccollect-f.sh deleted file mode 100644 index 5c8952e8..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/ccollect-f.sh +++ /dev/null @@ -1,683 +0,0 @@ -#!/bin/sh -# -# 2005-2009 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written for SyGroup (www.sygroup.ch) -# Date: Mon Nov 14 11:45:11 CET 2005 - -# -# Standard variables (stolen from cconf) -# -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=${CCOLLECT_CONF}/sources -CDEFAULTS=${CCOLLECT_CONF}/defaults -CPREEXEC="${CDEFAULTS}/pre_exec" -CPOSTEXEC="${CDEFAULTS}/post_exec" - -TMP=$(mktemp "/tmp/${__myname}.XXXXXX") -VERSION=0.7.1 -RELEASE="2009-02-02" -HALF_VERSION="ccollect ${VERSION}" -FULL_VERSION="ccollect ${VERSION} (${RELEASE})" - -#TSORT="tc" ; NEWER="cnewer" -TSORT="t" ; NEWER="newer" - -# -# CDATE: how we use it for naming of the archives -# DDATE: how the user should see it in our output (DISPLAY) -# -CDATE="date +%Y%m%d-%H%M" -DDATE="date +%Y-%m-%d-%H:%M:%S" - -# -# unset parallel execution -# -PARALLEL="" - -# -# catch signals -# -trap "rm -f \"${TMP}\"" 1 2 15 - -# -# Functions -# - -# time displaying echo -_techo() -{ - echo "$(${DDATE}): $@" -} - -# exit on error -_exit_err() -{ - _techo "$@" - rm -f "${TMP}" - exit 1 -} - -add_name() -{ - awk "{ print \"[${name}] \" \$0 }" -} - -pcmd() -{ - if [ "$remote_host" ]; then - ssh "$remote_host" "$@" - else - "$@" - fi -} - -# -# Version -# -display_version() -{ - echo "${FULL_VERSION}" - exit 0 -} - -# -# Tell how to use us -# -usage() -{ - echo "${__myname}: [args] " - echo "" - echo " ccollect creates (pseudo) incremental backups" - echo "" - echo " -h, --help: Show this help screen" - echo " -p, --parallel: Parallelise backup processes" - echo " -a, --all: Backup all sources specified in ${CSOURCES}" - echo " -v, --verbose: Be very verbose (uses set -x)" - echo " -V, --version: Print version information" - echo "" - echo " This is version ${VERSION}, released on ${RELEASE}" - echo " (the first version was written on 2005-12-05 by Nico Schottelius)." - echo "" - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 -} - -# -# Select interval if AUTO -# -# For this to work nicely, you have to choose interval names that sort nicely -# such as int1, int2, int3 or a_daily, b_weekly, c_monthly, etc. -# -auto_interval() -{ - if [ -d "${backup}/intervals" -a -n "$(ls "${backup}/intervals" 2>/dev/null)" ] ; then - intervals_dir="${backup}/intervals" - elif [ -d "${CDEFAULTS}/intervals" -a -n "$(ls "${CDEFAULTS}/intervals" 2>/dev/null)" ] ; then - intervals_dir="${CDEFAULTS}/intervals" - else - _exit_err "No intervals are defined. Skipping." - fi - echo intervals_dir=${intervals_dir} - - trial_interval="$(ls -1r "${intervals_dir}/" | head -n 1)" || \ - _exit_err "Failed to list contents of ${intervals_dir}/." - _techo "Considering interval ${trial_interval}" - most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${trial_interval}.*/$" | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}/." - _techo " Most recent ${trial_interval}: '${most_recent}'" - if [ -n "${most_recent}" ]; then - no_intervals="$(ls -1 "${intervals_dir}/" | wc -l)" - n=1 - while [ "${n}" -le "${no_intervals}" ]; do - trial_interval="$(ls -p1 "${intervals_dir}/" | tail -n+${n} | head -n 1)" - _techo "Considering interval '${trial_interval}'" - c_interval="$(cat "${intervals_dir}/${trial_interval}" 2>/dev/null)" - m=$((${n}+1)) - set -- "${ddir}" -maxdepth 1 - while [ "${m}" -le "${no_intervals}" ]; do - interval_m="$(ls -1 "${intervals_dir}/" | tail -n+${m} | head -n 1)" - most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${interval_m}\..*/$" | head -n 1)" - _techo " Most recent ${interval_m}: '${most_recent}'" - if [ -n "${most_recent}" ] ; then - set -- "$@" -$NEWER "${ddir}/${most_recent}" - fi - m=$((${m}+1)) - done - count=$(pcmd find "$@" -iname "${trial_interval}*" | wc -l) - _techo " Found $count more recent backups of ${trial_interval} (limit: ${c_interval})" - if [ "$count" -lt "${c_interval}" ] ; then - break - fi - n=$((${n}+1)) - done - fi - export INTERVAL="${trial_interval}" - D_FILE_INTERVAL="${intervals_dir}/${INTERVAL}" - D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) -} - -# -# need at least interval and one source or --all -# -if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version - else - usage - fi -fi - -# -# check for configuraton directory -# -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration found in " \ - "\"${CCOLLECT_CONF}\" (is \$CCOLLECT_CONF properly set?)" - -# -# Filter arguments -# -export INTERVAL="$1"; shift -i=1 -no_sources=0 - -# -# Create source "array" -# -while [ "$#" -ge 1 ]; do - eval arg=\"\$1\"; shift - - if [ "${NO_MORE_ARGS}" = 1 ]; then - eval source_${no_sources}=\"${arg}\" - no_sources=$((${no_sources}+1)) - - # make variable available for subscripts - eval export source_${no_sources} - else - case "${arg}" in - -a|--all) - ALL=1 - ;; - -v|--verbose) - VERBOSE=1 - ;; - -p|--parallel) - PARALLEL=1 - ;; - -h|--help) - usage - ;; - --) - NO_MORE_ARGS=1 - ;; - *) - eval source_${no_sources}=\"$arg\" - no_sources=$(($no_sources+1)) - ;; - esac - fi - - i=$(($i+1)) -done - -# also export number of sources -export no_sources - -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - -# -# Look, if we should take ALL sources -# -if [ "${ALL}" = 1 ]; then - # reset everything specified before - no_sources=0 - - # - # get entries from sources - # - cwd=$(pwd -P) - ( cd "${CSOURCES}" && ls > "${TMP}" ); ret=$? - - [ "${ret}" -eq 0 ] || _exit_err "Listing of sources failed. Aborting." - - while read tmp; do - eval source_${no_sources}=\"${tmp}\" - no_sources=$((${no_sources}+1)) - done < "${TMP}" -fi - -# -# Need at least ONE source to backup -# -if [ "${no_sources}" -lt 1 ]; then - usage -else - _techo "${HALF_VERSION}: Beginning backup using interval ${INTERVAL}" -fi - -# -# Look for pre-exec command (general) -# -if [ -x "${CPREEXEC}" ]; then - _techo "Executing ${CPREEXEC} ..." - "${CPREEXEC}"; ret=$? - _techo "Finished ${CPREEXEC} (return code: ${ret})." - - [ "${ret}" -eq 0 ] || _exit_err "${CPREEXEC} failed. Aborting" -fi - -# -# check default configuration -# - -D_FILE_INTERVAL="${CDEFAULTS}/intervals/${INTERVAL}" -D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) - - -# -# Let's do the backup -# -i=0 -while [ "${i}" -lt "${no_sources}" ]; do - - # - # Get current source - # - eval name=\"\$source_${i}\" - i=$((${i}+1)) - - export name - - # - # start ourself, if we want parallel execution - # - if [ "${PARALLEL}" ]; then - "$0" "${INTERVAL}" "${name}" & - continue - fi - -# -# Start subshell for easy log editing -# -( - # - # Stderr to stdout, so we can produce nice logs - # - exec 2>&1 - - # - # Configuration - # - backup="${CSOURCES}/${name}" - c_source="${backup}/source" - c_dest="${backup}/destination" - c_exclude="${backup}/exclude" - 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" - f_incomplete="delete_incomplete" - c_incomplete="${backup}/${f_incomplete}" - c_remote_host="${backup}/remote_host" - - # - # Marking backups: If we abort it's not removed => Backup is broken - # - c_marker=".ccollect-marker" - - # - # Times - # - begin_s=$(date +%s) - - # - # unset possible options - # - EXCLUDE="" - RSYNC_EXTRA="" - SUMMARY="" - VERBOSE="" - VVERBOSE="" - DELETE_INCOMPLETE="" - - _techo "Beginning to backup" - - # - # Standard configuration checks - # - if [ ! -e "${backup}" ]; then - _exit_err "Source does not exist." - fi - - # - # configuration _must_ be a directory - # - if [ ! -d "${backup}" ]; then - _exit_err "\"${name}\" is not a cconfig-directory. Skipping." - fi - - # - # first execute pre_exec, which may generate destination or other - # parameters - # - if [ -x "${c_pre_exec}" ]; then - _techo "Executing ${c_pre_exec} ..." - "${c_pre_exec}"; ret="$?" - _techo "Finished ${c_pre_exec} (return code ${ret})." - - if [ "${ret}" -ne 0 ]; then - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # - # Destination is a path - # - if [ ! -f "${c_dest}" ]; then - _exit_err "Destination ${c_dest} is not a file. Skipping." - else - ddir=$(cat "${c_dest}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Destination ${c_dest} is not readable. Skipping." - fi - fi - - # - # interval definition: First try source specific, fallback to default - # - if [ ${INTERVAL} = "AUTO" ] ; then - auto_interval - _techo "Selected interval: '$INTERVAL'" - fi - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - - if [ -z "${c_interval}" ]; then - _exit_err "No definition for interval \"${INTERVAL}\" found. Skipping." - fi - fi - - # - # Source checks - # - if [ ! -f "${c_source}" ]; then - _exit_err "Source description \"${c_source}\" is not a file. Skipping." - else - source=$(cat "${c_source}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Source ${c_source} is not readable. Skipping." - fi - fi - # Verify source is up and accepting connections before deleting any old backups - rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping." - - # - # do we backup to a remote host? then set pre-cmd - # - if [ -f "${c_remote_host}" ]; then - # adjust ls and co - remote_host=$(cat "${c_remote_host}"); ret="$?" - if [ "${ret}" -ne 0 ]; then - _exit_err "Remote host file ${c_remote_host} exists, but is not readable. Skipping." - fi - destination="${remote_host}:${ddir}" - else - remote_host="" - destination="${ddir}" - fi - export remote_host - - # - # check for existence / use real name - # - ( pcmd cd "$ddir" ) || _exit_err "Cannot change to ${ddir}. Skipping." - - - # - # Check whether to delete incomplete backups - # - if [ -f "${c_incomplete}" -o -f "${CDEFAULTS}/${f_incomplete}" ]; then - DELETE_INCOMPLETE="yes" - fi - - # NEW method as of 0.6: - # - insert ccollect default parameters - # - insert options - # - insert user options - - # - # rsync standard options - # - - set -- "$@" "--archive" "--delete" "--numeric-ids" "--relative" \ - "--delete-excluded" "--sparse" - - # - # exclude list - # - if [ -f "${c_exclude}" ]; then - set -- "$@" "--exclude-from=${c_exclude}" - fi - - # - # Output a summary - # - if [ -f "${c_summary}" ]; then - set -- "$@" "--stats" - fi - - # - # Verbosity for rsync - # - if [ -f "${c_vverbose}" ]; then - set -- "$@" "-vv" - elif [ -f "${c_verbose}" ]; then - set -- "$@" "-v" - fi - - # - # extra options for rsync provided by the user - # - if [ -f "${c_rsync_extra}" ]; then - while read line; do - set -- "$@" "$line" - done < "${c_rsync_extra}" - fi - - # - # Check for incomplete backups - # - pcmd ls -1 "$ddir/${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null - - i=0 - while read incomplete; do - eval incomplete_$i=\"$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval realincomplete=\"\$incomplete_$j\" - _techo "Incomplete backup: ${realincomplete}" - if [ "${DELETE_INCOMPLETE}" = "yes" ]; then - _techo "Deleting ${realincomplete} ..." - pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ - _exit_err "Removing ${realincomplete} failed." - fi - j=$(($j+1)) - done - - # - # check if maximum number of backups is reached, if so remove - # use grep and ls -p so we only look at directories - # - count="$(pcmd ls -p1 "${ddir}" | grep "^${INTERVAL}\..*/\$" | wc -l \ - | sed 's/^ *//g')" || _exit_err "Counting backups failed" - - _techo "Existing backups: ${count} Total keeping backups: ${c_interval}" - - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - - pcmd ls -${TSORT}p1r "$ddir" | grep "^${INTERVAL}\..*/\$" | \ - head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - i=0 - while read to_remove; do - eval remove_$i=\"${to_remove}\" - i=$(($i+1)) - done < "${TMP}" - - j=0 - while [ "$j" -lt "$i" ]; do - eval to_remove=\"\$remove_$j\" - _techo "Removing ${to_remove} ..." - pcmd rm ${VVERBOSE} -rf "${ddir}/${to_remove}" || \ - _exit_err "Removing ${to_remove} failed." - j=$(($j+1)) - done - fi - - - # - # Check for backup directory to clone from: Always clone from the latest one! - # - # Depending on your file system, you may want to sort on: - # 1. mtime (modification time) with TSORT=t, or - # 2. ctime (last change time, usually) with TSORT=tc - last_dir="$(pcmd ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \ - _exit_err "Failed to list contents of ${ddir}." - - # - # clone from old backup, if existing - # - if [ "${last_dir}" ]; then - set -- "$@" "--link-dest=${ddir}/${last_dir}" - _techo "Hard linking from ${last_dir}" - fi - - - # set time when we really begin to backup, not when we began to remove above - destination_date=$(${CDATE}) - destination_dir="${ddir}/${INTERVAL}.${destination_date}.$$" - destination_full="${destination}/${INTERVAL}.${destination_date}.$$" - - # give some info - _techo "Beginning to backup, this may take some time..." - - _techo "Creating ${destination_dir} ..." - pcmd mkdir ${VVERBOSE} "${destination_dir}" || \ - _exit_err "Creating ${destination_dir} failed. Skipping." - - # - # added marking in 0.6 (and remove it, if successful later) - # - pcmd touch "${destination_dir}.${c_marker}" - - # - # the rsync part - # - _techo "Transferring files..." - rsync "$@" "${source}" "${destination_full}"; ret=$? - # Correct the modification time: - pcmd touch "${destination_dir}" - - # - # remove marking here - # - if [ "$ret" -ne 12 ] ; then - pcmd rm "${destination_dir}.${c_marker}" || \ - _exit_err "Removing ${destination_dir}/${c_marker} failed." - fi - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi - - # - # post_exec - # - if [ -x "${c_post_exec}" ]; then - _techo "Executing ${c_post_exec} ..." - "${c_post_exec}"; ret=$? - _techo "Finished ${c_post_exec}." - - if [ ${ret} -ne 0 ]; then - _exit_err "${c_post_exec} failed." - fi - fi - - # Calculation - end_s=$(date +%s) - - full_seconds=$((${end_s} - ${begin_s})) - hours=$((${full_seconds} / 3600)) - seconds=$((${full_seconds} - (${hours} * 3600))) - minutes=$((${seconds} / 60)) - seconds=$((${seconds} - (${minutes} * 60))) - - _techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)" - -) | add_name -done - -# -# Be a good parent and wait for our children, if they are running wild parallel -# -if [ "${PARALLEL}" ]; then - _techo "Waiting for children to complete..." - wait -fi - -# -# Look for post-exec command (general) -# -if [ -x "${CPOSTEXEC}" ]; then - _techo "Executing ${CPOSTEXEC} ..." - "${CPOSTEXEC}"; ret=$? - _techo "Finished ${CPOSTEXEC} (return code: ${ret})." - - if [ ${ret} -ne 0 ]; then - _techo "${CPOSTEXEC} failed." - fi -fi - -rm -f "${TMP}" -_techo "Finished ${WE}" - -# vim: set shiftwidth=3 tabstop=3 expandtab : diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/d.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/d.patch deleted file mode 100644 index 7fae4107..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/d.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- ccollect-0.7.1-c.sh 2009-05-24 21:39:43.000000000 -0700 -+++ ccollect-0.7.1-d.sh 2009-05-24 21:47:09.000000000 -0700 -@@ -492,12 +492,12 @@ - if [ "${count}" -ge "${c_interval}" ]; then - substract=$((${c_interval} - 1)) - remove=$((${count} - ${substract})) - _techo "Removing ${remove} backup(s)..." - -- pcmd ls -p1 "$ddir" | grep "^${INTERVAL}\..*/\$" | \ -- sort -n | head -n "${remove}" > "${TMP}" || \ -+ pcmd ls -${TSORT}p1r "$ddir" | grep "^${INTERVAL}\..*/\$" | \ -+ head -n "${remove}" > "${TMP}" || \ - _exit_err "Listing old backups failed" - - i=0 - while read to_remove; do - eval remove_$i=\"${to_remove}\" diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/e.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/e.patch deleted file mode 100644 index d277c06e..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/e.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- ccollect-0.7.1-d.sh 2009-05-24 21:47:09.000000000 -0700 -+++ ccollect-0.7.1-e.sh 2009-05-24 22:18:16.000000000 -0700 -@@ -560,12 +560,14 @@ - pcmd touch "${destination_dir}" - - # - # remove marking here - # -- pcmd rm "${destination_dir}.${c_marker}" || \ -- _exit_err "Removing ${destination_dir}/${c_marker} failed." -+ if [ "$ret" -ne 12 ] ; then -+ pcmd rm "${destination_dir}.${c_marker}" || \ -+ _exit_err "Removing ${destination_dir}/${c_marker} failed." -+ fi - - _techo "Finished backup (rsync return code: $ret)." - if [ "${ret}" -ne 0 ]; then - _techo "Warning: rsync exited non-zero, the backup may be broken (see rsync errors)." - fi diff --git a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/f.patch b/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/f.patch deleted file mode 100644 index 3bedf34e..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/jlawless-2009-06-03/old/f.patch +++ /dev/null @@ -1,119 +0,0 @@ ---- ccollect-0.7.1-e.sh 2009-05-24 22:18:16.000000000 -0700 -+++ ccollect-0.7.1-f.sh 2009-05-24 22:19:50.000000000 -0700 -@@ -124,10 +124,64 @@ - echo " Retrieve latest ccollect at http://unix.schottelius.org/ccollect/" - exit 0 - } - - # -+# Select interval if AUTO -+# -+# For this to work nicely, you have to choose interval names that sort nicely -+# such as int1, int2, int3 or a_daily, b_weekly, c_monthly, etc. -+# -+auto_interval() -+{ -+ if [ -d "${backup}/intervals" -a -n "$(ls "${backup}/intervals" 2>/dev/null)" ] ; then -+ intervals_dir="${backup}/intervals" -+ elif [ -d "${CDEFAULTS}/intervals" -a -n "$(ls "${CDEFAULTS}/intervals" 2>/dev/null)" ] ; then -+ intervals_dir="${CDEFAULTS}/intervals" -+ else -+ _exit_err "No intervals are defined. Skipping." -+ fi -+ echo intervals_dir=${intervals_dir} -+ -+ trial_interval="$(ls -1r "${intervals_dir}/" | head -n 1)" || \ -+ _exit_err "Failed to list contents of ${intervals_dir}/." -+ _techo "Considering interval ${trial_interval}" -+ most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${trial_interval}.*/$" | head -n 1)" || \ -+ _exit_err "Failed to list contents of ${ddir}/." -+ _techo " Most recent ${trial_interval}: '${most_recent}'" -+ if [ -n "${most_recent}" ]; then -+ no_intervals="$(ls -1 "${intervals_dir}/" | wc -l)" -+ n=1 -+ while [ "${n}" -le "${no_intervals}" ]; do -+ trial_interval="$(ls -p1 "${intervals_dir}/" | tail -n+${n} | head -n 1)" -+ _techo "Considering interval '${trial_interval}'" -+ c_interval="$(cat "${intervals_dir}/${trial_interval}" 2>/dev/null)" -+ m=$((${n}+1)) -+ set -- "${ddir}" -maxdepth 1 -+ while [ "${m}" -le "${no_intervals}" ]; do -+ interval_m="$(ls -1 "${intervals_dir}/" | tail -n+${m} | head -n 1)" -+ most_recent="$(pcmd ls -${TSORT}p1 "${ddir}" | grep "^${interval_m}\..*/$" | head -n 1)" -+ _techo " Most recent ${interval_m}: '${most_recent}'" -+ if [ -n "${most_recent}" ] ; then -+ set -- "$@" -$NEWER "${ddir}/${most_recent}" -+ fi -+ m=$((${m}+1)) -+ done -+ count=$(pcmd find "$@" -iname "${trial_interval}*" | wc -l) -+ _techo " Found $count more recent backups of ${trial_interval} (limit: ${c_interval})" -+ if [ "$count" -lt "${c_interval}" ] ; then -+ break -+ fi -+ n=$((${n}+1)) -+ done -+ fi -+ export INTERVAL="${trial_interval}" -+ D_FILE_INTERVAL="${intervals_dir}/${INTERVAL}" -+ D_INTERVAL=$(cat "${D_FILE_INTERVAL}" 2>/dev/null) -+} -+ -+# - # need at least interval and one source or --all - # - if [ $# -lt 2 ]; then - if [ "$1" = "-V" -o "$1" = "--version" ]; then - display_version -@@ -344,12 +398,28 @@ - _exit_err "${c_pre_exec} failed. Skipping." - fi - fi - - # -+ # Destination is a path -+ # -+ if [ ! -f "${c_dest}" ]; then -+ _exit_err "Destination ${c_dest} is not a file. Skipping." -+ else -+ ddir=$(cat "${c_dest}"); ret="$?" -+ if [ "${ret}" -ne 0 ]; then -+ _exit_err "Destination ${c_dest} is not readable. Skipping." -+ fi -+ fi -+ -+ # - # interval definition: First try source specific, fallback to default - # -+ if [ ${INTERVAL} = "AUTO" ] ; then -+ auto_interval -+ _techo "Selected interval: '$INTERVAL'" -+ fi - c_interval="$(cat "${backup}/intervals/${INTERVAL}" 2>/dev/null)" - - if [ -z "${c_interval}" ]; then - c_interval="${D_INTERVAL}" - -@@ -371,22 +441,10 @@ - fi - # Verify source is up and accepting connections before deleting any old backups - rsync "$source" >/dev/null || _exit_err "Source ${source} is not readable. Skipping." - - # -- # Destination is a path -- # -- if [ ! -f "${c_dest}" ]; then -- _exit_err "Destination ${c_dest} is not a file. Skipping." -- else -- ddir=$(cat "${c_dest}"); ret="$?" -- if [ "${ret}" -ne 0 ]; then -- _exit_err "Destination ${c_dest} is not readable. Skipping." -- fi -- fi -- -- # - # do we backup to a remote host? then set pre-cmd - # - if [ -f "${c_remote_host}" ]; then - # adjust ls and co - remote_host=$(cat "${c_remote_host}"); ret="$?" diff --git a/software/ccollect/download/ccollect-0.8/contrib/lucky-2009-07-22/ccollect_logwrapper_destination.patch b/software/ccollect/download/ccollect-0.8/contrib/lucky-2009-07-22/ccollect_logwrapper_destination.patch deleted file mode 100644 index 5fb20b5a..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/lucky-2009-07-22/ccollect_logwrapper_destination.patch +++ /dev/null @@ -1,14 +0,0 @@ -31c31,41 -< logdir="${LOGCONF}/destination" ---- -> c_dest="${LOGCONF}/destination" -> -> if [ ! -f ${c_dest} ]; then -> _exit_err "Destination ${c_dest} is not a file. Skipping." -> else -> logdir=$(cat "${c_dest}"); ret="$?" -> if [ "${ret}" -ne 0 ]; then -> _exit_err "Destination ${c_dest} is not readable. Skipping." -> fi -> fi -> diff --git a/software/ccollect/download/ccollect-0.8/contrib/lucky-2009-07-22/ccollect_stats.sh b/software/ccollect/download/ccollect-0.8/contrib/lucky-2009-07-22/ccollect_stats.sh deleted file mode 100644 index 886be092..00000000 --- a/software/ccollect/download/ccollect-0.8/contrib/lucky-2009-07-22/ccollect_stats.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# 2007 Daniel Aubry -# 2008 Nico Schottelius (added minimal header) -# -# Copying license: GPL2-only -# - -# TODO: -# add variables, add copying, add configuration - -if [ ! -e /tmp/ccollect-stats.lock ] -then - touch /tmp/ccollect-stats.lock - - # changes after license clearify - # for dest in /etc/ccollect/sources/ -type f -name destination | while read line - - find /etc/ccollect/sources/*/destination | while read line - do - d=$(basename $(cat $line)) - echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log - du -sh $line/* | tee -a /var/log/backup.log - done - rm /tmp/ccollect-stats.lock -fi diff --git a/software/ccollect/download/ccollect-0.8/doc/HACKING b/software/ccollect/download/ccollect-0.8/doc/HACKING deleted file mode 100644 index 00db4d11..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/HACKING +++ /dev/null @@ -1,37 +0,0 @@ -Hello Hacker, - -I really appreciate your interest in hacking this software, but -I am kind of critical when seeing patches. Thus I created this -file to give you some hints of my thinking quirks. - - -Submitting patches ------------------- -Make my life easier, make your life easier, use a version control system (vcs). -For this software the preferred vcs is git. Clone the latest repo, create -a new local branch (git checkout -b ) write down your ideas. - -When you're done, push all your stuff out to some public repo and drop a -mail to the mailinglist, what you did and where to get it. - - -Introduce a feature or change behaviour ---------------------------------------- -Uhh, fancy! You have had a great idea, then it's time to change -the major version, so others know that something changed. - -If the configuration format is changed, add a script to tools/ -to allow users upgrade their configuration to this major version. - -And now comes the most difficult part: Add documentation. Nobody -benefits from your cool feature, if it is not known. I know, writing -documentation is not so much fun, but you also expect good documentation -for this software, don't you? - - -If you think my thinking quirks must be corrected -------------------------------------------------- -See above ("Submitting patches") and submit a patch to this file. - - -Thanks for reading. diff --git a/software/ccollect/download/ccollect-0.8/doc/braindumps/LOCAL_vs._REMOTE b/software/ccollect/download/ccollect-0.8/doc/braindumps/LOCAL_vs._REMOTE deleted file mode 100644 index f2a40b70..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/braindumps/LOCAL_vs._REMOTE +++ /dev/null @@ -1,35 +0,0 @@ - to Local to Remote - backup destination is exiting - pre/postexec runs locally - --link-dest? - /delete_incomplete - can chech ddir - - can check destination dir - -> dooooooo it before! - - - remote_host! - => rddir_ls: - incomplete: ls -1 "${INTERVAL}"*".${c_marker}" - - host support? - ssh-host-support? - - => ssh_host => save to host - execute commands there! - - rm! - - --link-dest? - - --link-dest=DIR - => remote dirs, rsync remote - => works!!!! - - local_destination - remote_destination - => remote_* - - both - configuration is local (what to where) - diff --git a/software/ccollect/download/ccollect-0.8/doc/braindumps/README b/software/ccollect/download/ccollect-0.8/doc/braindumps/README deleted file mode 100644 index 973addcb..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/braindumps/README +++ /dev/null @@ -1 +0,0 @@ -Do not read the files in this directory diff --git a/software/ccollect/download/ccollect-0.8/doc/ccollect-restoring.text b/software/ccollect/download/ccollect-0.8/doc/ccollect-restoring.text deleted file mode 100644 index 7bb29eae..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/ccollect-restoring.text +++ /dev/null @@ -1,196 +0,0 @@ -ccollect - Restoring backups -============================ -Nico Schottelius -0.1, for all ccollect version, Initial Version from 2008-07-04 -:Author Initials: NS - - -Having backups is half the way to success on a failure. -Knowing how to restore the systems is the other half. - - -Introduction ------------- -You made your backup and now you want to restore your -data. If you backuped only parts of a computer and need -only to restore them, it is pretty easy to achieve. -Restoring a whole system is a little bit more -difficult and needs some knowledge of the operating system. - - -Restoring parts of a system -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Log into your backupserver. Change into the -backup directory you want to restore from. -Do `rsync -av './files/to/be/recovered/' 'sourcehost:/files/to/be/recovered/'. - -Restoring a complete system (general) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Boot the system to be rescued from a media that contains low level tools -for your OS (like partitioning, formatting) and the necessary tools -(ssh, tar or rsync). -Use -- create the necessary partition table (or however it is called - -Get a live-cd, that ships with -- rsync / tar -- ssh (d) -> from backupserver -- support for the filesystems - -Restoring a complete FreeBSD system -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Get a FreeBSD-live-cd (I used the FreeBSD 7.0 live CD, -but FreeSBIE (http://www.freesbie.org/), -Frenzy (http://frenzy.org.ua/en/) or the -FreeBSD LiveCD (http://livecd.sourceforge.net/) -may also be helpful. The following way uses the FreeBSD 7.0 -live cd. - -So boot it up, select your language. After that select -*Custom* then *Partition*. Create the slice like you want -to have it. Then let the installer write into the MBR, -select *BootMgr*. - -After that create the necessary labels, select *Label* and -make sure "Newfs" flag is set to "Y". - -Finally, select *Commit* and choose an installation type -that must fail, because we want the installer only to write -the partitions and labels, but not to install anything on it. - -At this point we have created the base for restoring the whole -system. Move back to the main menu and select *Fixit*, then -*CDROM/DVD*. This starts a shell on TTY4, which can be reached -by pressing *ALT+F4*. Then enter the following data: - --------------------------------------------------------------------------------- - rootdir=/ccollect - rootdev=/dev/ad0s1a - backupserver=192.42.23.5 - - # create destination directory - mkdir "$rootdir" - - # mount root; add other mounts if you created more labels - mount "$rootdev" "$rootdir" - - # find out which network devices exist - ifconfig - - # create the directory, because dhclient needs it - mkdir /var/db - - # retrieve an ip address - dhclient fxp0 - - # test connection - ssh "$backupserver" - - # go back - backupserver% exit --------------------------------------------------------------------------------- - -Now we've prepared everything for the real backup. The next problem maybe, -that we cannot (should not) be able to login as root to the backup server. -Additionally the system to be restored may not reachable from the backup server, -because it is behind a firewall or nat. -Thus I describe a way, that is a little bit more complicated for those, that -do not have these limitations, but works in both scenarios. - -I just start netcat on the local machine, pipe its output to tar and put -both into the background. Then I create a ssh tunnel to the backupserver, -which is then able to connect to my netcat "directly". - --------------------------------------------------------------------------------- - # user to connect to the backupserver - myuser=nico - - # our name in the backup - restorehost=server1 - - # the instance to be used - backup="weekly.20080718-2327.23053" - - # Need to setup lo0 first, the livecd did not do it for me - ifconfig lo0 127.0.0.1 up - - # change to the destination directory - cd "$rootdir" - - # start listener - ( nc -l 127.0.0.1 4242 | tar xvf - ) & - - # verify that it runs correctly - sockstat -4l - - # connect as a normal user to the backupserver - ssh -R4242:127.0.0.1:4242 "$myuser@$backupserver" - - # become root - backupserver% su - - - # change to the source directory - backupserver# cd /home/server/backup/$restorehost/$backup - - # begin the backup - backup # tar cf - . | nc 127.0.0.1 4242 - - # wait until it finishes, press ctrl-c to kill netcat - # logoff the backupserver - backupserver# exit - backupserver% exit --------------------------------------------------------------------------------- - -Now we are just right next to be finished. Still, we have to take care about -some things: - -- Do the block devices still have the same names? If not, correct /etc/fstab. -- Do the network devices still have the same names? If not, correct /etc/rc.conf. - -If everything is fixed, let us finish the restore: - --------------------------------------------------------------------------------- - # cleanly umount it - umount "$rootdir" - - # reboot, remove the cd and bootup the restored system - reboot --------------------------------------------------------------------------------- - -Restoring a complete Linux system -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Knoppix - knoppix 2 at boot prompt - - rootdir=/ccollect - dev=/dev/hda - rootdev="${dev}1" - fs=jfs - tar - - # create the needed partitions - cfdisk $dev - - mkfs.$fs $rootdev - - mkdir $rootdir - - mount $rootdev $rootdir - - cd $rootdir - - pump - ifconfig - - # start listener (from now on it is the same as - ( nc -l 127.0.0.1 4242 | tar xvf - ) & - - - -TO BE DONE - -Future ------- -I think about automating full system recoveries in the future. -I think it could be easily done and here are some hints for -people who would like to implement it. diff --git a/software/ccollect/download/ccollect-0.8/doc/ccollect.text b/software/ccollect/download/ccollect-0.8/doc/ccollect.text deleted file mode 100644 index 720bcc8b..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/ccollect.text +++ /dev/null @@ -1,1174 +0,0 @@ -ccollect - Installing, Configuring and Using -============================================ -Nico Schottelius -0.8, for ccollect 0.8, Initial Version from 2006-01-13 -:Author Initials: NS - - -(pseudo) incremental backup -with different exclude lists -using hardlinks and `rsync` - - -Introduction ------------- -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatible (like 'dash', 'ksh', 'zsh', 'bash', ...). - - -Supported and tested operating systems and architectures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`ccollect` was successfully tested on the following platforms: - -- GNU/Linux on amd64/hppa/i386/ppc/ARM -- FreeBSD on amd64/i386 -- Mac OS X 10.5 -- NetBSD on alpha/amd64/i386/sparc/sparc64 -- OpenBSD on amd64 - -It *should* run on any Unix that supports `rsync` and has a POSIX-compatible -bourne shell. If your platform is not listed above and you have it successfully -running, please drop me a mail. - - -Why you COULD only backup from remote hosts, not to them -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -While considering the design of ccollect, I thought about enabling -backup to *remote* hosts. Though this sounds like a nice feature -('"Backup my notebook to the server now."'), in my opinion it is a -bad idea to backup to a remote host. - -But as more and more people requested this feature, it was implemented, -so you have the choice whether you want to use it or not. - - -Reason -^^^^^^ -If you want to backup *TO* a remote host, you have to loosen security on it. - -Imagine the following situation: You backup your farm of webservers *TO* -a backup host somewhere else. -Now one of your webservers which has access to your backup host gets -compromised. - -Your backup server will be compromised, too. - -And the attacker will have access to all data on the other webservers. - - -Doing it securely -^^^^^^^^^^^^^^^^^ -Think of it the other way round: The backup server (now behind a -firewall, not accessable from outside) connects to the -webservers and pulls the data *from* them. If someone gets access to one -of the webservers, this person will perhaps not even see your machine. If -the attacker sees connections from a host to the compromised -machine, she will not be able to log in on the backup machine. -All other backups are still secure. - - -Incompatibilities and changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -Versions 0.7 and 0.8 -^^^^^^^^^^^^^^^^^^^^^ - -.The argument order changed: -- Old: " [args] " -- New: "[args] " - -If you did not use arguments (most people do not), nothing will -change for you. - -.Deletion of incomplete backups using the 'delete_incomplete' option -- Old: Only incomplete backups from the current interval have been removed -- New: All incomplete backups are deleted - -.Support for standard values -- Old: no support -- New: Options in $CCOLLECT_CONF/defaults are used as defaults (see below) - -Versions 0.6 and 0.7 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `destination` changed: -- Before 0.7 it was a (link to a) directory -- As of 0.7 it is a textfile containing the destination - -You can update your configuration using `tools/config-pre-0.7-to-0.7.sh`. - -.Added 'remote_host' -- As of 0.7 it is possible to backup *to* hosts (see section remote_host below). - - -Versions 0.5 and 0.6 -^^^^^^^^^^^^^^^^^^^^^ -.The format of `rsync_options` changed: -- Before 0.6 it was whitespace delimeted -- As of 0.6 it is newline seperated (so you can pass whitespaces to `rsync`) - -You can update your configuration using `tools/config-pre-0.6-to-0.6.sh`. - -.The name of the backup directories changed: -- Before 0.6: "date +%Y-%m-%d-%H%M" -- As of 0.6: "date +%Y%m%d-%H%M" (better readable, date is closer together) - -For the second change there is no updated needed, as XXXX- is always before -XXXXX (- comes before digit). - - - -Versions 0.4 and 0.5 -^^^^^^^^^^^^^^^^^^^^^ -Not a real incompatibilty, but seems to fit in this section: - -.0.5 does *NOT* require -- PaX -- bc - -anymore! - - -Versions < 0.4 and 0.4 -^^^^^^^^^^^^^^^^^^^^^^ - -Since `ccollect` 0.4 there are several incompatibilities with earlier -versions: - -.List of incompatibilities -- `pax` (Posix) is now required, `cp -al` (GNU specific) is removed -- "interval" was written with two 'l' (ell), which is wrong in English -- Changed the name of backup directories, removed the colon in the interval -- ccollect will now exit when preexec returns non-zero -- ccollect now reports when postexec returns non-zero - -You can convert your old configuration directory using -`config-pre-0.4-to-0.4.sh`, which can be found in the *tools/* -subdirectory: - --------------------------------------------------------------------------------- -[10:05] hydrogenium:ccollect-0.4# ./tools/config-pre-0.4-to-0.4.sh /etc/ccollect --------------------------------------------------------------------------------- - - -Quick start ------------ -For those who do not want to read the whole long document: - --------------------------------------------------------------------------------- -# get latest ccollect tarball from http://www.nico.schottelius.org/software/ccollect/ -# replace value for CCV with the current version -export CCV=0.8 - -# -# replace 'wget' with 'fetch' on bsd -# -holen=wget -"$holen" http://www.nico.schottelius.org/software/ccollect/ccollect-${CCV}.tar.bz2 - -# extract the tarball, change to the newly created directory -tar -xvjf ccollect-${CCV}.tar.bz2 -cd ccollect-${CCV} - -# create mini-configuration -# first create directory structure -mkdir -p miniconfig/defaults/intervals -mkdir miniconfig/sources - -# create sample intervals -echo 2 > miniconfig/defaults/intervals/testinterval -echo 3 > miniconfig/defaults/intervals/testinterval2 - -# create destination directory, where the backups will be kept -mkdir ~/DASI - -# create sample source, which will be saved -mkdir miniconfig/sources/testsource - -# We will save '/bin' to the directory '~/DASI' -echo '/bin' > miniconfig/sources/testsource/source - -# configure ccollect to use ~/DASI as destination -echo ~/DASI > miniconfig/sources/testsource/destination - -# We want to see what happens and also a small summary at the end -touch miniconfig/sources/testsource/verbose -touch miniconfig/sources/testsource/summary - -echo "do the backup, twice" -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "the third time ccollect begins to remove old backups" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource - -echo "Now we add another interval, ccollect should clone from existent ones" -echo -n "Hit enter to see it" -read -CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval2 testsource - -echo "Let's see how much space we used with two backups and compare it to /bin" -du -s ~/DASI /bin - -# report success -echo "Please report success using ./tools/report_success.sh" - --------------------------------------------------------------------------------- - -Cutting and pasting the complete section above to your shell will result in -the download of ccollect, the creation of a sample configuration and the -execution of some backups. - - -Requirements ------------- - -Installing ccollect -~~~~~~~~~~~~~~~~~~~ -For the installation you need at least - - - the latest ccollect package (http://www.nico.schottelius.org/software/ccollect/) - - either `cp` and `chmod` or `install` - - for more comfort: `make` - - for rebuilding the generated documentation: additionally `asciidoc` - - -Using ccollect -~~~~~~~~~~~~~~ -.Running ccollect requires the following tools to be installed: - - `date` - - `rsync` - - `ssh` (if you want to use rsync over ssh, which is recommened for security) - - -Installing ----------- -Either type 'make install' or simply copy it to a directory in your -$PATH and execute 'chmod *0755* /path/to/ccollect.sh'. If you like -to use the new management scripts (available since 0.6), copy the -following scripts to a directory in $PATH: - -- `tools/ccollect_add_source.sh` -- `tools/ccollect_analyse_logs.sh.sh` -- `tools/ccollect_delete_source.sh` -- `tools/ccollect_list_intervals.sh` -- `tools/ccollect_logwrapper.sh` - -After having installed and used ccollect, report success using -'./tools/report_success.sh'. - - -Configuring ------------ -For configuration aid have a look at the above mentioned tools, which can assist -you quite well. When you are successfully using `ccollect`, report success using -`tools/report_success.sh`. - - -Runtime options -~~~~~~~~~~~~~~~ -`ccollect` looks for its configuration in '/etc/ccollect' or, if set, in -the directory specified by the variable '$CCOLLECT_CONF': --------------------------------------------------------------------------------- -# sh-compatible (dash, zsh, mksh, ksh, bash, ...) -$ CCOLLECT_CONF=/your/config/dir ccollect.sh ... - -# csh -$ ( setenv CCOLLECT_CONF /your/config/dir ; ccollect.sh ... ) --------------------------------------------------------------------------------- - -When you start `ccollect`, you have to specify in which interval -to backup (daily, weekly, yearly; you can specify the names yourself, see below) -and which sources to backup (or -a to backup all sources). - -The interval specifies how many backups are kept. - -There are also some self-explanatory parameters you can pass to ccollect, -simply use `ccollect.sh --help` for info. - - -General configuration -~~~~~~~~~~~~~~~~~~~~~ -The general configuration can be found in $CCOLLECT_CONF/defaults or -/etc/ccollect/defaults. All options specified there are generally valid for -all source definitions, although the values can be overwritten in the source -configuration. - -All configuration entries are plain-text files -(use UTF-8 for non-ascii characters). - - -Interval definition -^^^^^^^^^^^^^^^^^^^^ -The interval definition can be found in -'$CCOLLECT_CONF/defaults/intervals/' or '/etc/ccollect/defaults/intervals'. -Each file in this directory specifies an interval. The name of the file is -the same as the name of the interval: `intervals/''`. - -The content of this file should be a single line containing a number. -This number defines how many versions of this interval are kept. - -Example: -------------------------------------------------------------------------- - [10:23] zaphodbeeblebrox:ccollect-0.2% ls -l conf/defaults/intervals/ - insgesamt 12 - -rw-r--r-- 1 nico users 3 2005-12-08 10:24 daily - -rw-r--r-- 1 nico users 3 2005-12-08 11:36 monthly - -rw-r--r-- 1 nico users 2 2005-12-08 11:36 weekly - [10:23] zaphodbeeblebrox:ccollect-0.2% cat conf/defaults/intervals/* - 28 - 12 - 4 --------------------------------------------------------------------------------- -This means to keep 28 daily backups, 12 monthly backups and 4 weekly. - - -General pre- and post-execution -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or -'/etc/ccollect/defaults/`pre_exec`' (same with `post_exec`), `ccollect` -will start `pre_exec` before the whole backup process and -`post_exec` after backup of all sources is done. - -The following example describes how to report free disk space in -human readable format before and after the whole backup process: -------------------------------------------------------------------------- -[13:00] hydrogenium:~# mkdir -p /etc/ccollect/defaults/ -[13:00] hydrogenium:~# echo '#!/bin/sh' > /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo '' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# echo 'df -h' >> /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# chmod 0755 /etc/ccollect/defaults/pre_exec -[13:01] hydrogenium:~# ln -s /etc/ccollect/defaults/pre_exec /etc/ccollect/defaults/post_exec -------------------------------------------------------------------------- - - -Source configuration -~~~~~~~~~~~~~~~~~~~~ -Each source configuration exists in '$CCOLLECT_CONF/sources/$name' or -'/etc/ccollect/sources/$name'. - -The name you choose for the subdirectory describes the source. - -Each source contains at least the following files: - - - `source` (a text file containing the `rsync` compatible path to backup) - - `destination` (a text file containing the directory we should backup to) - -Additionally a source may have the following files: - - - `pre_exec` program to execute before backing up *this* source - - `post_exec` program to execute after backing up *this* source - - - `verbose` whether to be verbose (passes -v to `rsync`) - - `very_verbose` be very verbose (`mkdir -v`, `rm -v` and `rsync -vv`) - - `summary` create a transfer summary when `rsync` finished - - - `exclude` exclude list for `rsync`. newline seperated list. - - `rsync_options` extra options for `rsync`. newline seperated list. - - - `delete_incomplete` delete incomplete backups - - `remote_host` host to backup to - - `rsync_failure_codes` list of rsync exit codes that indicate complete failure - - `mtime` Sort backup directories based on their modification time - - `quiet_if_down` Suppress error messages if source is not connectable - - -Example: --------------------------------------------------------------------------------- - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2 - insgesamt 12 - lrwxrwxrwx 1 nico users 20 2005-11-17 16:44 destination - -rw-r--r-- 1 nico users 62 2005-12-07 17:43 exclude - drwxr-xr-x 2 nico users 4096 2005-12-07 17:38 intervals - -rw-r--r-- 1 nico users 15 2005-11-17 16:44 source - [10:47] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - [10:47] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals - insgesamt 4 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/daily - 5 - [10:48] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/source - /home/nico/vpn --------------------------------------------------------------------------------- - -Default options -^^^^^^^^^^^^^^^ -If you add '$CCOLLECT_CONF/defaults/`option_name`', the value will -be used in abscence of the option in a source. If you want to prevent -the default value to be used in a source, you can create the file -'$CCOLLECT_CONF/sources/$name/`no_option_name`' (i.e. prefix it with -'no_'. - -Example: --------------------------------------------------------------------------------- - [9:04] ikn2:ccollect% touch conf/defaults/verbose - [9:04] ikn2:ccollect% touch conf/sources/local/no_verbose --------------------------------------------------------------------------------- -This enables the verbose option for all sources, but disables it for the -source 'local'. - -If an option is specified in the defaults folder and in the source, -the source specific version overrides the default one: - -Example: --------------------------------------------------------------------------------- - [9:05] ikn2:ccollect% echo "backup-host" > conf/defaults/remote_host - [9:05] ikn2:ccollect% echo "different-host" > conf/sources/local/remote_host --------------------------------------------------------------------------------- - -You can use all source options as defaults, with the exception of - -- `source` -- `destination` -- `pre_exec` -- `post_exec` - -Detailed description of "source" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`source` describes a `rsync` compatible source (one line only). - -For instance 'backup_user@foreign_host:/home/server/video'. -To use the `rsync` protocol without the `ssh`-tunnel, use -'rsync::USER@HOST/SRC'. For more information have a look at the manpage -of `rsync`(1). - - -Detailed description of "destination" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`destination` must be a text file containing the destination directory. -`destination` *USED* to be a link to the destination directory in -earlier versions, so do not be confused if you see such examples. - - -Example: --------------------------------------------------------------------------------- - [11:36] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/destination - /home/nico/backupdir --------------------------------------------------------------------------------- - - -Detailed description of "remote_host" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`remote_host` must be a text file containing the destination host. -If this file is existing, you are backing up your data *TO* this host -and *not* to you local host. - -*Warning*: You need to have `ssh` access to the remote host. `rsync` and -`ccollect` will connect to that host via `ssh`. `ccollect` needs the shell -access, because it needs to find out how many backups exist on the remote -host and to be able to delete them. - - -Example: --------------------------------------------------------------------------------- - [10:17] denkbrett:ccollect-0.7.0% cat conf/sources/remote1/remote_host - home.schottelius.org --------------------------------------------------------------------------------- - -It may contain all the ssh-specific values like 'myuser@yourhost.ch'. - - -Detailed description of "verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`verbose` tells `ccollect` that the log should contain verbose messages. - -If this file exists in the source specification *-v* will be passed to `rsync`. - - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% touch conf/sources/testsource1/verbose --------------------------------------------------------------------------------- - - -Detailed description of "very_verbose" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`very_verbose` tells `ccollect` that it should log very verbosely. - -If this file exists in the source specification *-v* will be passed to -`rsync`, `rm` and `mkdir`. - - -Example: --------------------------------------------------------------------------------- - [23:67] nohost:~% touch conf/sources/testsource1/very_verbose --------------------------------------------------------------------------------- - - -Detailed description of "summary" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `summary` in the source definition, -`ccollect` will present you a nice summary at the end. - -------------------------------------------------------------------------------- -backup:~# touch /etc/ccollect/sources/root/summary -backup:~# ccollect.sh werktags root -==> ccollect.sh: Beginning backup using interval werktags <== -[root] Beginning to backup this source ... -[root] Currently 3 backup(s) exist, total keeping 50 backup(s). -[root] Beginning to backup, this may take some time... -[root] Hard linking... -[root] Transferring files... -[root] -[root] Number of files: 84183 -[root] Number of files transferred: 32 -[root] Total file size: 26234080536 bytes -[root] Total transferred file size: 9988252 bytes -[root] Literal data: 9988252 bytes -[root] Matched data: 0 bytes -[root] File list size: 3016771 -[root] File list generation time: 1.786 seconds -[root] File list transfer time: 0.000 seconds -[root] Total bytes sent: 13009119 -[root] Total bytes received: 2152 -[root] -[root] sent 13009119 bytes received 2152 bytes 2891393.56 bytes/sec -[root] total size is 26234080536 speedup is 2016.26 -[root] Successfully finished backup. -==> Finished ccollect.sh <== -------------------------------------------------------------------------------- - -You could also combine it with `verbose` or `very_verbose`, but these -already print some statistics (though not all / the same as presented by -`summary`). - - -Detailed description of "exclude" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`exclude` specifies a list of paths to exclude. The entries are seperated by a newline (\n). - - -Example: --------------------------------------------------------------------------------- - [11:35] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/exclude - openvpn-2.0.1.tar.gz - nicht_reinnehmen - etwas mit leerzeichenli - something with spaces is not a problem --------------------------------------------------------------------------------- - - -Detailed description of "intervals/" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the subdirectory `intervals/` in your source configuration -directory, you can specify individiual intervals for this specific source. -Each file in this directory describes an interval. - - -Example: --------------------------------------------------------------------------------- - [11:37] zaphodbeeblebrox:ccollect-0.2% ls -l conf/sources/testsource2/intervals/ - insgesamt 8 - -rw-r--r-- 1 nico users 2 2005-12-07 17:38 daily - -rw-r--r-- 1 nico users 3 2005-12-14 11:33 yearly - [11:37] zaphodbeeblebrox:ccollect-0.2% cat conf/sources/testsource2/intervals/* - 5 - 20 --------------------------------------------------------------------------------- - - -Detailled description of "rsync_options" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create the file `rsync_options` in your source configuration, -all the parameters in this file will be passed to rsync. This -way you can pass additional options to rsync. For instance you can tell rsync -to show progress ("--progress"), or which -password-file ("--password-file") -to use for automatic backup over the rsync-protocol. - - -Example: --------------------------------------------------------------------------------- - [23:42] hydrogenium:ccollect-0.2% cat conf/sources/test_rsync/rsync_options - --password-file=/home/user/backup/protected_password_file --------------------------------------------------------------------------------- - - -Detailled description of "pre_exec" and "post_exec" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -When you create `pre_exec` and / or `post_exec` in your source -configuration, `ccollect` will execute this command before and -respectively after doing the backup for *this specific* source. -If you want to have pre-/post-exec before and after *all* -backups, see above for general configuration. - - -Example: --------------------------------------------------------------------------------- -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/pre_exec -#!/bin/sh - -# Show whats free before -df -h -[13:09] hydrogenium:ccollect-0.3% cat conf/sources/with_exec/post_exec -#!/bin/sh - -# Show whats free after -df -h --------------------------------------------------------------------------------- - - -Detailed description of "delete_incomplete" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you create the file `delete_incomplete` in a source specification directory, -`ccollect` will look for incomplete backups (when the whole `ccollect` process -was interrupted) and remove them. Without this file `ccollect` will only warn -the user. - -Detailed description of "rsync_failure_codes" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you have the file `rsync_failure_codes` in your source configuration -directory, it should contain a newline-separated list of numbers representing -rsync exit codes. If rsync exits with any code in this list, a marker will -be left in the destination directory indicating failure of this backup. If -you have enabled delete_incomplete, then this backup will be deleted during -the next ccollect run on the same interval. - -Detailed description of "mtime" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -By default, ccollect.sh chooses the most recent backup directory for cloning or -the oldest for deletion based on the directory's last change time (ctime). -With this option, the sorting is done based on modification time (mtime). With -this version of ccollect, the ctime and mtime of your backups will normally -be the same and this option has no effect. However, if you, for example, move -your backups to another hard disk using cp -a or rsync -a, you should use this -option because the ctimes are not preserved during such operations. - -If you have any backups in your repository made with ccollect version 0.7.1 or -earlier, do not use this option. - -Detailed description of "quiet_if_down" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -By default, ccollect.sh emits a series of error messages if a source is not -connectable. With this option enabled, ccollect still reports that the -source is not connectable but the associated error messages generated by -rsync or ssh are suppressed. You may want to use this option for sources, -like notebook PCs, that are often disconnected. - - -Hints ------ - -Smart logging -~~~~~~~~~~~~~ -Since ccollect-0.6.1 you can use the ccollect-logwrapper.sh(1) for logging. -You call it the same way you call ccollect.sh and it will create a -logfile containing the output of ccollect.sh. For more information look -at the manpage 'ccollect-logwrapper'. The following is an example running -ccollect-logwrapper.sh: - --------------------------------------------------------------------------------- -u0219 ~ # ~chdscni9/ccollect-logwrapper.sh daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Starting with arguments: daily u0160.nshq.ch.netstream.com -ccollect-logwrapper.sh (11722): Finished. --------------------------------------------------------------------------------- - - -Using a different ssh port -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mostly easy is to use your ~/.ssh/config file: - --------------------------------------------------------------------------------- -host mx2.schottelius.org - Port 2342 --------------------------------------------------------------------------------- - -If you only use that port for backup only and normally want to use another port, -you can add 'HostName' and "HostKeyAlias" (if you also have different -keys on the different ports): - --------------------------------------------------------------------------------- -Host hhydrogenium - Hostname bruehe.schottelius.org - Port 666 - HostKeyAlias hydrogenium - -Host bruehe - Hostname bruehe.schottelius.org - Port 22 - HostKeyAlias bruehe.schottelius.org --------------------------------------------------------------------------------- - - -Using source names or interval in pre_/post_exec scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The pre-/post_exec scripts can access some internal variables from `ccollect`: - -- INTERVAL: The interval specified on the command line -- no_sources: number of sources -- source_$NUM: the name of the source -- name: the name of the currently being backuped source (not available for - generic pre_exec script) - - -Using rsync protocol without ssh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you have a computer with little computing power, it may be useful to use -rsync without ssh, directly using the rsync protocol -(specify 'user@host::share' in `source`). You may wish to use -`rsync_options` to specify a password file to use for automatic backup. - - -Example: --------------------------------------------------------------------------------- -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/source -backup@webserver::backup-share - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_options ---password-file=/etc/ccollect/sources/sample.backup.host.org/rsync_password - -backup:~# cat /etc/ccollect/sources/sample.backup.host.org/rsync_password -this_is_the_rsync_password --------------------------------------------------------------------------------- -This hint was reported by Daniel Aubry. - - -Not excluding top-level directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you exclude "/proc" or "/mnt" from your backup, you may run into -trouble when you restore your backup. When you use "/proc/\*" or "/mnt/\*" -instead, `ccollect` will backup empty directories. - - -[NOTE] -=========================================== -When those directories contain hidden files -(those beginning with a dot (*.*)), -they will still be transferred! -=========================================== -This hint was reported by Marcus Wagner. - - -Re-using already created rsync-backups -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you used `rsync` directly before you use `ccollect`, you can -use this old backup as initial backup for `ccollect`: You -simply move it into a directory below the destination directory -and name it "'interval'.0". - - -Example: -------------------------------------------------------------------------------- -backup:/home/backup/web1# ls -bin dev etc initrd lost+found mnt root srv usr vmlinuz -boot doc home lib media opt sbin tmp var vmlinuz.old - -backup:/home/backup/web1# mkdir daily.0 - -# ignore error about copying to itself -backup:/home/backup/web1# mv * daily.0 2>/dev/null - -backup:/home/backup/web1# ls -daily.0 -------------------------------------------------------------------------------- -Now you can use /home/backup/web1 as the `destination` for the backup. - -[NOTE] -=============================================================================== -It does not matter anymore how you name your directory, as `ccollect` uses -the -c option from `ls` to find out which directory to clone from. -=============================================================================== - - -[NOTE] -=============================================================================== -Older versions (pre 0.6, iirc) had a problem, if you named the first backup -something like "daily.initial". It was needed to use the "*0*" (or some -number that is lower than the current year) as extension. `ccollect` -used `sort` to find the latest backup. `ccollect` itself uses -'interval.YEARMONTHDAY-HOURMINUTE.PID'. This notation was *always* before -"daily.initial", as numbers are earlier in the list -which is produced by `sort`. So, if you had a directory named "daily.initial", -`ccollect` always diffed against this backup and transfered and deleted -files which where deleted in previous backups. This means you simply -wasted resources, but your backup had beer complete anyway. -=============================================================================== - - -Using pre_/post_exec -~~~~~~~~~~~~~~~~~~~~ -Your pre_/post_exec script does not need to be a script, you can also -use a link to - - - an existing program - - an already written script - -The only requirement is that it is executable. - - -Using source specific interval definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When you are backing up multiple hosts via cron each night, it may be -a problem that host "big_server" may only have 4 daily backups, because -otherwise its backup device will be full. But for all other hosts -you want to keep 20 daily backups. In this case you would create -`/etc/ccollect/default/intervals/daily` containing "20" and -`/etc/ccollect/sources/big_server/intervals/daily` containing "4". - -Source specific intervals always overwrite the default values. -If you have to specify it individually for every host, because -of different requirements, you can even omit creating -`/etc/ccollect/default/intervals/daily`. - - -Comparing backups -~~~~~~~~~~~~~~~~~ -If you want to see what changed between two backups, you can use -`rsync` directly: - --------------------------------------------------------------------------------- -[12:00] u0255:ddba034.netstream.ch# rsync -n -a --delete --stats --progress daily.20080324-0313.17841/ daily.20080325-0313.31148/ --------------------------------------------------------------------------------- -This results in a listing of changes. Because we pass -n to rsync no transfer -is made (i.e. report only mode)" - -This hint was reported by Daniel Aubry. - - -Testing for host reachabilty -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you want to test whether the host you try to backup is reachable, you can use -the following script as source specific pre-exec: - --------------------------------------------------------------------------------- -#!/bin/sh -# ping -c1 -q `cat "/etc/ccollect/sources/$name/source" | cut -d"@" -f2 | cut -d":" -f1` --------------------------------------------------------------------------------- - -This prevents the deletion of old backups, if the host is not reachable. - -This hint was reported by Daniel Aubry. - - -Easy check for errors -~~~~~~~~~~~~~~~~~~~~~ -If you want to see whether there have been any errors while doing the backup, -you can run `ccollect` together with `ccollect_analyse_logs.sh`: --------------------------------------------------------------------------------- -$ ccollect | ccollect_analyse_logs.sh e --------------------------------------------------------------------------------- - - -F.A.Q. ------- - -What happens if one backup is broken or empty? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Let us assume that one backup failed (connection broke or the source -hard disk had some failures). Therefore we've got one incomplete backup in our history. - -`ccollect` will transfer the missing files the next time you use it. -This leads to - - - more transferred files - - much greater disk space usage, as no hardlinks can be used - -If the whole `ccollect` process was interrupted, `ccollect` (since 0.6) can -detect that and remove the incomplete backups, so you can clone from a complete -backup instead - - -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) - - -Why does ccollect say "Permission denied" with my pre-/postexec script? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The most common error is that you have not given your script the correct -permissions. Try `chmod 0755 /etc/ccollect/sources/'yoursource'/*_exec``. - - -Why does the backup job fail when part of the source is a link? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a part of your path you specified in the source is a -(symbolic, hard links are not possible for directories) link, -the backup *must* fail. - -First of all, let us have a look at how it looks like: - -------------------------------------------------------------------------------- -==> ccollect 0.4: Beginning backup using interval taeglich <== -[testsource] Sa Apr 29 00:01:55 CEST 2006 Beginning to backup -[testsource] Currently 0 backup(s) exist(s), total keeping 10 backup(s). -[testsource] Beginning to backup, this may take some time... -[testsource] Creating /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874 ... -[testsource] Sa Apr 29 00:01:55 CEST 2006 Transferring files... -[testsource] rsync: recv_generator: mkdir "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[testsource] rsync: stat "/etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico/projekte/ccollect" failed: No such file or directory (2) -[...] -------------------------------------------------------------------------------- - -So what is the problem? It is very obvious when you look deeper into it: - -------------------------------------------------------------------------------- -% cat /etc/ccollect/sources/testsource/source -/home/user/nico/projekte/ccollect/ccollect-0.4 -% ls -l /home/user/nico/projekte -lrwxrwxrwx 1 nico nico 29 2005-12-02 23:28 /home/user/nico/projekte -> oeffentlich/computer/projekte -% ls -l /etc/ccollect/sources/testsource/destination/taeglich.2006-04-29-0001.3874/home/user/nico -lrwxrwxrwx 1 nico nico 29 2006-04-29 00:01 projekte -> oeffentlich/computer/projekte -------------------------------------------------------------------------------- - -`rsync` creates the directory structure before it creates the symbolic link. -This link now links to something not reachable (dead link). It is -impossible to create subdirectories under the broken link. - -In conclusion you cannot use paths with a linked part. - -However, you can backup directories containing symbolic links -(in this case you could backup /home/user/nico, which contains -/home/user/nico/projekte and oeffentlich/computer/projekte). - - -How can I prevent missing the right time to enter my password? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As `ccollect` first deletes the old backups, it may take some time -until `rsync` requests the password for the `ssh` session from you. - -The easiest way not to miss that point is running `ccollect` in `screen`, -which has the ability to monitor the output for activity. So as soon as -your screen beeps, after `ccollect` began to remove the last directory, -you can enter your password (have a look at screen(1), especially "C-a M" -and "C-a _", for more information). - - -Examples --------- - -A backup host configuration from scratch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --------------------------------------------------------------------------------- -srwali01:~# mkdir /etc/ccollect -srwali01:~# mkdir -p /etc/ccollect/defaults/intervals/ -srwali01:~# echo 28 > /etc/ccollect/defaults/intervals/taeglich -srwali01:~# echo 52 > /etc/ccollect/defaults/intervals/woechentlich -srwali01:~# cd /etc/ccollect/ -srwali01:/etc/ccollect# mkdir sources -srwali01:/etc/ccollect# cd sources/ -srwali01:/etc/ccollect/sources# ls -srwali01:/etc/ccollect/sources# mkdir local-root -srwali01:/etc/ccollect/sources# cd local-root/ -srwali01:/etc/ccollect/sources/local-root# echo / > source -srwali01:/etc/ccollect/sources/local-root# cat > exclude << EOF -> /proc -> /sys -> /mnt -> EOF -srwali01:/etc/ccollect/sources/local-root# echo /mnt/hdbackup/local-root > destination -srwali01:/etc/ccollect/sources/local-root# mkdir /mnt/hdbackup/local-root -srwali01:/etc/ccollect/sources/local-root# ccollect.sh taeglich local-root -/o> ccollect.sh: Beginning backup using interval taeglich -/=> Beginning to backup "local-root" ... -|-> 0 backup(s) already exist, keeping 28 backup(s). --------------------------------------------------------------------------------- - - -After that, I added some more sources: --------------------------------------------------------------------------------- -srwali01:~# cd /etc/ccollect/sources -srwali01:/etc/ccollect/sources# mkdir windos-wl6 -srwali01:/etc/ccollect/sources# cd windos-wl6/ -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/win/SYS/WL6 > source -srwali01:/etc/ccollect/sources/windos-wl6# echo /mnt/hdbackup/wl6 > destination -srwali01:/etc/ccollect/sources/windos-wl6# mkdir /mnt/hdbackup/wl6 -srwali01:/etc/ccollect/sources/windos-wl6# cd .. -srwali01:/etc/ccollect/sources# mkdir windos-daten -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/win/Daten > source -srwali01:/etc/ccollect/sources/windos-daten# echo /mnt/hdbackup/windos-daten > destination -srwali01:/etc/ccollect/sources/windos-daten# mkdir /mnt/hdbackup/windos-daten - -# Now add some remote source -srwali01:/etc/ccollect/sources/windos-daten# cd .. -srwali01:/etc/ccollect/sources# mkdir srwali03 -srwali01:/etc/ccollect/sources# cd srwali03/ -srwali01:/etc/ccollect/sources/srwali03# cat > exclude << EOF -> /proc -> /sys -> /mnt -> /home -> EOF -srwali01:/etc/ccollect/sources/srwali03# echo 'root@10.103.2.3:/' > source -srwali01:/etc/ccollect/sources/srwali03# echo /mnt/hdbackup/srwali03 > destination -srwali01:/etc/ccollect/sources/srwali03# mkdir /mnt/hdbackup/srwali03 --------------------------------------------------------------------------------- - - -Using hard-links requires less disk space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -------------------------------------------------------------------------- -# du (coreutils) 5.2.1 -[10:53] srsyg01:sources% du -sh ~/backupdir -4.6M /home/nico/backupdir -[10:53] srsyg01:sources% du -sh ~/backupdir/* -4.1M /home/nico/backupdir/daily.2005-12-08-10:52.28456 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28484 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28507 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28531 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28554 -4.1M /home/nico/backupdir/daily.2005-12-08-10:53.28577 - -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/ -186M /mnt/hdbackup/wl6/ -srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/* -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:42.312 -147M /mnt/hdbackup/wl6/taeglich.2005-12-08-14:45.588 -------------------------------------------------------------------------- - -The backup of our main fileserver: -------------------------------------------------------------------------- -backup:~# df -h /home/backup/srsyg01/ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/backup--01-srsyg01 - 591G 451G 111G 81% /home/backup/srsyg01 -backup:~# du -sh /home/backup/srsyg01/* -432G /home/backup/srsyg01/daily.2006-01-24-01:00.15990 -432G /home/backup/srsyg01/daily.2006-01-26-01:00.30152 -434G /home/backup/srsyg01/daily.2006-01-27-01:00.4596 -435G /home/backup/srsyg01/daily.2006-01-28-01:00.11998 -437G /home/backup/srsyg01/daily.2006-01-29-01:00.19115 -437G /home/backup/srsyg01/daily.2006-01-30-01:00.26405 -438G /home/backup/srsyg01/daily.2006-01-31-01:00.1148 -439G /home/backup/srsyg01/daily.2006-02-01-01:00.8321 -439G /home/backup/srsyg01/daily.2006-02-02-01:00.15383 -439G /home/backup/srsyg01/daily.2006-02-03-01:00.22567 -16K /home/backup/srsyg01/lost+found -backup:~# du --version | head -n1 -du (coreutils) 5.2.1 -------------------------------------------------------------------------- - -Newer versions of du also detect the hardlinks, so we can even compare -the sizes directly with du: -------------------------------------------------------------------------- -[8:16] eiche:~# du --version | head -n 1 -du (GNU coreutils) 5.93 -[8:17] eiche:schwarzesloch# du -slh hydrogenium/* -19G hydrogenium/durcheinander.0 -18G hydrogenium/durcheinander.2006-01-17-00:27.13820 -19G hydrogenium/durcheinander.2006-01-25-23:18.31328 -19G hydrogenium/durcheinander.2006-01-26-00:11.3332 -[8:22] eiche:schwarzesloch# du -sh hydrogenium/* -19G hydrogenium/durcheinander.0 -12G hydrogenium/durcheinander.2006-01-17-00:27.13820 -1.5G hydrogenium/durcheinander.2006-01-25-23:18.31328 -200M hydrogenium/durcheinander.2006-01-26-00:11.3332 -------------------------------------------------------------------------- - -In the second report (without -l) the sizes include the space the inodes of -the hardlinks allocate. - - -A collection of backups on the backup server -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -All the data of my important hosts is backuped to eiche into -/mnt/schwarzesloch/backup: - -------------------------------------------------------------------------- -[9:24] eiche:backup# ls * -creme: -woechentlich.2006-01-26-22:22.4153 woechentlich.2006-02-12-11:48.2461 -woechentlich.2006-01-26-22:23.4180 woechentlich.2006-02-18-23:00.7898 -woechentlich.2006-02-05-02:43.14281 woechentlich.2006-02-25-23:00.13480 -woechentlich.2006-02-06-00:24.15509 woechentlich.2006-03-04-23:00.25439 - -hydrogenium: -durcheinander.2006-01-27-11:16.6391 durcheinander.2006-02-13-01:07.2895 -durcheinander.2006-01-30-19:29.9505 durcheinander.2006-02-17-08:20.6707 -durcheinander.2006-01-30-22:27.9623 durcheinander.2006-02-24-16:24.12461 -durcheinander.2006-02-03-09:52.12885 durcheinander.2006-03-03-19:17.18075 -durcheinander.2006-02-05-23:00.15068 durcheinander.2006-03-17-22:41.5007 - -scice: -woechentlich.2006-02-04-10:32.13766 woechentlich.2006-02-16-23:00.6185 -woechentlich.2006-02-05-23:02.15093 woechentlich.2006-02-23-23:00.11783 -woechentlich.2006-02-06-08:22.15994 woechentlich.2006-03-02-23:00.17346 -woechentlich.2006-02-06-19:40.16321 woechentlich.2006-03-09-23:00.29317 -woechentlich.2006-02-12-11:51.2514 woechentlich.2006-03-16-23:00.4218 -------------------------------------------------------------------------- - -And this incremental backup and the archive are copied to an external -usb harddisk (attention: you *should* really use -H to backup the backup): - -------------------------------------------------------------------------- -[9:23] eiche:backup# df -h -Filesystem Size Used Avail Use% Mounted on -rootfs 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% / -/dev/root 14G 8.2G 4.9G 63% /dev/.static/dev -tmpfs 10M 444K 9.6M 5% /dev -/dev/hdh 29G 3.7M 29G 1% /mnt/datenklo -tmpfs 110M 4.0K 110M 1% /dev/shm -/dev/mapper/nirvana 112G 90G 23G 81% /mnt/datennirvana -/dev/mapper/schwarzes-loch - 230G 144G 86G 63% /mnt/schwarzesloch -/dev/mapper/archiv 38G 20G 19G 52% /mnt/archiv -/dev/mapper/usb-backup - 280G 36M 280G 1% /mnt/usb/backup -[9:24] eiche:backup# cat ~/bin/sync-to-usb -DDIR=/mnt/usb/backup - -rsync -av -H --delete /mnt/schwarzesloch/ "$DDIR/schwarzesloch/" - -rsync -av -H --delete /mnt/archiv/ "$DDIR/archiv/" -------------------------------------------------------------------------- - - -Processes running when doing ccollect -p -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Truncated output from `ps axuwwwf`: - -------------------------------------------------------------------------- - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily -p ddba034 ddba045 ddba046 ddba047 ddba049 ddna010 ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - R+ 11:40 23:40 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddba034 - S+ 11:40 0:00 | | | | | \_ ssh -l root ddba034.netstream.ch rsync --server --sender -vlogDtprR --numeric-ids . / - S+ 11:41 0:11 | | | | | \_ rsync -a --delete --numeric-ids --relative --delete-excluded --link-dest=/home/server/backup/ddb - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba034 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba034\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba045/destination/daily.2006-10-19-1807.6934 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba045 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba045\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - R+ 11:40 0:02 | | | | | \_ rm -rf /etc/ccollect/sources/ddba046/destination/daily.2006-10-19-1810.7072 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba046 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba046\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba047/destination/daily.2006-10-19-1816.7268 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba047 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba047\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - D+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddba049/destination/daily.2006-10-19-1821.7504 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddba049 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddba049\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - R+ 11:40 0:03 | | | | | \_ rm -rf /etc/ccollect/sources/ddna010/destination/daily.2006-10-19-1805.6849 - S+ 11:40 0:00 | | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna010 - S+ 11:40 0:00 | | | | \_ sed s:^:\[ddna010\] : - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - R+ 12:08 0:00 | | | | \_ rm -rf /etc/ccollect/sources/ddna011/destination/daily.2006-10-20-1502.7824 - S+ 11:40 0:00 | | | \_ /bin/sh /usr/local/bin/ccollect.sh daily ddna011 - S+ 11:40 0:00 | | | \_ sed s:^:\[ddna011\] : - -------------------------------------------------------------------------- -As you can see, six processes are deleting old backups, while one backup -(ddba034) is already copying data. diff --git a/software/ccollect/download/ccollect-0.8/doc/changes/0.7.1 b/software/ccollect/download/ccollect-0.8/doc/changes/0.7.1 deleted file mode 100644 index adf9ff43..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/changes/0.7.1 +++ /dev/null @@ -1,9 +0,0 @@ -* Added support for global delete_incomplete option -* Updated tools/ccollect_analyse_logs.sh: Added more error strings to find -* Removed use of 'basename': Replaced it with standard variables from cconf -* Updated documentation - * More hints - * Updated remote_host description -* Bugfix in shell artihmetic (Jeroen Bruijning) -* Bugfix: Allow "&" in sourcename (Reported by Tiziano Müller) -* Added ccollect_list_intervals.sh to list intervals with values diff --git a/software/ccollect/download/ccollect-0.8/doc/changes/0.8 b/software/ccollect/download/ccollect-0.8/doc/changes/0.8 deleted file mode 100644 index 75f9a63b..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/changes/0.8 +++ /dev/null @@ -1,14 +0,0 @@ -* Introduce consistenst time sorting (John Lawless) -* Check for source connectivity before trying backup (John Lawless) -* Defensive programming patch (John Lawless) -* Some code cleanups (argument parsing, usage) (Nico Schottelius) -* Only consider directories as sources when using -a (Nico Schottelius) -* Fix general parsing problem with -a (Nico Schottelius) -* Fix potential bug when using remote_host, delete_incomplete and ssh (Nico Schottelius) -* Improve removal performance: minimised number of 'rm' calls (Nico Schottelius) -* Support sorting by mtime (John Lawless) -* Improve option handling (John Lawless) -* Add support for quiet operation for dead devices (quiet_if_down) (John Lawless) -* Add smart option parsing, including support for default values (John Lawless) -* Updated and cleaned up documentation (Nico Schottelius) -* Fixed bug "removal of current directory" in ccollect_delete_source.sh (Found by Günter Stöhr, fixed by Nico Schottelius) diff --git a/software/ccollect/download/ccollect-0.8/doc/changes/pre-0.7.1 b/software/ccollect/download/ccollect-0.8/doc/changes/pre-0.7.1 deleted file mode 100644 index 2c3f5228..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/changes/pre-0.7.1 +++ /dev/null @@ -1,100 +0,0 @@ -0.6.2 to 0.7.0: - * Added tools/report_success.sh (try it out!) - * Added ccollect_analyse_logs.sh (see ccollect_analyse_logs(1)) - * Add capability to backup to a host - - Also updated documentation - * Changed "destination" format - - Use tools/config-pre-0.7-to-0.7.sh to convert pre 0.7.x configurations - * Renamed all tools to begin with "ccollect_" - * Updated ccollect_add_source.sh and added manpage - * Updated todos - * Changed license to GPLv3 (from GPLv2) - - -0.6.1 to 0.6.2: - * Added analyse-ccollect-logs.sh - * Fixed bug: Removing of backups was broken since update to 0.6 - (forgot to prepend path...) - * Fixed bug: The marker was always deleted, because rsync deleted it. - Create it outside of the backup destination now. - -0.6 to 0.6.1: - * Added check for destination_base in add_ccollect_source.sh - * Added support for -V and --version - * Added ccollect-logwrapper.sh (and a manpage ;-) - * Changed behaviour: ccollect now clones from the latest existing backup, - independent of the interval. This way different intervals do not - diverge. ccollect uses ls -c to determine latest backup. - -0.5.2 to 0.6: - * Always print return code of rsync - * Add much more timing information - * One option per line in rsync_options now (NOT space seperated) - * Added --sparse as default option - * Added management tools (including manpages): - * add_ccollect_source.sh - * delete_ccollect_source.sh - * list_ccollect_intervals.sh - * Cleaned up exit calls (now always cleanly removes temporary files) - * In theory, added pdf documentation (though, was unable to do it with fop) - * Changed license to GPLv3 (from GPLv2) - -0.5.1 to 0.5.2: - * Display correct error code, if rsync returns non-zero - * Unify messages - * Remove some potential quoting problems - -0.5 to 0.5.1: - * Remove always printed debug information - -0.4.3 to 0.5: - * Removed requirement PaX - * Removed requirement bc - -0.4.2 to 0.4.3: - * Display error code of rsync, if non-zero (for further analysis) - * Fix Makefile, so 'make install' works on others OS - * reorder $RSYNC_EXTRA, so it can be overriden by users - -0.4.1 to 0.4.2: - * fixed bug when $CCOLLECT_CONF is relative - * added Quickstart to documentation - -0.4 to 0.4.1: - * updated documentation, fixed some English related problems - * added Texinfo documentation - * added a manpage (English) - * fixed problem with 'make install' (strip was used) - * fixed possible problem with pre_exec beeing executed to late - * fixed small bug in sed expression: using 'source/' made it fail - -0.3.3 to 0.4: - * `pax` (Posix) is now required, `cp -al` (GNU specific) is removed - * "interval" was written with two 'l' (ell), which is wrong in English - * Changed the name of backup directories, removed the colon in the interval - * ccollect will now exit, when preexec returns non-zero - * ccollect now reports when postexec returns non-zero - -0.3.2 to 0.3.3: - * Fix a small bug, which suppressed information when rsync exits non-zero - -0.3.1 to 0.3.2: - * ccollect now prints the start time, end time and duration of the backup - -0.3 to 0.3.1: - * added support for printing a summary - * some cosmetic changes - -0.2 to 0.3: - * added "very_verbose" - * normal "verbose" is now less verbose - * added general 'pre_exec' and 'post_exec' support - * added source specfifc 'pre_exec' and 'post_exec' support - -0.1 to 0.2: - * Added plausibility check - * Updated and made documentation readable - * implemented verbose option - * Fixed double exclude parameter bug - * Added much better documentation (asciidoc) - * added rsync extra parameter option diff --git a/software/ccollect/download/ccollect-0.8/doc/gpl3-header b/software/ccollect/download/ccollect-0.8/doc/gpl3-header deleted file mode 100644 index 5a1663dc..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/gpl3-header +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# diff --git a/software/ccollect/download/ccollect-0.8/doc/logwrapper.text b/software/ccollect/download/ccollect-0.8/doc/logwrapper.text deleted file mode 100644 index ec12db48..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/logwrapper.text +++ /dev/null @@ -1,29 +0,0 @@ -ccollect-logwrapper: Logging backup output -=========================================== -Nico Schottelius -0.1, for ccollect-logwrapper 0.1, Initial Version from 2007-06-08 -:Author Initials: NS - -This wrapper makes it easy to have logs of ccollect output. - - -Introduction ------------- -/etc/ccollect/logwrapper/ (also uses $CCOLLECT_CONF). - - - pipe: will pipe to a program - staticfile: link to a file - datefile: - contains a string that is passed to date that returns - dynamicfile: - is a program, that returns some string that we use as - a filename - syslog: - syslog-facility - syslog-level - only-stderr: - omit stdout output - -The logger will output to which destinations it logs and with which -parameters it was started. diff --git a/software/ccollect/download/ccollect-0.8/doc/man/ccollect.text b/software/ccollect/download/ccollect-0.8/doc/man/ccollect.text deleted file mode 100644 index 84e95bb0..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/man/ccollect.text +++ /dev/null @@ -1,61 +0,0 @@ -ccollect(1) -=========== -Nico Schottelius - - -NAME ----- -ccollect - (pseudo) incremental backup with different exclude lists using hardlinks and rsync - - -SYNOPSIS --------- -'ccollect.sh' [args] - - -DESCRIPTION ------------ -`ccollect` is a backup utility written in the sh-scripting language. -It does not depend on a specific shell, only `/bin/sh` needs to be -bourne shell compatibel (like 'dash', 'ksh', 'zsh', 'bash', ...). - -For more information refer to the manual titled -"ccollect - Installing, Configuring and Using" (available as text (asciidoc), -texinfo or html). - - -OPTIONS -------- --h, --help:: - Show the help screen - --p, --parallel:: - Parallelise backup processes - --a, --all:: - Backup all sources specified in /etc/ccollect/sources - --v, --verbose:: - Be very verbose (uses set -x). - - -SEE ALSO --------- -ccollect_add_source(1), ccollect_analyse_logs(1), ccollect_logwrapper(1) -ccollect_delete_source(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/software/ccollect/[] - - -COPYING -------- -Copyright \(C) 2006-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_add_source.text b/software/ccollect/download/ccollect-0.8/doc/man/ccollect_add_source.text deleted file mode 100644 index e3b9f83c..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_add_source.text +++ /dev/null @@ -1,75 +0,0 @@ -ccollect_add_source(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect_add_source - create new source for ccollect(1) - - -SYNOPSIS --------- - -'ccollect_add_source.sh' - - -DESCRIPTION ------------ -ccollect_add_source.sh creates a new backup source for use with ccollect(1). -It copies the files from to the source directory with the hostname below -'$CCOLLECT_CONF/sources'. It is designed to run on a backup server to create -new directories for new hosts. - - -FILES ------ -$CCOLLECT_CONF/defaults/sources:: - Main configuration directory. $CCOLLECT_CONF is '/etc/ccollect', if unset. - All the following files reside below this directory. - -exclude:: -summary:: -intervals:: -pre_exec:: -post_exec:: -rsync_options:: -verbose:: -very_verbose:: - Those are the standard configuration files known by ccollect(1). - If the file exist it will be copied to the newly created source. - Directories ('intervals') are copied recursively. - -destination_base:: - A link to the directory where to store the backups. Below this directory - `ccollect_add_source.sh` will create a directory with the hostname you - specified on the command line. A common valua for `destination_base` is - '/home/server/backup'. - -source_prefix:: -source_postfix:: - `source_prefix` is put before the hostname, `source_postfix` is appended - after it. A common value for `source_prefix` maybe 'root@' and ':/' - for `source_postfix`. - - -SEE ALSO --------- -ccollect(1), ccollect_analyse_logs.sh, ccollect_delete_source(1), -ccollect_list_intervals(1), ccollect_logwrapper(1), - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/software/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_analyse_logs.text b/software/ccollect/download/ccollect-0.8/doc/man/ccollect_analyse_logs.text deleted file mode 100644 index 659ddbf4..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_analyse_logs.text +++ /dev/null @@ -1,56 +0,0 @@ -ccollect_analyse_logs(1) -======================== -Nico Schottelius - - -NAME ----- -ccollect_analyse_logs - analyse logs produced by ccollect(1) - - -SYNOPSIS --------- - -'ccollect_analyse_logs.sh' [iwe] - - -DESCRIPTION ------------ -ccollect_analyse_logs.sh reads the logfiles from stdin. You have to specify -at least one of the three loglevels (*i*nformational, *w*arning, *e*rror). Any -combination of them is allowed. - - -FILES ------ -ccollect log files:: - Are read from stdin - -EXAMPLES --------- -cat /var/log/ccollect/single/* | ccollect_analyse_logs.sh iw:: - Displays warnings and informational parts -ccollect_analyse_logs.sh iw < /var/log/ccollect/all_together:: - Displays only error messages (useful for the morning mail) - - -SEE ALSO --------- -ccollect(1), ccollect_add_source.sh, ccollect_delete_source(1), -ccollect_list_intervals(1), ccollect_logwrapper(1), - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/software/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_delete_source.text b/software/ccollect/download/ccollect-0.8/doc/man/ccollect_delete_source.text deleted file mode 100644 index 2b7f3000..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_delete_source.text +++ /dev/null @@ -1,57 +0,0 @@ -ccollect_delete_source(1) -========================= -Nico Schottelius - - -NAME ----- -ccollect_delete_source - delete sources from ccollect(1) - - -SYNOPSIS --------- -'ccollect_delete_source.sh' [-d] [-f] - - -DESCRIPTION ------------ -ccollect_delete_source.sh deletes backup sources from ccollect(1) and optional -also the backups created for that source. - - -OPTIONS -------- --d: - Delete also the destination directory. `add_ccollect_source.sh` will change - to the source/'name'/destination directory, get the absolute name and delete - it recursively. --f: - Force deletion. Do not ask. Very handy for people who know what they do. - Very dangerous for everyone else. - - -FILES ------ -$CCOLLECT_CONF/sources:: - Directory containing the sources. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -SEE ALSO --------- -ccollect(1), ccollect_add_source(1), ccollect_add_source(1), -ccollect_logwrapper(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/software/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_list_intervals.text b/software/ccollect/download/ccollect-0.8/doc/man/ccollect_list_intervals.text deleted file mode 100644 index 9df4121b..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_list_intervals.text +++ /dev/null @@ -1,48 +0,0 @@ -ccollect_list_intervals(1) -========================== -Nico Schottelius - - -NAME ----- -ccollect_list_intervals - list available intervals from ccollect(1) - - -SYNOPSIS --------- -'ccollect_list_intervals.sh' - - -DESCRIPTION ------------ -ccollect_list_intervals.sh shows intervals specified in the configuration -for ccollect(1). It displays the name of each interval, followed by a colon -followed by the number backups to keep. - - -FILES ------ -$CCOLLECT_CONF/intervals:: - Directory containing the intervals. $CCOLLECT_CONF is '/etc/ccollect', if unset. - - -SEE ALSO --------- -collect(1), ccollect_add_source(1), ccollect_analyse_logs(1), -ccollect_delete_source(1), ccollect_logwrapper(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/software/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_logwrapper.text b/software/ccollect/download/ccollect-0.8/doc/man/ccollect_logwrapper.text deleted file mode 100644 index 8084c106..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/man/ccollect_logwrapper.text +++ /dev/null @@ -1,56 +0,0 @@ -ccollect_logwrapper(1) -====================== -Nico Schottelius - - -NAME ----- -ccollect_logwrapper - start ccollect(1) and create a unique logfile - - -SYNOPSIS --------- -'ccollect_logwrapper.sh' - - -DESCRIPTION ------------ -ccollect_logwrapper.sh creates a unique logfile below -'$CCOLLECT_CONF/logwrapper' and redirects ccollect(1) output -(stdout and stderr) to it. - - -OPTIONS -------- -Options are passed directly to ccollect(1). - - -FILES ------ -$CCOLLECT_CONF/logwrapper:: - Directory containing the configuration. $CCOLLECT_CONF is '/etc/ccollect', if unset. - -$CCOLLECT_CONF/logwrapper/destination:: - Link to the destination directory for the logfiles - - -SEE ALSO --------- -ccollect(1), ccollect_add_source(1), ccollect_analyse_logs(1), -ccollect_delete_source(1), ccollect_list_intervals(1) - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/software/ccollect/[] - - -COPYING -------- -Copyright \(C) 2007-2008 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License Version 3 (GPLv3). diff --git a/software/ccollect/download/ccollect-0.8/doc/release-checklist b/software/ccollect/download/ccollect-0.8/doc/release-checklist deleted file mode 100644 index 7cba30cd..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/release-checklist +++ /dev/null @@ -1,9 +0,0 @@ -* Change version and date in ccollect.sh -* Change version in documentation/ccollect.text -* Regenerate documentation -* Create tarball -* Transfer to home.schottelius.org -* Extract files -* Update website -* Announce on freshmeat -* Announce on announce@ diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.5.2 b/software/ccollect/download/ccollect-0.8/doc/todo/0.5.2 deleted file mode 100644 index 0c1c2250..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.5.2 +++ /dev/null @@ -1,4 +0,0 @@ -x Fix $? problem -x Check last dir searching -x Check count generation -x Check general functionality (remove testing) diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.5.3 b/software/ccollect/download/ccollect-0.8/doc/todo/0.5.3 deleted file mode 100644 index 00195812..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.5.3 +++ /dev/null @@ -1,34 +0,0 @@ -Done: -==> screenshot -u0219 zrha166.netstream.ch # ~chdscni9/ccollect.sh weekly zrha166.netstream.ch -2007-08-16-21:49:44: ccollect 0.6: Beginning backup using interval weekly -[zrha166.netstream.ch] 2007-08-16-21:49:44: Beginning to backup -[zrha166.netstream.ch] 2007-08-16-21:49:45: Existing backups: 0 Total keeping backups: 8 -[zrha166.netstream.ch] 2007-08-16-21:49:45: Did not find existing backups for interval weekly. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Using backup from daily. -[zrha166.netstream.ch] 2007-08-16-21:49:45: Beginning to backup, this may take some time... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Creating /etc/ccollect/sources/zrha166.netstream.ch/destination/weekly.20070816-2149.22188 ... -[zrha166.netstream.ch] 2007-08-16-21:49:45: Transferring files... - -- beep-after-delete-hack? - -> tonnerre / #cLinux - -- replace nico-linux-ccollect with nico-ccollect - * ccollect is not Linux specific - -- remove exit-calls - * will leave behind unused temporary file! - * use _exit_err - -X join todos - -- fix possible quoting problems - * rsync_extra (redefine format) - * exclude - * other - * create _rsync, filtering args, creating new $@ - -- check and export variables for use in scripts! - -Contact Julian later: - * integrate updated german documentation diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.5.3.tonnerre b/software/ccollect/download/ccollect-0.8/doc/todo/0.5.3.tonnerre deleted file mode 100644 index 4e7b7db5..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.5.3.tonnerre +++ /dev/null @@ -1,11 +0,0 @@ -NetBSD/i386,amd64,sparc,sparc64 - -13:13 < Tonnerre> telmich, die kleine wä, 2 Variablen aus $(CCOLLECT) zu - machen -13:13 < Tonnerre> telmich, eine fü Sourcepfad und eine fü -Destinationfpad -13:13 < Tonnerre> pfa -13:13 < Tonnerre> d -13:14 < Tonnerre> telmich, die gröre wä die $() durch ${} zu ersetzen, so -dass der Kram auch mit !GNU-Make geht - diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.6 b/software/ccollect/download/ccollect-0.8/doc/todo/0.6 deleted file mode 100644 index ee8e97fd..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.6 +++ /dev/null @@ -1,63 +0,0 @@ -not did, did not remember why I wanted to do that: - -- do sed-time check: - -1.2. replace sed? -compare timing: -_echo () { echo "$name $msg" } -and create -_techo () { echo "$timestamp $name $msg" } -perhaps create -_eecho () { _techo "ERROR $msg" } -? - - - -done: -add note for - 09:24 < telmich> Obri: ~/.ssh/config! - -- implement use of different intervals as source for cloning - * use 'woechentlich' if available and no backup exists for 'daily' - * add 'prefer_latest' to prefer different interval, that's newer than - ours - * or add 'prefer_same_interval' instead? -- implement detection of partial backups -3. detect unfinished backups -sven / markierung - - wie seht der Marker aus? - -> .ccollect-YEAR-MM-DD.HHmm.pid (like the directory) - --> assume incomplete, when we did not finish. - --> means it's complete,when rsync was successful ----> partial implemented in 0.5.2 (commented out) -- do not check by name, but by time - * is ls -t posix? - * also check: -p -1 -- ccollect Zeitausgabe verbessern - - Wofuer wie lange gebraucht - * rm - * klonen (gibt es so ja nicht) - Wenn Summary angegeben ist am Ende ausgeben -- do we want rsync -H by default? - * no: takes much more memory -ssh / port change: - change rsync_extra format -- Variables: - source_$n - no_sources - name -- changed naming of sources: - YYYYMMDD-HHMM.PID (better readable) - => source / backup converter! => not needed! -config: - set destination-base - /etc/ccollect/defaults/source_config - -Documentation: -- hint: backuping backup -- update documentation: - - german doc? - - exit pre/post exec -> error codes (after implementation!) (in 0.4) - - write about fast changing fs -- delete_incomplete - diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.6.1 b/software/ccollect/download/ccollect-0.8/doc/todo/0.6.1 deleted file mode 100644 index 99a17eba..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.6.1 +++ /dev/null @@ -1,23 +0,0 @@ -- Add filter support - * filter -- add source/ignore_failed_pre_exec -- add source/ignore_failed_post_exec -- do not delete_incomplete, when there's only one backup left! -- .ccollect-marker is deleted by rsync at the beginning! - - fix marking -- add logwrapper -- add loganalyser - speedup is - error codes - vanished files (see netstream)!!! - -Done: -- Improve finding backup from another interval: - o strip of interval name - o run sort -n - o use the last entry -- add --version, -V - -not needed: -- think about 'prefer_same_interval' / 'prefer_latest' - diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.6.2 b/software/ccollect/download/ccollect-0.8/doc/todo/0.6.2 deleted file mode 100644 index 05798ffd..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.6.2 +++ /dev/null @@ -1 +0,0 @@ -- fix delete_incomplete marker diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.1 b/software/ccollect/download/ccollect-0.8/doc/todo/0.7.1 deleted file mode 100644 index 49df1545..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.1 +++ /dev/null @@ -1,35 +0,0 @@ - - --------------------------------------------------------------------------------- -done: -- tools in makefile -14:15 also alle tools/ccollect_* -14:15 mach mal n besseres Makefile :) -14:15 hatte die extra deswegen umbenannt -14:15 nehme ich mal als hinweis für 0.7.1 - - -- add global delete_incomplete (/etc/ccollect/defaults/delete_incomplete) - -09:31 < Obri> telmich: hab nen kleinen tipp für ccollect -09:32 < Obri> telmich: ich habe hier hosts die nicht immer online sind, das ist dumm weil so das backup - kaputtgeht... -09:32 < Obri> telmich: ich habe jetzt das ein preexec script gebastelt: -09:32 < Obri> ping -c1 -q `cat /etc/ccollect/sources/$name/source | cut -d"@" -f2 | cut -d":" -f1` -09:33 < Obri> telmich: so bricht das backup ab wenn der host nicht erreichbar ist -09:33 < Obri> ohne dass ein altes backup entsorgt wird - - -- remove basename - -> include config from cconf! -> standard! - -reject: --------------------------------------------------------------------------------- -- fix german documentation! - => I'm the coder, somebody else can fix it. -- add wrapper, to do logging and analyse - * output filename in the wrapper, save into variable - => mktemp - * call analyser - => output stdout? - => no use for that currently diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.2 b/software/ccollect/download/ccollect-0.8/doc/todo/0.7.2 deleted file mode 100644 index 79a50aa2..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.2 +++ /dev/null @@ -1,63 +0,0 @@ --------------------------------------------------------------------------------- -Stats version --------------------------------------------------------------------------------- - -Add tools/ccollect_stats.sh, clearify license --------------------------------------------------------------------------------- -Preamble: - Netstream (www.netstream.ch) may consider using ccollect for backing up many - unix servers and needs some clean reporting. The following things - need to be done, so ccollect will be useful for netstream: - -Logger: - - Needs to write small mails (sysadmins don't have time to read mails) - - Needs to be able to only write a mail on error - * needs configuration option to also mail on warnings - - Should be able to send one mail per backup source - * or one for the whole backup job - -Messages: (to be used for filtering) - Errors: - Read from remote host .*: Connection timed out - - Warnings: - rsync: mknod .* failed: Invalid argument (22) - file has vanished: ".*" - --------------------------------------------------------------------------------- - -Analyzer: - - grosse Dateien - - grosse Veraenderungen --------------------------------------------------------------------------------- -exclude-lists-doku: -freebsd: - /usr/ports/* - /proc/* - /dev/* - /tmp/* - /var/tmp/* -linux: - /sys/* - /proc/* - /dev/* - /tmp/* - --------------------------------------------------------------------------------- -done: - -rsync_extra global! -- \n delimeted --------------------------------------------------------------------------------- - -S, --sparse - Try to handle sparse files efficiently so they take up less space on the des‐ - tination. Conflicts with --inplace because it’s not possible to overwrite - data in a sparse fashion. - --------------------------------------------------------------------------------- - Always report return code! - -[12:00] u0255:ddba034.netstream.ch# rsync -n -a --delete --stats --progress daily.20080324-0313.17841/ daily.20080325-0313.31148/ - -$tool - diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.3 b/software/ccollect/download/ccollect-0.8/doc/todo/0.7.3 deleted file mode 100644 index 73e5ffc6..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.3 +++ /dev/null @@ -1,2 +0,0 @@ -- add -a (archive) to ccollect_delete_source.text -- add listing of intervals to ccollect_list_intervals diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.4 b/software/ccollect/download/ccollect-0.8/doc/todo/0.7.4 deleted file mode 100644 index 70515e76..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.7.4 +++ /dev/null @@ -1 +0,0 @@ -add support for wipe diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/0.8.0 b/software/ccollect/download/ccollect-0.8/doc/todo/0.8.0 deleted file mode 100644 index 2b5130dc..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/0.8.0 +++ /dev/null @@ -1,6 +0,0 @@ -- restructure code to easily allow global versus source options: - f_name=.... - check_option $f_name - => source - => defaults -- support all senseful options as default and source specific diff --git a/software/ccollect/download/ccollect-0.8/doc/todo/extern b/software/ccollect/download/ccollect-0.8/doc/todo/extern deleted file mode 100644 index cb42a075..00000000 --- a/software/ccollect/download/ccollect-0.8/doc/todo/extern +++ /dev/null @@ -1,26 +0,0 @@ -These todos are things that would be senseful todo, but are just nice -to have. This means I won't code them, so somebody can code them. --------------------------------------------------------------------------------- - -- Add ccollect-restore.sh - (new project, perhaps coordinated with jchome's ccollect-config) - - Helper (in dialog?) to restore backups - - Perhaps create ccollect-gui.{whatever} instead, which does all the - end user staff? - - Including cronjob, creating configuration, displaying status of - backups, allowing manual remove, allowing manual trigger of ccollect - (with realtime message window?)? - -- write mkccollectconfig (for 0.5!) - -> jchome works on it! - o create source configuration - o another script for changing defaults - x intervalls - x pre-/post exec - o (X)dialog based - -- add option ("run_only_once") to prevent ccollect to run twice - (per source/general) diff --git a/software/ccollect/download/ccollect-0.8/release.sh b/software/ccollect/download/ccollect-0.8/release.sh deleted file mode 100644 index ae095ecd..00000000 --- a/software/ccollect/download/ccollect-0.8/release.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# -# 200?-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Standard release script for dummies like me -# - -if [ $# -ne 2 ]; then - echo "$0: version description" - exit 23 -fi - -echo "Did you change version and date information in the script?" -read bla - -VERSION="$1"; shift -DESCRIPTION="$1"; shift -NAME=ccollect-${VERSION} -TARNAME=${NAME}.tar.bz2 -TARLOCAL=../${TARNAME} -#DHOST=nico@home.schottelius.org -DHOST=nico@localhost -#DDIR=www/unix.schottelius.org/www/ccollect/ -DDIR=/home/users/nico/privat/computer/net/netzseiten/www.nico.schottelius.org/src/software/ccollect -DESTINATION="$DHOST:$DDIR" - -set -e -set -x -git tag -m "$DESCRIPTION" "$VERSION" -git push --mirror -git archive --prefix="${NAME}/" "$VERSION" | bzip2 > "$TARLOCAL" -scp "${TARLOCAL}" "$DESTINATION" - -# create & publish documentation for the end user -make publish-doc - - -ssh "$DHOST" "( cd "$DDIR" &&; tar xfj \"$TARNAME\" )" - -echo "setting paranoid permissions to public..." -ssh "$DHOST" "( cd "$DDIR" && find -type d -exec chmod 0755 {} \; )" -ssh "$DHOST" "( cd "$DDIR" &&; find -type f -exec chmod 0644 {} \; )" - -cat "doc/release-checklist" -exit 0 diff --git a/software/ccollect/download/ccollect-0.8/tools/README b/software/ccollect/download/ccollect-0.8/tools/README deleted file mode 100644 index 73120184..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/README +++ /dev/null @@ -1,19 +0,0 @@ -Files and their tasks / destinations: - -ccollect_add_source.sh: bin -ccollect_analyse_logs.sh: bin -ccollect_create_source2.sh: ??? -ccollect_create_source.sh: ??? -ccollect_delete_source.sh: bin -ccollect_list_intervals.sh: bin -ccollect_logwrapper.sh: bin -ccollect-stats.sh: ??? -config-pre-0.4-to-0.4.BUGS: only to be used for converting -config-pre-0.4-to-0.4.sh: only to be used for converting -config-pre-0.4-to-0.4.sub.sh: only to be used for converting -config-pre-0.6-to-0.6.sh: only to be used for converting -config-pre-0.6-to-0.6.sub.sh: only to be used for converting -config-pre-0.7-to-0.7.sh: only to be used for converting -config-pre-0.7-to-0.7.sub.sh: only to be used for converting -gnu-du-backup-size-compare.sh -README diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_add_source.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_add_source.sh deleted file mode 100644 index 4a60d383..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_add_source.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# 2007-08-16: Written for Netstream (www.netstream.ch) -# -# Creates a source from standard values specified in -# /etc/ccollect/defaults/sources -# - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -SCONFIG="${CDEFAULTS}/sources" - -# standard options: variable2filename -exclude="exclude" -summary="summary" -intervals="intervals" -pre_exec="pre_exec" -post_exec="post_exec" -rsync_options="rsync_options" -verbose="verbose" -very_verbose="very_verbose" - -# options that we simply copy over -standard_opts="exclude summary intervals pre_exec post_exec rsync_options verbose very_verbose" - -# options not in standard ccollect, used only for source generation -src_prefix="${SCONFIG}/source_prefix" -src_postfix="${SCONFIG}/source_postfix" -destination_base="${SCONFIG}/destination_base" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _exit_err "" -fi - -_echo "Reading defaults from ${SCONFIG} ..." - -while [ $# -gt 0 ]; do - source="$1"; shift - - # Create - _echo "Creating ${source} ..." - - fullname="${CSOURCES}/${source}" - - # create source - if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Skipping." - continue - fi - mkdir -p "${fullname}" || _exit_err Cannot create \"${fullname}\". - - # copy standard files - for file in $standard_opts; do - eval rfile=\"\$$file\" - eval filename="${SCONFIG}/${rfile}" - if [ -e "${filename}" ]; then - _echo Copying \"$rfile\" to ${fullname} ... - cp -r "${filename}" "${fullname}/${rfile}" - fi - done - - # create source entry - if [ -f "${src_prefix}" ]; then - source_source="$(cat "${src_prefix}")" || _exit_err "${src_prefix}: Reading failed." - fi - source_source="${source_source}${source}" - if [ -f "${src_postfix}" ]; then - source_source="${source_source}$(cat "${src_postfix}")" || _exit_err "${src_postfix}: Reading failed." - fi - _echo "Adding \"${source_source}\" as source for ${source}" - echo "${source_source}" > "${fullname}/source" || _exit_err "Creating ${fullname}/source: failed." - - # create destination directory - absbase=$(cd "${destination_base}" 2>/dev/null && pwd -P) || \ - _exit_err "${destination_base} must exist before creating sources." - - dest="${absbase}/${source}" - _echo "Creating ${dest} ..." - mkdir -p "${dest}" || _exit_err "${dest}: Cannot create." - - # link destination directory - dest_abs=$(cd "${dest}" && pwd -P) || _exit_err "${dest}: Changing to newly created directory failed." - echo "${dest_abs}" > "${fullname}/destination" || \ - _exit_err "${fullname}/destination: Failed to create." - -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_analyse_logs.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_analyse_logs.sh deleted file mode 100644 index 7ff9916b..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_analyse_logs.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written for Netstream (www.netstream.ch) on Di 21. Aug 17:10:15 CEST 2007 -# -# Analyse logs -# - -version=0.2 -date=2008-06-13 -fullversion="${version} (${date})" -args=iwe - -usage() { - echo "$(basename "$0") ${fullversion}: [iwe]" - echo "" - echo " i: print informational messages" - echo " w: print warning messages" - echo " e: print error messages" - echo "" - echo "Reading input from stdin, displaying to stdout." - exit 1 -} - -# -# read and verify argv -# -if [ "$#" -ne 1 ]; then - usage -fi -argv="$1"; shift - -wrong="$(echo ${argv} | grep -e "[^${args}]")" -if [ "${wrong}" ]; then - usage -fi - - -# set output levels -search_err="$(echo ${argv} | grep 'e')" -search_warn="$(echo ${argv} | grep 'w')" -search_info="$(echo ${argv} | grep 'i')" - -# -# Interesting strings in the logs: errors -# --------------------------------------- - -if [ "$search_err" ]; then - set -- "$@" "-e" 'Read from remote host .*: Connection timed out$' - set -- "$@" "-e" 'Read from remote host .*: Connection reset by peer$' - set -- "$@" "-e" 'rsync: .*: Invalid argument (22)$' - set -- "$@" "-e" 'rsync: .*: Input/output error (5)$' - set -- "$@" "-e" 'cannot send long-named file "' - set -- "$@" "-e" 'ERROR: .* failed verification -- update discarded.$' - set -- "$@" "-e" 'Host key verification failed.' - set -- "$@" "-e" 'ssh: connect to host .*: Connection timed out' - set -- "$@" "-e" 'rsync error: unexplained error (code 255)' - set -- "$@" "-e" 'rsync: connection unexpectedly closed' -fi - -# known error strings: -#[ddba049.netstream.ch] receiving file list ... rsync: readdir("/proc"): Invalid argument (22) -#[ddba033.netstream.ch] rsync: readlink "/usr/local/inetpub2/webmailroot/2wire.ch/royal@2wire.ch" failed: Input/output error (5) -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) -#[zrha165.netstream.ch] Read from remote host zrha165.netstream.ch: Connection reset by peer -#[ddba017.netstream.ch] receiving file list ... cannot send long-named file "/usr/local/www/apache22/cgi-bin/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/bac kup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup /backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/ba ckup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backu p/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/backup/back" -#[ddba033.netstream.ch] ERROR: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded. -# [ddba034.netstream.ch] Host key verification failed. -# [ddba034.netstream.ch] rsync error: unexplained error (code 255) at io.c(454) [receiver=2.6.9] -# [ddba034.netstream.ch] rsync: connection unexpectedly closed (0 bytes received so far) [receiver] - - - - -# -# Interesting strings in the logs: warnings -# ----------------------------------------- -#[ddba033.netstream.ch] rsync: read errors mapping "/usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd": Input/output error (5) - -# [ddba015.netstream.ch] send_files failed to open /usr/local/dnscache/log/main/@4000000046ca0f3616939c14.s: No such file or directory -# [ddba015.netstream.ch] 2007-08-21-02:17:28: Finished backup (rsync return code: 23). -# [ddba017.netstream.ch] file has vanished: "/var/spool/postfix/active/657575D686" -#[ddba026.netstream.ch] 2007-08-21-05:35:13: Finished backup (rsync return code: 24). -#[ddba045.netstream.ch] send_files failed to open /data/hsphere/local/var/named/logs/@4000000046c98fa9079f39ac.s: No such file or directory -# file has vanished: ".*" - -if [ "$search_warn" ]; then - # warn on non-zero exit code - set -- "$@" "-e" 'Finished backup (rsync return code: [^0]' - set -- "$@" "-e" 'WARNING: .* failed verification -- update discarded (will try again).' -fi -# known warnings: -#[ddba033.netstream.ch] WARNING: usr/local/inetpub2/netstream/adsl.netstream.ch/mrtg/lbswiss.rrd failed verification -- update discarded (will try again). - - -# -# Interesting strings in the logs: informational -# ---------------------------------------------- -if [ "$search_info" ]; then - set -- "$@" "-e" 'total size is [[:digit:]]* speedup is' - set -- "$@" "-e" 'Backup lasted: [[:digit:]]*:[[:digit:]]\{1,2\}:[[:digit:]]* (h:m:s)$' - set -- "$@" "-e" 'send [[:digit:]]* bytes received [0-9]* bytes [0-9]* bytes/sec$' -fi - -# info includes: -#[ddba012.netstream.ch] total size is 22384627486 speedup is 13.75 -# [u0160.nshq.ch.netstream.com] 2007-08-20-18:26:06: Backup lasted: 0:43:34 (h:m:s) -#[ddba012.netstream.ch] sent 3303866 bytes received 1624630525 bytes 122700.92 bytes/sec - -grep "$@" diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_archive_config.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_archive_config.sh deleted file mode 100644 index f42c88a8..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_archive_config.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# 2009 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Write a tar containing the configuration -# - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 1 ]; then - _echo "${self} " - _exit_err "Exiting." -fi - -file="$1" - -_echo "Creating $file ..." - -[ -d "${CCOLLECT_CONF}" ] || _exit_err "No configuration in $CCOLLECT_CONF" - -tar cf "$file" "${CCOLLECT_CONF}" diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_check_config.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_check_config.sh deleted file mode 100644 index c24a4006..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_check_config.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# - -################################################################################ -# standard vars stolen from cconf -__pwd="$(pwd -P)" -__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)" -__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname" - - -################################################################################ -# ccollect standard vars -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CDEFAULTS="${CCOLLECT_CONF}/defaults" -CLOGDIR="${CDEFAULTS}/logdir" -CRONTAB="${CRONTAB:-/etc/crontab}" - -# Parameters: -# -c, --crontab -# -f, --fix -# -l, --logs - - diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_delete_source.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_delete_source.sh deleted file mode 100644 index 509e95fd..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_delete_source.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# 2007-08-16 Written for Netstream (www.netstream.ch) -# Delete sources and their backups (optionally). -# - -# standard values -CCOLLECT_CONF="${CCOLLECT_CONF:-/etc/ccollect}" -CSOURCES="${CCOLLECT_CONF}/sources" - -self="$(basename $0)" - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -lt 1 ]; then - _echo "${self} [-f] [-d] " - _echo " -f: Do not ask, simply delete. Dangerous and good for sysadmins." - _echo " -d: Also delete the destination (removes all backups)" - _exit_err "Exiting." -fi - -params_possible=yes -force="" -backups="" - -while [ $# -gt 0 ]; do - if [ "$params_possible" ]; then - case "$1" in - "-f"|"--force") - force="-r" - shift; continue - ;; - "-d"|"--destination") - backups=yes - shift; continue - ;; - --) - params_possible="" - shift; continue - ;; - -*|--*) - _exit_err "Unknown option: $1" - ;; - esac - fi - - # Reached here? So there are no more parameters. - params_possible="" - - source="$1"; shift - - # Create - _echo "Deleting ${source} ..." - fullname="${CSOURCES}/${source}" - - # ask the user per source, if she's not forcing us - if [ -z "$force" ]; then - sure="" - echo -n "Do you really want to delete ${source} (y/n)? " - read sure - - if [ "$sure" != "y" ]; then - _echo "Skipping ${source}." - continue - fi - fi - - if [ "$backups" ]; then - ddir="$(cat "${fullname}/destination")" - absdir="$(cd "${ddir}" && pwd -P)" || _exit_err "Cannot change to ${ddir}" - _echo "Deleting ${absdir} ..." - echo rm -r $force "${absdir}" - fi - - _echo "Deleting ${fullname} ..." - echo rm -r $force "${fullname}" -done - -exit 0 diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_list_intervals.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_list_intervals.sh deleted file mode 100644 index d95bbde7..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_list_intervals.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Initially written on 24-Jun-2006 -# - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_INTERVALS="$CCOLLECT_CONF/defaults/intervals" - -me="$(basename $0)" - -_echo() -{ - echo "$me> $@" -} - -if [ ! -d "${CCOLLECT_INTERVALS}" ]; then - _echo "No intervals defined in ${CCOLLECT_INTERVALS}" - exit 1 -fi - -set -e -cd "${CCOLLECT_INTERVALS}" - -for interval in *; do - eval int_${interval}=$(cat "${interval}"); - eval echo ${interval}: \$int_${interval}; -done diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_logwrapper.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_logwrapper.sh deleted file mode 100644 index ac7f4961..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_logwrapper.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written for Netstream (www.netstream.ch) on Fr 8. Jun 10:30:24 CEST 2007 -# -# Call the log-wrapper instead of ccollect.sh and it will create nice logs -# - -# -# where to find our configuration and temporary file -# -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -LOGCONF=$CCOLLECT_CONF/logwrapper - -logdir="${LOGCONF}/destination" -CDATE="date +%Y%m%d-%H%M" -we="$(basename $0)" -pid=$$ - -export ccollect_logfile="${logdir}/$(${CDATE}).${pid}" - -# use syslog normally -# Also use echo, can be redirected with > /dev/null if someone cares -_echo() -{ - string="${we} (${pid}): $@" - logger "${string}" - echo "${string}" -} - - -# exit on error -_exit_err() -{ - _echo "$@" >&2 - rm -f "${TMP}" - exit 1 -} - -# put everything into that specified file -_echo "Starting with arguments: $@" -touch "${ccollect_logfile}" || _exit_err "Failed to create ${ccollect_logfile}" - -# First line in the logfile is always the commandline -echo ccollect.sh "$@" > "${ccollect_logfile}" 2>&1 -ccollect.sh "$@" >> "${ccollect_logfile}" 2>&1 - -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.8/tools/ccollect_stats.sh b/software/ccollect/download/ccollect-0.8/tools/ccollect_stats.sh deleted file mode 100644 index bfaefab8..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/ccollect_stats.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2007 Daniel Aubry -# 2008 Nico Schottelius (added minimal header) -# -# Copying license: GPL2-only -# - -# TODO: -# add variables, add copying, add configuration - -if [ ! -e /tmp/ccollect-stats.lock ] -then - touch /tmp/ccollect-stats.lock - - # changes after license clearify - # for dest in /etc/ccollect/sources/ -type f -name destination | while read line - - find /etc/ccollect/sources/ -type l | while read line - d=$(basename $(readlink $line)) - echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log - du -sh $line/* | tee -a /var/log/backup.log - done - rm /tmp/ccollect-stats.lock -fi diff --git a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.BUGS b/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.BUGS deleted file mode 100644 index 2be9d213..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.BUGS +++ /dev/null @@ -1,27 +0,0 @@ --------------------------------------------------------------------------------- -BUGS, 2006-04-27, Nico Schottelius --------------------------------------------------------------------------------- -The scripts are only for 'standard' configurations. - -If you've multiple directories named 'intervalls', the -scripts will try to replace _all_ instances of intervalls with -"intervals". - -This will fail: - - intervalls/defaults/intervalls/ exists before. - - Then we'll replace the first time: - - intervals/defaults/intervalls/ exists now. - - Then find will fail, as the first directory disappeared. - -Also, if you have a source named 'intervalls' -(why so ever you would want to have something like that) and -a 'intervalls' directory below it, it will rename your source. - -Yes this is a bug. - -No, I do not care about it, this is just a dumb helper script which -should be used once. diff --git a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.sh b/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.sh deleted file mode 100644 index 23b3307e..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on Do Apr 27 09:13:26 CEST 2006 -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.4 configuration directories to match 0.4 style" - echo "" - exit 23 -fi - -tmp=$(mktemp) -tmp2=$(mktemp) -script=$(echo $0 | sed 's/\.sh/.sub.sh/') - -find "$1" -type d -name intervalls > "$tmp" - -# -# reverse found data, so deepest directories are renamed first -# -tac "$tmp" > "$tmp2" - -while read intervals - do - "$script" "$intervals" -done < "$tmp2" - -rm -f "$tmp" "$tmp2" diff --git a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.sub.sh b/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.sub.sh deleted file mode 100644 index e28e7184..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.4-to-0.4.sub.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2006-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on Do Apr 27 09:13:26 CEST 2006 -# - -master=$(echo $0 | sed 's/\.sub//') - -if [ $# -ne 1 ]; then - echo "$0:" - echo "" - echo " DO NOT CALL ME DIRECTLY" - echo "" - echo "Use $master, please." - exit 23 -fi - -# strip trailing / -oldname=$(echo $1 | sed 's,/$,,') - -# replace the last component of the path "intervalls" -newname=$(echo $oldname | sed 's/intervalls$/intervals/') - -echo mv "$oldname" "$newname" -mv "$oldname" "$newname" diff --git a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.6-to-0.6.sh b/software/ccollect/download/ccollect-0.8/tools/config-pre-0.6-to-0.6.sh deleted file mode 100644 index 58a538ae..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.6-to-0.6.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 20070816-2225 -# Transfer configuration to 0.6 layout -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -type f -name rsync_options -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.6-to-0.6.sub.sh b/software/ccollect/download/ccollect-0.8/tools/config-pre-0.6-to-0.6.sub.sh deleted file mode 100644 index 7744f9eb..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.6-to-0.6.sub.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 20070816-2227 -# Transfer configuration to 0.6 layout (subscript) -# - -if [ $# -ne 1 ]; then - echo "$0: rsync_options file" - echo "" - echo " Fix pre 0.6 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) - -echo "Working on $1 ..." - -for option in $(cat "$1"); do - echo "${option}" >> "${tmp}" -done -mv ${tmp} "$1" diff --git a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.7-to-0.7.sh b/software/ccollect/download/ccollect-0.8/tools/config-pre-0.7-to-0.7.sh deleted file mode 100644 index 6d540abb..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.7-to-0.7.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Convert configuration to 0.7 layout -# - -if [ $# -ne 1 ]; then - echo "$0: ccollect-configuration directory" - echo "" - echo " Fix pre 0.7 configuration directories to match 0.7 style" - echo "" - exit 23 -fi - -dir="$1" -script=$(echo $0 | sed 's/\.sh$/.sub.sh/') - -find "${dir}/sources/" -name destination -exec "${script}" {} \; - -echo "Finished." diff --git a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.7-to-0.7.sub.sh b/software/ccollect/download/ccollect-0.8/tools/config-pre-0.7-to-0.7.sub.sh deleted file mode 100644 index 5bc6f759..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/config-pre-0.7-to-0.7.sub.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Helper script -# - -if [ $# -ne 1 ]; then - echo "$0: destination-file" - echo "" - echo " Fix pre 0.7 configuration directories to match 0.6 style (sub)" - echo "" - exit 23 -fi - -tmp=$(mktemp) -file="$1" - -echo "Working on $file ..." - -if [ -L "${file}" ]; then - echo "Converting ${file} ..." - dir="$(cd "${file}" && pwd -P)"; ret=$? - - if [ $ret -ne 0 ]; then - echo "ERROR: $file is a broken link" - exit 1 - else - echo "${dir}" > "${tmp}" - rm -f "${file}"; ret=$? - if [ $ret -ne 0 ]; then - echo "ERROR: Removing $file failed" - exit 1 - fi - mv "${tmp}" "${file}"; ret=$? - if [ $ret -ne 0 ]; then - echo "ERROR: Moving ${tmp} to ${file} failed, your source is broken." - exit 1 - fi - fi -else - echo "$file is not a link, not converting" - exit 1 -fi diff --git a/software/ccollect/download/ccollect-0.8/tools/gnu-du-backup-size-compare.sh b/software/ccollect/download/ccollect-0.8/tools/gnu-du-backup-size-compare.sh deleted file mode 100644 index cf3b1948..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/gnu-du-backup-size-compare.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# 2007-2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Written on 2007-08-16 -# - -exit 1 -# not yet finished. - -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CCOLLECT_SOURCES="$CCOLLECT_CONF/defaults/sources" - -me="$(basename "$0")" - -if [ $# -lt 1 ]; then - echo "${me}: sources names - exit 1 -fi - -if [ ! -d "$CCOLLECT_SOURCES" ]; then - echo "No sources defined in $CCOLLECT_SOURCES" - exit 1 -fi - -cd "${CCOLLECT_SOURCES}" - -while [ "$#" -gt 0 ]; do - source="$1"; shift - fsource="${CCOLLECT_SOURCES}/${source}" - du -s "${fsource}/"* "${fsource}" - # du -l should follow -done diff --git a/software/ccollect/download/ccollect-0.8/tools/old/ccollect_create_source.sh b/software/ccollect/download/ccollect-0.8/tools/old/ccollect_create_source.sh deleted file mode 100644 index 7a34c6b0..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/old/ccollect_create_source.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 3 ]; then - _echo " " - _echo "Example: \"my-notebook\" \"192.168.42.42\" \"/home/server/backup/my-notebook\"" - exit 1 -fi - -name="$1" -source="$2" -destination="$3" -fullname="${CSOURCES}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${source} ..." -ping -c1 "${source}" || _exit_err "Cannot reach ${source}. Aborting." - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${source}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.8/tools/old/ccollect_create_source2.sh b/software/ccollect/download/ccollect-0.8/tools/old/ccollect_create_source2.sh deleted file mode 100644 index 842afb65..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/old/ccollect_create_source2.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# 2007-08-07 -# Written for Netstream (www.netstream.ch) -# Creates a source, including exclude - -# standard values -CCOLLECT_CONF=${CCOLLECT_CONF:-/etc/ccollect} -CSOURCES=$CCOLLECT_CONF/sources -CDEFAULTS=$CCOLLECT_CONF/defaults - -self=$(basename $0) - -# functions first -_echo() -{ - echo "${self}> $@" -} - -_exit_err() -{ - _echo "$@" - rm -f "$TMP" - exit 1 -} - -# argv -if [ $# -ne 2 ]; then - _echo " " - _echo "Example: \"192.168.42.42\" \"/home/server/backup/\"" - _echo " This will create ${CSOURCES}/192.168.42.42 and /home/server/backup/192.168.42.42." - exit 1 -fi - -# sourcename / servername -name="$1" - -# basedir -basedir="$2" - -fullname="${CSOURCES}/${name}" -destination="${basedir}/${name}" - -# Tests -if [ -e "${fullname}" ]; then - _echo "${fullname} already exists. Aborting." - exit 2 -fi - -_echo "Trying to reach ${name} ..." -ping -c1 "${name}" || _exit_err "Cannot reach ${name}. Aborting." - -if [ ! -d "${basedir}" ]; then - echo "${basedir} is not a directory. Aborting." - exit 7 -fi - -# Create -_echo "Creating ${fullname} ..." -mkdir -p "${fullname}" || exit 3 - -echo "root@${name}:/" > "${fullname}/source" -cat << eof > "${fullname}/exclude" || exit 4 -/dev/* -/proc/* -/tmp/* -eof - -# Destination -if [ -e "${destination}" ]; then - if [ ! -d "${destination}" ]; then - echo "${destination} exists, but is not a directory. Aborting." - exit 5 - fi -else - _echo "Creating ${destination} ..." - mkdir -p "${destination}" || _exit_err "Failed to create ${destination}." -fi - -ln -s "${destination}" "${fullname}/destination" || \ - _exit_err "Failed to link \"${destination}\" to \"${fullname}/destination\"" - -# finish -_echo "Added some default values, please verify \"${fullname}\"." -_echo "Finished." diff --git a/software/ccollect/download/ccollect-0.8/tools/report_success.sh b/software/ccollect/download/ccollect-0.8/tools/report_success.sh deleted file mode 100644 index b0f9d1bf..00000000 --- a/software/ccollect/download/ccollect-0.8/tools/report_success.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# -# 2008 Nico Schottelius (nico-ccollect at schottelius.org) -# -# This file is part of ccollect. -# -# ccollect is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ccollect is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ccollect. If not, see . -# -# Sends feedback -# - -subject="==> success: ccollect" -to="nico-ccollect-success" -host="schottelius.org" -fullto="${to}@${host}" - -software="ccollect" -author="Nico Schottelius" -info="$(uname -s -v -r -m)" - -echo "Reporting success for $software to ${author}" -echo "-----------------" -echo -n "Your name (leave free for anonymous): " -read name -echo -n "Your email (leave free for anonymous): " -read email -echo -n "Comment (leave free for no comment): " -read comment - -echo "" -echo "The following information will be send to ${author}:" -echo "" - -cat << eof -Name: $name (will be used to contact you and kept secret) -E-Mail: $email (will be used to contact you and kept secret) -Comment: $comment -Info: $info - -eof - -echo -n "Is it ok to send out that mail (press enter to send or ctrl-c to abort)? " -read yes - -cat << eof | mail -s "$subject" "$fullto" -Name: $name (will be used to contact you and kept secret) -E-Mail: $email (will be used to contact you and kept secret) -Comment: $comment -Info: $info -eof - -echo "Send. Thank you for your feedback."