Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gernerate new cluster_uuid in Elasticsearch

We´ve cloned two VMWare instances with ES (= two nodes in the same cluster) so that we can use them on another part of our network. I´ve set a new cluster name for both machines / nodes and everything works fine.

The only "problem" I see is, that the new machines / nodes have the same cluster_uuid as the orignal ones (although they have a different cluster_name). Can this become an issue? And if so - can I regenerate the uuid for the new cluster?

Thanks & BR

like image 922
Michael Avatar asked Oct 17 '25 10:10

Michael


1 Answers

Try to remove (or just rename) _state directory with metadata under /<path.data>/<cluster.name>/nodes/0, Elasticsearch will recreate it on next startup with new random uuid. Indices will be imported, but transient & persistent settings, mappings, etc will be lost.

like image 118
cybersoft Avatar answered Oct 21 '25 20:10

cybersoft



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!