# Replacing node with same name

**URL:** <https://discuss.elastic.co/t/replacing-node-with-same-name/196622>\
**Category:** Elasticsearch\
**Created:** [August 24, 2019, 1:48pm UTC](https://discuss.elastic.co/t/replacing-node-with-same-name/196622 "2019-08-24T13:48:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [August 24, 2019, 1:48pm UTC](https://discuss.elastic.co/t/replacing-node-with-same-name/196622/1 "2019-08-24T13:48:05Z")

</div>

I have 3 node cluster, all of them are master+data  
all rpms/binary are on standard place  
all data are on /data01

I would like to replace them with new better hardware but keep same name.

Can I do following?  
Shutdown elasticsearch on all three node.  
copy all the /data01/\* from master1 to new\_master1  
shutdown master1  
rename new\_master1 -\> master1

and start elasticsearch cluster (all three node)

will it work?

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [August 24, 2019, 4:51pm UTC](https://discuss.elastic.co/t/replacing-node-with-same-name/196622/2 "2019-08-24T16:51:43Z")

</div>

Or will this work?  
should I add Node4 as master/data.

shutdown elasticsearch on node1  
copy all /data01/\* to new node, and rename that new system to node1  
and start elasticsearch on it.

---

<div class="post-metadata">

**Author:** ![Emanuil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emanuil/32/36783_2.png) [@Emanuil](https://discuss.elastic.co/u/Emanuil)\
**Post date:** [August 24, 2019, 5:29pm UTC](https://discuss.elastic.co/t/replacing-node-with-same-name/196622/3 "2019-08-24T17:29:53Z")

</div>

> I would like to replace them with new better hardware but keep same name.

Does a rolling upgrade work for you? See [Rolling upgrade | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html) . Ignore the parts where it talks about an Elasticsearch software upgrade - the restart sequence is the same for a hardware replacement. **Only do this if you have at least one replica per shard** , as you typically will in production.

During the Upgrade step, you can set the hostname of the new node to be the same as the old one.

You can move the data folder if you like, but if it's not very big I would just add the upgraded node empty at step 3, so it simply rebuilds the data from the other nodes.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [August 24, 2019, 5:37pm UTC](https://discuss.elastic.co/t/replacing-node-with-same-name/196622/4 "2019-08-24T17:37:18Z")

</div>

in sort it is doable. Let me give it a try.  
will give it a try to this end of next week. and will update this thread.

---

<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:** [September 21, 2019, 5:37pm UTC](https://discuss.elastic.co/t/replacing-node-with-same-name/196622/5 "2019-09-21T17:37:29Z")

</div>

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