Help creating incremental backups using --backup-dir.
millerdc at fusion.gat.com
Thu Apr 9 18:11:16 GMT 2009
Normally I would use the --link-dest option to do this but I can't
since I'm rsyncing from a Mac to a Samba share on a Linux box and hard
links don't work. What I want to do is create a 10 day rotating
incremental backup. I used the first script example on the rsync
examples page as a template. The only thing I changed was the
destination to be a local directory and paths for the other variables.
when I run the script nothing gets copied into the directories named
by the day of the week. Each day when the script runs the directory
with the name of the current week day is created but everything just
goes into current. and stays there. Can someone post an example that
does work for what I'm trying to do? Below is the script I'm using.
# directory to backup
OPTS=" -aX --force --progress --ignore-errors --delete --backup --
# the following line clears the last weeks incremental directory
[ -d $HOME/emptydir ] || mkdir $HOME/emptydir
/usr/local/bin/rsync3.0.5 --delete -a $HOME/emptydir/ /Volumes/SAMBA/
# now the actual transfer
/usr/local/bin/rsync3.0.5 $OPTS $BDIR /Users/Shared/current
More information about the rsync