On Sat, Nov 29, 2008 at 11:14:24AM +1100, Michael Chesterton wrote: > > On 29/11/2008, at 9:59 AM, Mary Gardiner wrote: > >> On 2008-11-28, Michael Chesterton <[EMAIL PROTECTED]> wrote: >>> Very minor nitpick, rsync can save older data, and put them in >>> whatever dir you want. >>> >>> before rdiff-backup i used to use rsync --backup --backup-dir=$date- >>> based-dir >> >> Thanks for that: I am guessing from the rsync man page though that it >> isn't particularly careful to only store the differences and therefore >> may take up more space? > > Right, if a file has changed, it copies the unmodified file to -- > backup-dir > then syncs the file. If a file hasn't changed, it doesn't get copied to > --backup-dir.
this is the framework I use
# Latest backup goes into "$DSTB/$BNAME"
# Last backup -1 goes into "$DSTB/$BNAME-1"
# Last backup -x goes into "$DSTB/$BNAME-x"
OPT="-aS --delete --link-dest=$DSTB/$BNAME-1"
if [ -r "${0/sh/exclude}" ]
then
EXCL="--exclude-from=${0/sh/exclude}"
fi
for x in $( seq $NUMB -1 2 )
do
if [ -d "$DSTB/$BNAME-$(( $x - 1 ))" ]
then
#echo "move [$DSTB/$BNAME-$(( $x -1 ))] to \
[$DSTB/$BNAME-$x]"
mv "$DSTB/$BNAME-$(( $x - 1 ))" "$DSTB/$BNAME-$x"
#else
#echo "[$DSTB/$BNAME-$(( $x -1 ))] doesn't exist"
fi
done
[ ! -d "$DSTB/$BNAME" ] && mkdir "$DSTB/$BNAME"
if [ ! -d "$DSTB/$BNAME-1" ]
then
cp -al "$DSTB/$BNAME" "$DSTB/$BNAME-1"
fi
rsync $OPT $EXCL "$SRC" "$DSTB/$BNAME"
lets me keep $NUMB previous version. so for my homealex backup dir I
have
homealex
homealex-1
homealex-2
homealex-<number of days I want to go back>
>
>
> --
>
> http://chesterton.id.au/blog/
> http://barrang.com.au/
>
>
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
--
Policeman: So, you like punchin' out old ladies, huh? Well .. I have one
question for you... Is this your hat?
signature.asc
Description: Digital signature
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
