2 Backup and Restore Flow
Important:
- It is recommended to keep the backup storage in the external storage that can be shared between different clusters. This is required, so that in an event of a disaster, the backup is accessible on the other clusters. The backup job should create a PV/PVC from the external storage provided for the backup.
- In case the external storage is not made available for the backup storage, the customer should take care to copy the backups from the associated backup PV in the cluster to the external storage. The security and connectivity to the external storage should be managed by the customer. To copy the backup from the backup PV to the external server, follow Verifying OCNADD Backup.
- The restore job should have access to the external storage so that the backup from the external storage can be used for the restoration of the OCNADD services. In case the external storage is not available, the backup should be copied from the external storage to the backup PV in the new cluster. For information on the procedure, see Verifying OCNADD Backup.
Note:
At a time, only one among the three backup jobs (ocnaddmanualbackup, ocnaddverify or ocnaddrestore) can be running. If any existing backup job is running, that job needs to be deleted to spawn the new job.
kubectl delete job.batch/<ocnadd*> -n <namespace>
where namespace = Namespace of OCNADD deployment
ocnadd* = Running jobs in the namespace (ocnaddmanualbackup, ocnaddverify or ocnaddrestore)
Example:
kubectl delete job.batch/ocnaddverify -n ocnadd-deploy
Backup
-
The OCNADD backup is managed using the backup job created at the time of installation. The backup job runs as a cron job and takes the daily backup of the following:
- OCNADD databases for configuration, alarms, and health monitoring
- OCNADD Kafka metadata including topics and partitions, which are already created
-
The automated backup job spawns as a container and takes the backup at the scheduled time. The backup file in the format
OCNADD_Backup_DD-MM-YYYY_hh-mm-ss.zip
is created and stored in the PV mounted on the path/work-dir/backup
by the backup container. -
On-demand backup can also be created by creating the backup container. For more information, see Performing OCNADD Manual Backup.
-
The backup can be stored on external storage.
Restore
-
The OCNADD restore job must have access to the backups from the backup PV/PVC.
-
The restore uses the latest backup file available in the backup storage if the BACKUP_FILE argument is not given.
-
The restore job performs the restore in the following order:
- Restore the OCNADD database(s) on the CnDBTier.
- Restore the Kafka metadata.