3 # This script does personal backups to a rsync backup server. You will end up
4 # with a 7 day rotating incremental backup. The incrementals will go
5 # into subdirectories named after the day of the week, and the current
6 # full backup goes into a directory called "current"
12 # excludes file - this contains a wildcard pattern per line of files to exclude
13 EXCLUDES=$HOME/cron/excludes
15 # the name of the backup machine
18 # your password on the backup server
19 export RSYNC_PASSWORD=XXXXXX
22 ########################################################################
25 OPTS="--force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES
26 --delete --backup --backup-dir=/$BACKUPDIR -a"
28 export PATH=$PATH:/bin:/usr/bin:/usr/local/bin
30 # the following line clears the last weeks incremental directory
31 [ -d $HOME/emptydir ] || mkdir $HOME/emptydir
32 rsync --delete -a $HOME/emptydir/ $BSERVER::$USER/$BACKUPDIR/
35 # now the actual transfer
36 rsync $OPTS $BDIR $BSERVER::$USER/current