#!/bin/sh # Dirs to back up # These dirs will appear in the module root dir on the backup host. BDIRS="/home/pat/Mail /home/pat/lib" # excludes file - this contains a wildcard pattern per line of files to exclude EXCLUDES=/pkg/Flatland/rsync/Excludes # the name of the backup machine BSERVER=pcpat #BSERVER=localhost MODULE=FlatlandBackup #MODULE=flatback PORT=1236 BACKUPDIR="`date +%A`$$" OPTS="--verbose --port $PORT --force --ignore-errors --delete-excluded --exclude-from=$EXCLUDES --delete --backup --backup-dir=/$BACKUPDIR -a" #OPTS="--verbose --port $PORT --force --ignore-errors --delete-excluded # --exclude-from=$EXCLUDES --delete -a" PATH=$PATH:/pkg/rsync # the following line clears the last weeks incremental directory [ -d /tmp/emptydir ] || mkdir /tmp/emptydir #rsync --port $PORT --delete -a /tmp/emptydir/ $BSERVER::$MODULE/$BACKUPDIR/ rmdir /tmp/emptydir # now the actual transfer rsync $OPTS $BDIRS $BSERVER::$MODULE/Current