How to Create a Schedule
Schedule object defines the frequency, destination and secrets required to run K8up jobs in your namespace:
apiVersion: backup.appuio.ch/v1alpha1 kind: Schedule metadata: name: schedule-test spec: backend: s3: endpoint: http://minio-service:9000 bucket: backups accessKeyIDSecretRef: name: backup-credentials key: username secretAccessKeySecretRef: name: backup-credentials key: password repoPasswordSecretRef: name: backup-repo key: password backup: schedule: '*/5 * * * *' keepJobs: 4 # optional #promURL: https://prometheus-io-instance:8443 check: schedule: '0 1 * * 1' # optional #promURL: https://prometheus-io-instance:8443 prune: schedule: '0 1 * * 0' retention: keepLast: 5 keepDaily: 14
Save the YAML above in a file named
schedule.yaml and use the
kubectl apply -f schedule.yaml command to deploy this configuration to your cluster.
The file above will instruct the Operator to do backups every 5 minute, prune them monthly and run check jobs for repository maintenance. It will also archive the latest snapshots to the
archive bucket once each week.
Feel free to adjust the frequencies to your liking. To help you with the crontab syntax, we recommend to check out crontab.guru.
You can always check the state and configuration of your backup by using