Activating Standard Daily Backup
System backups are not available by default. It is critical that you follow the instructions in this section to activate standard daily backups on your appliance.
Caution:
Make sure that daily backups are activated after system initialization. If this procedure is omitted, you will not be able to restore a component or service from a last known good state.
To activate system backups, set up a Kubernetes CronJob by running the applicable script from the management node that owns the virtual IP of the cluster.
When the system initialization process is complete, execute the following procedure to activate system backups:
-
Log on to one of the management nodes.
# ssh root@pcamn01
-
Retrieve the name of the Kubernetes pod that runs the backup and restore service. Use the following command:
# kubectl get pods -A | grep brs default brs-5bdc556546-gxtx9 3/3 Running 0 17d
-
Execute the
default-backup
script as shown in the following example to set up the Kubernetes CronJob to make a daily backup.kubectl exec brs-5bdc556546-gxtx9 -c brs -- /usr/sbin/default-backup
This backup runs every day at 00:00 local appliance time and is retained for 14 days.
-
Verify that the CronJob has been added in the default namespace.
# kubectl get cronjobs -A NAMESPACE NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE default brs-cronjob-1629969790-backup 0 0 * * * False 0 <none> 32s health-check cert-checker */10 * * * * False 0 4m6s 17d health-check etcd-checker */10 * * * * False 0 4m6s 17d health-check flannel-checker */10 * * * * False 0 4m6s 17d health-check kubernetes-checker */10 * * * * False 0 4m6s 17d health-check l0-cluster-services-checker */10 * * * * False 0 4m6s 17d health-check mysql-cluster-checker */10 * * * * False 0 4m6s 17d health-check network-checker */10 * * * * False 0 4m6s 17d health-check registry-checker */10 * * * * False 0 4m6s 17d health-check sauron-checker */10 * * * * False 0 4m6s 17d health-check vault-checker */10 * * * * False 0 4m6s 17d sauron sauron-sauron-prometheus-gw-cj 30 19 * * * False 0 18h 17d
When this
brs-cronjob-unique_ID-backup
CronJob runs, any backups that were previously created by abrs
manual system backup job that are more than 14 days old are deleted. See Executing a Backup Operation for information about manual system backup.Backups created by this CronJob are deleted regularly when they are more than 14 days old, as described in the previous step.
ZFSSA manual snapshots are not deleted if they were not created by using any
brs
job, and their snapshot name is not in the following form (thebrs
snapshot naming convention):projectname/filesystemname_timestamp
Backups are created on the ZFS Storage Appliance at the following location, as seen from the management node mount point:
/nfs/shared_storage/backups/
Each backup is identified by its unique path containing the job OCID and time stamp:
/nfs/shared_storage/backups/ocid1.backup_cronjob.unique_ID/backup_timestamp/