add backup cronjob for db
This commit is contained in:
parent
d346b07b24
commit
115e72dd53
2 changed files with 13 additions and 1 deletions
12
apps/base/customer1/backup-cronjob.yaml
Normal file
12
apps/base/customer1/backup-cronjob.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: ScheduledBackup
|
||||||
|
metadata:
|
||||||
|
name: daily-full-backup
|
||||||
|
namespace: customer1
|
||||||
|
spec:
|
||||||
|
schedule: "0 3 * * *" # Daily at 03:00 UTC (adjust cron as needed)
|
||||||
|
suspend: false
|
||||||
|
immediate: false # No immediate run (or true if you want one now too)
|
||||||
|
backupOwnerReference: self
|
||||||
|
cluster:
|
||||||
|
name: customer1-pgdb
|
||||||
|
|
@ -12,4 +12,4 @@ resources:
|
||||||
- pg-cluster-customer1.yaml
|
- pg-cluster-customer1.yaml
|
||||||
- customer1-db-credentials.yaml
|
- customer1-db-credentials.yaml
|
||||||
- apigateway.yaml
|
- apigateway.yaml
|
||||||
|
- backup-cronjob.yaml
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue