From 5c8a166218baa3fe33cc9b4eae9bb69f51cb761a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 28 Jul 2023 13:06:00 +0300 Subject: [PATCH] Set up Longhorn backups to ZFS box --- longhorn-system/backup.yaml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 longhorn-system/backup.yaml diff --git a/longhorn-system/backup.yaml b/longhorn-system/backup.yaml new file mode 100644 index 0000000..616d4a1 --- /dev/null +++ b/longhorn-system/backup.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: codemowers.cloud/v1beta1 +kind: MinioBucketClaim +metadata: + name: backup +spec: + capacity: 1Ti + class: external +--- +apiVersion: longhorn.io/v1beta2 +kind: Setting +metadata: + name: backup-target + namespace: longhorn-system +value: 's3://longhorn-system-a4b235c5-7919-4cb0-9949-259e60c579f1@us-east1/' +--- +apiVersion: longhorn.io/v1beta2 +kind: Setting +metadata: + name: backup-target-credential-secret + namespace: longhorn-system +value: 'miniobucket-backup-owner-secrets' +--- +apiVersion: longhorn.io/v1beta1 +kind: RecurringJob +metadata: + name: backup + namespace: longhorn-system +spec: + cron: "0 2 * * *" + task: backup + groups: + - default + retain: 1 + concurrency: 4 +--- +apiVersion: longhorn.io/v1beta1 +kind: RecurringJob +metadata: + name: trim + namespace: longhorn-system +spec: + cron: "0 * * * *" + task: trim + groups: + - default