-function copy_over () {
- # Move file to its offsite destination
- # $1: file, $2: relative directory (optional)
- if test -z "$1" || test -n "$3"; then
- echo "Bad programming"
- exit 1
- fi
- local FILE=$1
- local DEST=$BACKUPDIR/$SUBDIR
- if test -n "$2"; then
- DEST=$DEST/$2
- fi
- < $FILE catsync -b $BWLIMIT $DEST/$FILE
- rm -f $FILE
-}