Initial commit
This commit is contained in:
commit
420be44f56
11 changed files with 432 additions and 0 deletions
19
templates/backup-retention.j2
Executable file
19
templates/backup-retention.j2
Executable 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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue