wurstmeister / kafka-docker

Dockerfile for Apache Kafka
http://wurstmeister.github.io/kafka-docker/
Apache License 2.0
6.9k stars 2.73k forks source link

How to persist data through VM / service restarting #682

Open ghost opened 2 years ago

ghost commented 2 years ago

Hi, I have read #517 and #672 but was wondering for my use case of deploying this in a Linux VM in an ESXI host, how do I persist data through things like the VM restarting (we have hardware resource issues that I cannot control) or the docker service restarting? If we simply set the logs dir as mentioned in the 2 issues above, would kafka automatically continue from these (and hence accurately retain the topic offsets etc.) even when the container is destroyed and recreated or the entire VM is restarted?

OneCricketeer commented 2 years ago

Mounting a docker volume should be all you need, yes, VM or not. The VM itself should have its own persistent disk & volume from the physical host.