diff --git a/README.md b/README.md index 2458913..0690e5b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ You can also pass the following environment variables to override the defaults: -e RESTIC_KEEP_DAILY='7' -e RESTIC_KEEP_WEEKLY='4' -e RESTIC_KEEP_MONTHLY='12' + -e RESTIC_KEEP_YEARLY='7' You can backup 5 different database clusters with `PG*_[1..5]`, and assign an arbitrary hostname with `HOSTNAME_[1..5]` (if `PGHOST` is not a fully qualified domain name) environment variables. diff --git a/bin/prune.sh b/bin/prune.sh index 5f451c6..1bafd47 100755 --- a/bin/prune.sh +++ b/bin/prune.sh @@ -10,7 +10,8 @@ while ! restic forget \ --keep-hourly="${RESTIC_KEEP_HOURLY:-24}" \ --keep-daily="${RESTIC_KEEP_DAILY:-7}" \ --keep-weekly="${RESTIC_KEEP_WEEKLY:-4}" \ - --keep-monthly="${RESTIC_KEEP_MONTHLY:-12}"; do + --keep-monthly="${RESTIC_KEEP_MONTHLY:-12}" \ + --keep-yearly="${RESTIC_KEEP_YEARLY:-7}"; do echo "Sleeping for 10 seconds before retry..." sleep 10 done diff --git a/docker-compose.yml b/docker-compose.yml index 9f20b6c..7b496dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,7 @@ services: # RESTIC_KEEP_DAILY: 7 # RESTIC_KEEP_WEEKLY: 4 # RESTIC_KEEP_MONTHLY: 12 + # RESTIC_KEEP_YEARLY: 7 RESTIC_PASSWORD: RESTIC_REPOSITORY: image: interaction/restic-pg-dump