Scheduled Management Backups#
Backups should be run on a schedule consistent with the policy requirements of the environment. For example a production environment might be set for "daily" backups, while a testing environment is set for "weekly".
Create a Management Backup#
Periodic backups are handled by a ManagementBackup object, which uses a Cron expression
for its .spec.schedule field.
If the .spec.schedule field is not set, a backup on demand will be created instead.
Optionally, set the name of the .spec.backup.storageLocation of the BackupStorageLocation object.
The default location is the BackupStorageLocation object with .spec.default set to true.
Note
For the regional cluster case, make sure to setup the same location on the regional cluster.
For example, you can create a ManagementBackup object that backs up to the storage object
created in the preparation step every 6 hours
(ref: Kubernetes CronJob schedule syntax, "Vixie cron" step values).
Start the scheduled backup process by creating the following object:
kubectl apply -f - <<EOF
apiVersion: k0rdent.mirantis.com/v1beta1
kind: ManagementBackup
metadata:
  name: kcm
spec:
  schedule: "0 */6 * * *"
  storageLocation: aws-s3
EOF
Confirm the backup creation was successful by navigating to the appropriate storage console UI or from the command line:
kubectl get managementbackups
The managementbackup should show as Completed:
NAME              LASTBACKUPSTATUS   NEXTBACKUP   AGE
example-backup    Completed                       8m