diff options
author | Olivier Mehani <shtrom@ssji.net> | 2020-03-23 13:31:18 +0100 |
---|---|---|
committer | Olivier Mehani <shtrom@ssji.net> | 2020-07-03 07:42:12 +0200 |
commit | 036cab76202aeea3b7ae841583c8bb2d48eb8b43 (patch) | |
tree | 91249a4be24fa52e5fec10c7166e1add85865ee9 /openbsd | |
parent | 29f020c030d797b72e7d57f42dc15c5476539a6d (diff) |
[titanium-cleanup] report count of cleared files
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Diffstat (limited to 'openbsd')
-rwxr-xr-x | openbsd/backup-cleanup.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/openbsd/backup-cleanup.sh b/openbsd/backup-cleanup.sh new file mode 100755 index 0000000..7212c0e --- /dev/null +++ b/openbsd/backup-cleanup.sh @@ -0,0 +1,18 @@ +#!/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 + |