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
You can inspect the state of a running backup with the kannika-tools index show
command:
$ kubectl -n default exec my-backup-7bb8777c68-xt62n -- kannika-tools index show --all --summary---topic: std-1no_files: 2no_records: 17763partitions: 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
.
Rebuilding a backup’s index
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 default exec my-backup-6b7d8df98d-7lsd5 -- kannika-tools index rebuild --topic std-1---topic: std-1files:- 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 !