Initial commit

This commit is contained in:
nd 2021-03-12 03:35:14 +01:00
commit 420be44f56
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
11 changed files with 432 additions and 0 deletions

19
templates/backup-retention.j2 Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
source /etc/backup-client/retention.env
{% if backup_backend == 'restic' %}
# restic backend
source /etc/backup-client/restic.env
restic forget \
--verbose \
--prune \
--group-by "host,paths,tags" \
--keep-hourly ${BACKUP_RETENTION_HOURS} \
--keep-daily ${BACKUP_RETENTION_DAYS} \
--keep-weekly ${BACKUP_RETENTION_WEEKS} \
--keep-monthly ${BACKUP_RETENTION_MONTHS} \
--keep-yearly ${BACKUP_RETENTION_YEARS}
{% endif %}