Support Questions

Find answers, ask questions, and share your expertise

How to copy topic configuration (only metadata) from one kafka instance to other


Hi ,

I have two kafka cluster where I need to copy only the topic configuration from one cluster to other without copying any data. How can we do that. I know using replicator/mirrormaker it can be done but I am not interested in data here.






A] There is no any standard tool that Kafka or Cloudera provides to migrate only Kafka zookeeper metadata. But yes, there are some third-party tools which you can use to migrate zookeeper metadata. 


You can use a third-party tool like zkcopy to migrate/copy metadata from one cluster to another.  But we would recommend testing it in your dev lab first to avoid further issues 


Note: Just something to be aware of.. If you decide on copying over the znodes uses this third party tool then you need to do this when the Kafka service is shutdown. You would then copy it to the new Znode root location, change the chroot config in Kafka and start that up again.


B] You can use SRM for migration and once the migration is completed you can lower the retention settings 1-2 hours as you don't need data so that all data will be cleared automatically and then you can set retetion back to 7 days which is default or as per your requirement. 


C] You can also create all topics on a new cluster with the required configuration 


If you found this response assisted with your query, please take a moment to log in and click on  KUDOS 🙂 & ”Accept as Solution" below this post.


Thank you.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.