#!/bin/sh BACKUPCLEANUPHORIZON="${1:-6M}" # The following variables can be overridden in /etc/backup.sh.conf DIRS="/etc /srv" TMPSUBDIR=/tmp BACKUPROOT="/srv/rdiff-backup" BACKUPDIR="${BACKUPROOT}/`hostname -s`" BACKUPSERVER=backup.example.net EXCLUDEALWAYS="${BACKUPROOT}" test -e /etc/backup.sh.conf && . /etc/backup.sh.conf for dir in ${DIRS}; do rdiff-backup -v 6 --remove-older-than ${BACKUPCLEANUPHORIZON} --force ${BACKUPDIR}$dir done