Skip to main content
Solution: Build a Kafka DR plan

Assemble a Kafka disaster recovery plan

Four parts: a failure scenario table, scheduled backups to object storage, a restore runbook, and targets with a test cadence. Everything below is copy-ready.

What a Kafka disaster recovery plan covers

A Kafka disaster recovery plan answers one question per failure: how does the cluster get back to serving traffic, and what data survives? Replication alone cannot answer it. Replication copies corruption, propagates deletions, and offers no way back to "before the incident."

A backup-based plan does. It needs four parts: a scenario table naming each failure and its recovery action, a backup schedule that sets your data-loss window, a runbook the on-call engineer can run at 3 AM, and targets that get tested on a calendar — not during the outage.

Part 1 — Name the failures before they happen

Failure scenarioRecovery action
Regional outageRestore the latest backup to a standby cluster — the warm standby pattern
Bad data publishedPoint-in-time restore to the millisecond before corruption
Topic deleted by mistakeRestore that one topic from the last backup containing it
Ransomware / cluster compromiseProvision an isolated cluster, restore from a clean validated backup

Each row maps to the same three commands — validate, validate-restore, three-phase-restore — with different configs. That is the point of the plan: no improvisation during the incident.

Part 2 — Schedule the backups that fund the plan

Hourly backup to the DR region
mode: backup
backup_id: "production-${TIMESTAMP}"

source:
bootstrap_servers:
- kafka-prod-1:9092
- kafka-prod-2:9092
- kafka-prod-3:9092
topics:
include:
- "*"
exclude:
- "__consumer_offsets"
- "_schemas"

storage:
backend: s3
bucket: kafka-dr-backups
region: us-east-1 # DR region, not the production region
prefix: production/hourly

backup:
compression: zstd
compression_level: 3
checkpoint_interval_secs: 30

# Both required for consumer group recovery after restore
include_offset_headers: true
source_cluster_id: "prod-us-west-2"

Part 3 — Set targets the schedule can meet

Backup frequency sets your recovery point objective. Data volume sets your recovery time objective. Put both numbers in the plan and defend them.

Backup frequencyRPO (max data loss)
Continuous~1 minute
Every 15 minutes15 minutes
Hourly1 hour
Daily24 hours
Data volumeRTO estimate
Under 10 GB15–30 minutes
10–100 GB30–60 minutes
100 GB – 1 TB1–2 hours
Over 1 TB2–4 hours

Setting targets per workload — not one number for the whole cluster — is covered in the RTO/RPO planning guide on the blog.

Part 4 — Put the tests on a calendar

A plan nobody has executed is a document, not a capability. Schedule the proof:

TestFrequency
Backup integrity validationDaily
Restore to a test clusterWeekly
Full DR drill with failoverQuarterly

The DR testing playbook turns this table into a full drill program, with pass/fail evidence for each level.

Frequently asked questions

What should a Kafka disaster recovery plan include?

Four parts: a failure scenario table mapping each incident type to a recovery action, a backup schedule that sets the RPO, a validated restore runbook, and RTO/RPO targets with a recurring test cadence. Each scenario should resolve to specific commands and configs, not prose.

Is Kafka replication enough for disaster recovery?

No. Replication provides availability, not recovery. It copies corrupted records to the standby, propagates topic deletions, and cannot restore the cluster to a state before an incident. A DR plan needs isolated, point-in-time restorable backups alongside any replication.

How often should I back up Kafka for disaster recovery?

Backup frequency equals your maximum data loss. Hourly backups mean up to one hour of loss; every 15 minutes means 15. Choose per workload based on data criticality, storage cost, and compliance requirements, and record the choice in the plan.

Do consumer groups recover their positions after a DR restore?

Yes, when backups are taken with include_offset_headers: true and a source_cluster_id. The three-phase restore maps each committed source offset to the equivalent offset in the restored log and repositions the groups you list.

How do I test a Kafka disaster recovery plan without risking production?

Restore into an isolated test cluster. Validate the backup with kafka-backup validate --deep, run the restore against the test cluster, and compare record counts and consumer positions. Weekly restore tests plus a quarterly full drill keep the plan honest.

Ready to protect your Kafka data?

Take your first backup in minutes with the open source CLI, or talk to us about Enterprise features like encryption, RBAC, and audit logging.