# How can I move data when renaming the cluster.name

**URL:** <https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894>\
**Category:** Elasticsearch\
**Created:** [June 15, 2016, 4:57pm UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894 "2016-06-15T16:57:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![figo10203](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@figo10203](https://discuss.elastic.co/u/figo10203)\
**Post date:** [June 15, 2016, 4:57pm UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/1 "2016-06-15T16:57:01Z")

</div>

for expanding the es cluster, I add another node and change the default cluster.name and node.name in elasticsearch.yml file of current node, but all the data are in default cluster "elasticsearch", how can I move all the data to the new naming cluster. "beecloud" is the new cluster name in the graph, just copy all the file under "elasticsearch" to "beecloud" ?

the data folder of old node

 ![](https://us1.discourse-cdn.com/elastic/original/2X/5/537c6d17c9fa45ae02a1d17f6540a36fc2050a23.png)

If the correct way is to copy, copy both 0 and 1 to "beecloud" ?

Thanks for advance!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2016, 1:18am UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/2 "2016-06-16T01:18:32Z")

</div>

(Assuming you have a backup of the data) Just rename (move) the `elasticsearch` directory to `beecloud`.

---

<div class="post-metadata">

**Author:** ![figo10203](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@figo10203](https://discuss.elastic.co/u/figo10203)\
**Post date:** [June 16, 2016, 3:20am UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/3 "2016-06-16T03:20:53Z")

</div>

thanks very much, another, my new added node doesn't obtain any shards, the total 5 shards are still in the old node "node-1", the new ndoe "node-2" seems not receiver any shaards, so I want to ask why? and what does that mean by different color of shards?

 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/32d53f40d0769af2c9399c8eccc4abb2881422ec.png)

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2016, 3:28am UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/4 "2016-06-16T03:28:55Z")

</div>

The lighter ones are replicas. Give it time and they will be ok.

---

<div class="post-metadata">

**Author:** ![figo10203](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@figo10203](https://discuss.elastic.co/u/figo10203)\
**Post date:** [June 16, 2016, 3:46am UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/5 "2016-06-16T03:46:41Z")

</div>

The lighter ones I marked are replicas ? the darker in node- is primary shards? but the lighter ones I marked in node-1 were already be there before "node-2" was added. And what about the grey ones 1 and 2 ?

---

<div class="post-metadata">

**Author:** ![figo10203](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@figo10203](https://discuss.elastic.co/u/figo10203)\
**Post date:** [June 16, 2016, 6:11am UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/6 "2016-06-16T06:11:11Z")

</div>

Hi Walkom,  
thanks for your help, another question, why there are no shards in my old node for some index after adding two nodes? see the graph below

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/19187162d3db79fdbb3d7799cc0b9af1b4cc2b8d.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2016, 6:21am UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/7 "2016-06-16T06:21:11Z")

</div>

Not sure, check your logs perhaps? It may be moving them over if the node was just restarted? Do you have enough disk space on them?

---

<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:** [July 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/how-can-i-move-data-when-renaming-the-cluster-name/52894/8 "2017-07-05T22:43:27Z")

</div>


