Skip to content

Backup Management Tools

The Armory distribution comes with a CLI tool to help manage backups. It is located at /usr/bin/kannika-tools in the image.

Viewing the contents of a backup’s storage

Section titled “Viewing the contents of a backup’s storage”

You can inspect the state of a running backup with the kannika-tools index show command:

$ kubectl -n kannika-data exec my-backup-58a8f72c-0 -- kannika-tools index show --all --summary
---
topic: std-1
no_files: 2
no_records: 17763
partitions:
0:
first_offset: 0
last_offset: 7707
message_count: 7708
topic_size: 215824
1:
first_offset: 0
last_offset: 7071
message_count: 7072
topic_size: 198016
2:
first_offset: 0
last_offset: 2982
message_count: 2983
topic_size: 83524

The above shows a summary of all topics present in the storage being used by the backup.

It is possible to get more detailed information by omitting the --summary flag. Have a look at the available options with kannika-tools index show --help.

If snapshots are enabled, you can list the available snapshot versions for a topic with kannika-tools snapshot list:

Terminal window
$ kubectl -n kannika-data exec my-backup-58a8f72c-0 -- kannika-tools snapshot list my-topic
Topic: my-topic (active: v2)
VERSION TOPIC ID CREATED
v1 5a8f3b2c-1d4e-4f6a-9b7c-8e2d1f0a3b5c 2026-01-15 10:00:00 UTC
* v2 9c7e4d6f-2a3b-4c8d-1e5f-7g6h8i9j0k1l 2026-06-01 09:00:00 UTC

Use --all to list snapshots for all topics in storage. Use -o yaml for machine-readable output.

Topics without snapshots will show a message on stderr and are skipped.

Rebuilding a Backup’s index should rarely be necessary, however, it is possible that a new Armory version adds more metadata to a backup’s index. In such cases, you might want to rebuild the index file to upgrade to the new format to benefit from Armory’s new capabilities.

$ kubectl -n kannika-data exec my-backup-58a8f72c-0 -- kannika-tools index rebuild --topic std-1
---
topic: std-1
files:
- id: 01JAA4SECAJEKRQD6HKNGN75YA
disk_size: 1292550
core_version: 0.10.0
created_at: 2024-10-16T07:50:05.289981704Z
closed_at: 2024-10-16T07:50:05.389238663Z
partitions:
0:
first_offset: 0
last_offset: 10365
message_count: 10366
topic_size: 290248
earliest_timestamp: 1729064718072
latest_timestamp: 1729064754838
1:
first_offset: 0
last_offset: 5780
message_count: 5781
topic_size: 161868
earliest_timestamp: 1729064710363
latest_timestamp: 1729064737018
2:
first_offset: 0
last_offset: 9634
message_count: 9635
topic_size: 269780
earliest_timestamp: 1729064712770
latest_timestamp: 1729064748451
- id: 01JAA4VVTHRS9M5G85DGNK3Z1K
disk_size: 26029
core_version: 0.10.0
created_at: 2024-10-16T07:50:06.165546039Z
closed_at: 2024-10-16T07:50:06.168906999Z
partitions:
1:
first_offset: 5781
last_offset: 6299
message_count: 519
topic_size: 14532
earliest_timestamp: 1729064988491
latest_timestamp: 1729064989194

By default, the generated index will be written to standard output and won’t be written the backup’s storage. You will then have put the contents in a file called index within a backup’s directory manually.

The tool can also write that index file to the storage for you with the -w flag. You might also need the --force flag to overwrite the index file if one is already present, but do this at your own risk !