Overview
A SchemaRegistryBackup is used for backing up schemas from a SchemaRegistry, and offloading them to a Storage. It is configured by creating a SchemaRegistryBackup resource in Kubernetes.
The Kannika Armory Operator creates a Pod that runs the backup process, based on the configuration in the SchemaRegistryBackup resource.
Usage
SchemaRegistryBackups can be managed using the kubectl
command line tool,
and are available by the name schemaregistrybackup
or schemaregistrybackups
.
Backup Status
A SchemaRegistryBackup can have the following statuses:
- Paused The Backup is configured but it has not been started yet or it has been paused;
- Initializing The Backup process is being created;
- Running The Backup is running and backing up data to the storage;
- Error The Backup has failed, and no data is being backed up.
Additionally,
a SchemaRegistryBackup resource exposes a DeploymentReady
Condition to report on the state of the underlying Deployment.
This condition’s status
can either be ‘True’ or ‘False’,
indicating whether this Backup’s deployment is healthy.
The condition’s reason
gives additional context and may be one of the following:
- DeploymentReady the deployment is healthy;
- DeploymentError the deployment encountered an error: check the status of this deployment to find out what happened;
- DeploymentDeleted somebody or something deleted the deployment and this should be a transient state;
- DeploymentStateUnknown the deployment state is unknown, perhaps due to an error talking with the kubernetes API.
Configuring a SchemaRegistryBackup
The following is an example of a SchemaRegistryBackup.
In this example:
-
A SchemaRegistryBackup named
confluent-registry-backup
is created, as indicated by the.metadata.name
field. This name will inherited by the Pod running the backup process. -
The backup is enabled by setting the
spec.enabled
totrue
. Unless this flag is set, the backup container will not be started. -
The SchemaRegistryBackup will connect to the
confluent-registry
SchemaRegistry to fetch schemas, as indicated by the.spec.registry
field, and use the Credentials referenced byconfluent-registry-creds
for authentication. -
The SchemaRegistryBackup will write data to the
local-storage
Storage defined in thespec.storage
field. -
The interval between API fetches and synchronization with the remote storage is set to 15 seconds by the
spec.backupIntervalSecs
field. If not specified, backups will occur every 3600 seconds.