Overview
A Backup is used for backing up topics from an EventHub, and offloading them to Storage. It is configured by creating a Backup resource in Kubernetes. The Kannika Armory Operator creates a Deployment that runs the backup process, based on the configuration in the Backup resource.
A Backup can have multiple Backup Streams which are used to configure which topics should be backed up.
Usage
Backups can be managed using the kubectl
command line tool,
and are available by the name backup
or backups
.
Backup Status
A Backup can have the following statuses:
- Draft The Backup has no streams defined, and is not ready to be started.
- Ready The Backup has streams defined, and is ready to be started.
- Streaming The Backup is running and backing up data to the storage.
- Paused The Backup is paused, and no data is being backed up.
- Failed The Backup has failed, and no data is being backed up.
Configuring a Backup
The following is an example of a Backup.
It configures a Backup which will back up two topics from the my-kafka-cluster
EventHub to the my-bucket
Storage.
In this example:
-
A Backup named
backup-example
is created, indicated by the.metadata.name
field. This name will become the basis for the Deployment which is created for this Backup. -
The Backup will connect to the
my-kafka-cluster
EventHub to fetch data, indicated by the.spec.source
field. The Backup will write data to themy-bucket
Storage defined in thespec.sink
field. -
The
.spec.streams
field contains a list of Backup Streams. A Backup Stream contains the configuration of each topic that will be backed up. In this case, two topics namedmagic.events
andpixie.dust
will be backed up.
Pausing and resuming
It is possible to pause a Backup, and resume it later.
When a Backup is paused,
the associated Deployment will be scaled down to 0
.
Pausing and resuming a Backup
You can pause a Backup by setting the .spec.enabled
field to false
.
The following is an example of a Backup which is disabled (paused).
A Backup can be resumed again by setting the spec.enabled
field to true
again (or by removing the field).
Pausing and resuming a Backup Stream (Topic)
A Backup Stream can be paused by setting the enabled
field to false
of a Backup Stream.
The following is an example of a Backup Stream which is paused.
Disabling all streams of a Backup will also pause the Backup,
since there are no topics to be backed up.
The Deployment will be scaled down to 0
when all streams are disabled.