How to Backup and Restore Kafka Topics: A Step-by-Step Guide
You cannot undo a deleted Kafka topic unless you have a backup. To backup a Kafka topic, you capture its records, partition layout, and offsets to durable storage outside the cluster; to restore, you produce that data back into the same or a different cluster. This guide walks through three ways to do it — from a purpose-built CLI to a bare consumer script — and how to verify the result actually restores.