|
From: Dom <dl...@ed...> - 2008-10-27 23:46:32
|
Bruce Smith wrote: > # The script is a bit more involved, but the part you need is: > > TODAY="$(date +%F)" > YESTERDAY="$(date -d yesterday +%F)" > # You need to set: > # $BACKDIR for your backup directory. > # $server for the server to be backed up, > # $port for the listening ssh port (default=22) > # $dir for the directory on the server to be backed up. > # $dir2 for the destination backup subdirectories, in my case: > # dir2="$(dirname $dir)" > > rsync -av --delete-excluded \ > --link-dest=$BACKDIR/$YESTERDAY/$server$dir2 \ > -e "ssh -p $port -c arcfour" \ > $server:$dir \ > $BACKDIR/$TODAY/$server$dir2 > > # I use all those different variables because I backup a lot of > directories individually on each server, in for/while bash loops. > > Thanks Bruce - I will study it and make use. And I look forward to the new release of 1.3.6, even without rdiff-backup! Thanks also to Dick for the link, which seems very comprehensive. Perl would definitely bend my brain if not break it, but I am getting the hang of bash scripts - such an improvement on DOS batch files! Dom |