Hi ,

Thanks for the reply.
Is there  a way to check when the zookeeper cluster has become stable.
We are running in kubernetes cluster and kafka nodes are connected to zookeeper 
via service.
The condition we are using to check if the zookeeper pod is up is  "imok" = 
"$(echo ruok | nc -w 1 localhost 2181)"
Is there something else we need to check before the brokers get added.

Thanks,
Mahesh

From: Svante Karlsson <svante.karls...@csi.se>
Sent: Wednesday, May 22, 2019 4:31 PM
To: dev@kafka.apache.org
Cc: Rudregowda, Mahesh (Nokia - IN/Bangalore) <mahesh.rudrego...@nokia.com>
Subject: Re: Backup and Restore of kafka broker with zookeeper

You have to get a consistent zookeeper cluster before adding your Kafka nodes - 
they will "mirror" the state in zookeeper.

So restore all the files before starting anything. Then start zookeepers and 
wait for for it to stabilize. Finally start Kafka nodes. - ( with the data in 
place of course.)



Den ons 22 maj 2019 kl 10:08 skrev Srinivas, Kaushik (Nokia - IN/Bangalore) 
<kaushik.srini...@nokia.com<mailto:kaushik.srini...@nokia.com>>:
Hi All,

We are trying to do a backup of kafka + zookeeper data and restore the same 
back for one of our application's use case.

We are taking below steps for the same,
1. Take folder contents back up of data and log directories for kafka and 
zookeeper.
2. Delete the kafka zookeepers and brokers
3. Delete the data and log files.
4. Install kafka and zookeepers back with same broker IDs.
5. restore the data and log files to the same directory.
// Observation here is,old topics are not listed after the broker is up and 
running.
7. Restarted kafka and zookeeper
// Observation : topics get listed but still the log files are present in the 
broker log directory with empty log files.
    Consumers does not work.

We see this working in one node kafka broker cluster, but the same scenario 
does not work with multi node kafka cluster.
One observation with respect to leaders of partitions is that, after restore 
and restart leaders of the partitions are changed.

Is it due to this the back up is not happening and we have to do reassign 
partitions and restore the old partition assignment for a topic ??
Is there any better or recommended way to take the back up and restore a 
kafka+zookeeper cluster ??

Any information on this front would be very useful.

Thanks in advance,
Kaushik.

Reply via email to