diff --git a/ccollect.sh b/ccollect.sh index 6a87e75..5cd5533 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -15,7 +15,7 @@ CPOSTEXEC="$CDEFAULTS/post_exec" TMP=$(mktemp /tmp/$(basename $0).XXXXXX) VERSION=0.4.2 -RELEASE="2006-XX-XX" +RELEASE="2006-06-17" HALF_VERSION="ccollect $VERSION" FULL_VERSION="ccollect $VERSION ($RELEASE)" @@ -378,13 +378,16 @@ while [ "$i" -lt "$no_sources" ]; do 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 . "$destination_dir" - # old, gnu cp specific - # cp -al $VVERBOSE "$last_dir" "$destination_dir" + pax -rwl -p e $VVERBOSE . "$abs_destination_dir" fi if [ $? -ne 0 ]; then @@ -402,7 +405,7 @@ while [ "$i" -lt "$no_sources" ]; do rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \ --delete --numeric-ids --relative --delete-excluded \ - "$source" "$destination_dir" + "$source" "$abs_destination_dir" if [ "$?" -ne 0 ]; then echo "rsync reported an error. The backup may be broken (see rsync errors)" diff --git a/doc/TODO b/doc/TODO index 6cb1f72..497a448 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,3 +1,5 @@ +- ssh / rsync problem + -> ssh noch nie genutzt - add --version, -V - hint: : in path / sed / general problem - hint: backuping backup diff --git a/doc/ccollect.text b/doc/ccollect.text index 420360c..aa3b7cd 100644 --- a/doc/ccollect.text +++ b/doc/ccollect.text @@ -1,7 +1,7 @@ ccollect - Installing, Configuring and Using ============================================ Nico Schottelius -0.4.1, for ccollect 0.4-0.4.1, Initial Version from 2006-01-13 +0.4.2, for ccollect 0.4-0.4.2, Initial Version from 2006-01-13 :Author Initials: NS (pseudo) incremental backup @@ -71,6 +71,44 @@ subdirectory: -------------------------------------------------------------------------------- +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.1 with the current version +wget http://unix.schottelius.org/ccollect/ccollect-0.4.1.tar.bz2 + +# extract the tarball, change to the newly created directory +tar -xvjf ccollect-0.4.1.tar.bz2 +cd ccollect-0.4.1 + +# 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 +CCOLLECT_CONF=./miniconfig ./ccollect.sh testinterval testsource +-------------------------------------------------------------------------------- + + Requirements ------------