proper backup config

This commit is contained in:
2024-03-31 19:37:18 +02:00
parent deed24aa01
commit 49b21cde52
17 changed files with 19 additions and 64 deletions

View File

@@ -0,0 +1,29 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: restic-gdrive-prune
spec:
schedule: "0 0 1/15 * *"
# at midnight, the first and 15. of every month
jobTemplate:
spec:
template:
spec:
initContainers:
- name: restic-base-container
args:
# >- strips newlines
# RESTIC_ARGS Can be for instance: --verbose --dry-run
# RESTIC_REPOSITORY is set in the secret
- >-
restic forget
-r $(RESTIC_REPOSITORY)
--verbose=2
--keep-daily 7 --keep-weekly 5
--prune
containers:
- name: ntfy-command-send
env:
- name: OPERATION
value: "Restic prune on gdrive"