# Change ES cluster\_uuid

**URL:** <https://discuss.elastic.co/t/change-es-cluster-uuid/193092>\
**Category:** Elasticsearch\
**Created:** [July 31, 2019, 10:27am UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092 "2019-07-31T10:27:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [July 31, 2019, 10:27am UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/1 "2019-07-31T10:27:33Z")

</div>

hi,  
I saw that I have two different cluster with the same cluster\_uuid. I don't know how this could happened but I can say that I cloned one node from the first cluster to create the new one.  
is there a way to change the cluster\_uuid?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 31, 2019, 11:15am UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/2 "2019-07-31T11:15:11Z")

</div>

> [@rschirin](#):
>
> I don't know how this could happened but I can say that I cloned one node from the first cluster to create the new one.

That would explain it 🙂 It's best not to clone nodes, it can cause all sorts of strange issues.

> [@rschirin](#):
>
> is there a way to change the cluster\_uuid?

Yes, [the `elasticsearch-node unsafe-bootstrap` tool](https://www.elastic.co/guide/en/elasticsearch/reference/current/node-tool.html) will generate a new cluster UUID.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [July 31, 2019, 2:31pm UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/3 "2019-07-31T14:31:16Z")

</div>

really thanks for your answer. not really easy to find that doc page ☹

regarding the clone operation: I was thinking that cloning a node to create a new cluster and deleting the `data` folder before to start it was a safe procedure.

regarding `elasticsearch-node detach-cluster`: what will happen to the data contained into detached node? will be erased?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 31, 2019, 3:47pm UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/4 "2019-07-31T15:47:51Z")

</div>

Yes, it's deliberately well-hidden because if you need it then you are doing something a long way from the recommended path, and there's a good chance of losing data or of something equally weird happening.

I'm not sure how "cloning a node and deleting the data folder" differs from just making a new empty node. In any case the cluster UUID is stored in the data folder, so if you have two clusters with the same UUID then you must have not cleared out the data folder properly.

`detach-cluster` will not itself delete any data but again, if you need it then you're a long way from the recommended path and there's a good chance that subsequent steps will get you deeper into trouble.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [July 31, 2019, 6:40pm UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/5 "2019-07-31T18:40:44Z")

</div>

Yeah, I'm smiling when I read about the "well-hidden" feature. But now I know something new 🙂

Clone a node was a choice made at the beginning of my experience with elasticsearch. Now, for sure, I will not use this technique.

Anyway, why I should need to move a node from a cluster to another one?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 31, 2019, 9:26pm UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/6 "2019-07-31T21:26:47Z")

</div>

> [@rschirin](#):
>
> Anyway, why I should need to move a node from a cluster to another one?

You shouldn't. It's a really bad idea.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [August 1, 2019, 10:03am UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/7 "2019-08-01T10:03:59Z")

</div>

ok, could I consider the option `elasticsearch-node detach-cluster` as an old feature not helpful?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 1, 2019, 10:57am UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/8 "2019-08-01T10:57:44Z")

</div>

Yes, it's something that you could do rather easily (even inadvertently) in older versions so it's still supported in the name of compatibility, but in no way is it a good idea to try it 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 29, 2019, 10:57am UTC](https://discuss.elastic.co/t/change-es-cluster-uuid/193092/9 "2019-08-29T10:57:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
