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
BDIR=$HOME/Documents

BACKUPDIR=`date +%A`
OPTS=" -aX --force --progress --ignore-errors --delete --backup -- backup-dir=/$BACKUPDIR"

# 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/ $BACKUPDIR/
rmdir $HOME/emptydir

# now the actual transfer
/usr/local/bin/rsync3.0.5 $OPTS $BDIR /Users/Shared/current
#-------------------

Thanks.
David.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to