initial migration
This commit is contained in:
16
infrastructure/backup/overlays/backup/kustomization.yaml
Normal file
16
infrastructure/backup/overlays/backup/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# namespace: backup
|
||||
nameSuffix: -backup
|
||||
resources:
|
||||
- ../../base
|
||||
# - ./restic-commands.yaml
|
||||
|
||||
|
||||
# patch the cronjob args field:
|
||||
patches:
|
||||
- path: ./restic-commands.yaml
|
||||
target:
|
||||
kind: CronJob
|
||||
|
25
infrastructure/backup/overlays/backup/restic-commands.yaml
Normal file
25
infrastructure/backup/overlays/backup/restic-commands.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: backup-patch
|
||||
spec:
|
||||
schedule: "0 2 * * *"
|
||||
# at 2:00, every day
|
||||
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: restic-base-container
|
||||
args:
|
||||
# >- strips newlines
|
||||
# -r $(RESTIC_REPOSITORY) not needed, bc set as env var
|
||||
- >-
|
||||
restic backup
|
||||
--verbose=2
|
||||
/data
|
||||
--exclude=s3/
|
||||
&&
|
||||
restic
|
||||
list snapshots
|
Reference in New Issue
Block a user