21 lines
471 B
Django/Jinja
21 lines
471 B
Django/Jinja
#jinja2:lstrip_blocks: True
|
|
#!/bin/bash
|
|
usage(){
|
|
cat << EOL
|
|
|
|
This script is intended to run on a trusted management station to purge borg repo's in
|
|
append-only mode.
|
|
Don't put it on the backup server, it contains all borg secrets!
|
|
|
|
EOL
|
|
}
|
|
|
|
DATE=$(date +%y%m%d)
|
|
LOG_DIR=/var/log/borgbackup
|
|
[ ! -d $LOG_DIR ] && mkdir $LOG_DIR
|
|
LOG_FILE=/var/log/borgbackup-prune/${DATE}.log
|
|
exec &> >(tee "$LOG_FILE")
|
|
|
|
run-parts --lsbsysinit ~{{ borgbackup_management_user }}/prune.d
|
|
|