Skip to main content
Kafka Backup for Ceph Object Gateway

Back up Apache Kafka to Ceph

Store compressed topic data, consumer group offsets, and topic configuration in a self-hosted Ceph cluster. Restore into any reachable Kafka cluster at a precise moment in time.

How Kafka backup to Ceph works

Kafka backup to Ceph uses the S3-compatible API exposed by Ceph Object Gateway. OSO Kafka Backup connects through your gateway endpoint, so no separate Ceph storage adapter is required.

Ceph keeps backup objects outside Kafka brokers and their attached volumes. Your team controls the storage cluster, network path, placement, and retention policy. This can suit private cloud and on-premises recovery designs.

OSO compresses topic records with Zstd or LZ4 before upload. It also preserves consumer group offsets and topic configuration. The storage format reference explains the objects written to Ceph.

Ceph Kafka backup configuration

Create a Ceph Object Gateway user with access to the backup bucket. Configure the s3 backend with the gateway endpoint and its access credentials.

This example assumes virtual-hosted bucket access. Configure gateway DNS for bucket subdomains and use a matching TLS certificate. Ceph also supports path-style requests, but client support must be verified for your deployment.

backup.yaml
mode: backup
backup_id: "ceph-daily"

source:
bootstrap_servers:
- kafka-1.internal:9092
- kafka-2.internal:9092
topics:
include:
- "*"
exclude:
- "__consumer_offsets"

storage:
backend: s3
bucket: kafka-backups
region: us-east-1
endpoint: https://s3.ceph.example.com
access_key: ${CEPH_ACCESS_KEY_ID}
secret_key: ${CEPH_SECRET_ACCESS_KEY}
prefix: backups/production

backup:
compression: zstd
compression_level: 5
include_offset_headers: true

Ceph deployment checks

CheckWhy it matters
Gateway DNS and TLSThe bucket hostname must resolve and match the certificate.
Bucket permissionsThe backup identity needs object read, write, list, and delete permissions for normal lifecycle operations.
Network throughputBackup and restore windows depend on Kafka, gateway, and Ceph capacity.
Recovery testsA successful upload does not prove that a target cluster can be restored.

Use the S3 deployment guide for credential and connection patterns. Test a full restore before relying on the bucket for disaster recovery.

Frequently asked questions

Does OSO Kafka Backup work with Ceph?

Yes. Select the s3 storage backend, set the Ceph Object Gateway endpoint, and provide the gateway user access key and secret key.

Does Ceph provide the full Amazon S3 API?

Ceph Object Gateway supports a large subset of the Amazon S3 API. Kafka backup uses standard bucket and object operations through that compatible interface.

Does the Ceph gateway need special DNS configuration?

Virtual-hosted bucket access needs gateway DNS and TLS coverage for bucket subdomains. Confirm the addressing mode and certificate before running a backup.

Can I restore a Ceph backup into another Kafka cluster?

Yes. Point the restore configuration at any reachable target Kafka cluster. Restore can preserve consumer offsets and stop at a millisecond timestamp.

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.