# Whats the best way to migrate single node elasticsearch data to a multinode elasticsearch environment?

**URL:** <https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199>\
**Category:** Elasticsearch\
**Created:** [April 15, 2020, 7:52pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199 "2020-04-15T19:52:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![deep9300](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@deep9300](https://discuss.elastic.co/u/deep9300)\
**Post date:** [April 15, 2020, 7:52pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/1 "2020-04-15T19:52:12Z")

</div>

I want to move my single node elasticsearch cluster data to a 3 node elasticsearch cluster. Only a few gb worth of data at first to test it out then proceed to move close to a 100gb. What is best way to this? Are any articles or instructions I can follow. Appreciate your help. Thank you.

---

<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:** [April 15, 2020, 8:46pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/2 "2020-04-15T20:46:41Z")

</div>

Add more nodes to the existing one node cluster, then let the replicas allocate. That's about it really 🙂

---

<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:** [April 15, 2020, 8:59pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/3 "2020-04-15T20:59:06Z")

</div>

As Mark said it is simple

I did this process,  
I had three node cluster (old hardware)  
got five newer systems. I added all five to existing cluster  
and remove all three old node one by one.

Once you ready to remove node do this first, wait for while and check shard allocation untill no shard is left on system which you want to remove

```
PUT /_cluster/settings
{
"transient" :{
"cluster.routing.allocation.exclude._name" : "<hostname>"
 }
}

PUT /_cluster/settings
{
"transient" :{
"cluster.routing.allocation.exclude._ip" : "<ip of host>"
 }
}

```

`GET /_cat/shards`

---

<div class="post-metadata">

**Author:** ![deep9300](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@deep9300](https://discuss.elastic.co/u/deep9300)\
**Post date:** [April 16, 2020, 5:41pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/4 "2020-04-16T17:41:08Z")

</div>

My single node cluster is an older version of elastic stack (kibana, logstash, elasticsearch). Its running in a production environment, so I don't want to change anything. I'd like to copy maybe a weeks worth of elasticsearch index to the new multinode elastic stack ( 3nodes elasticsearch, 1 node logstash, 1 node kibana) which will also be running in the same prod environment.

Would I just take the indexes from the single node elasticsearch and add it to just one of my new elasticsearch nodes then let it allocate across the other 2 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:** [April 16, 2020, 7:29pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/5 "2020-04-16T19:29:49Z")

</div>

in that case look in to snapshot and restore. which is also very simple to do.  
something like this

[[https://qbox.io/blog/elasticsearch-data-snapshots-restore-tutorial](https://qbox.io/blog/elasticsearch-data-snapshots-restore-tutorial)]  
([https://qbox.io/blog/elasticsearch-data-snapshots-restore-tutorial](https://qbox.io/blog/elasticsearch-data-snapshots-restore-tutorial))

if you don't want that then create simple job which will read from old elastic cluster and write to new one.

Something like this if you need more control. like if you want to only ingest certain data. you can do that in your filter section.

```
input {
elasticsearch {
hosts => ["elkm01:9200"]
index => "old_index"
user => "elastic"
password => "xxxx"
 }
}

filter {}

output {
    elasticsearch {
        hosts => ["newmaster:9200"]
        index => "new_indexname"
       user => elastic
       password => xxxx
    }
  stdout { codec => rubydebug }
}
```

---

<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:** [April 16, 2020, 9:30pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/6 "2020-04-16T21:30:43Z")

</div>

What version is the existing cluster, and what version do you want to go to?

---

<div class="post-metadata">

**Author:** ![deep9300](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@deep9300](https://discuss.elastic.co/u/deep9300)\
**Post date:** [April 17, 2020, 5:54pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/8 "2020-04-17T17:54:08Z")

</div>

Existing cluster: 5.6.16

New cluster: 7.6.1

---

<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:** [April 19, 2020, 4:25am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/9 "2020-04-19T04:25:08Z")

</div>

Then use a remote reindex 🙂

---

<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:** [May 17, 2020, 4:25am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-migrate-single-node-elasticsearch-data-to-a-multinode-elasticsearch-environment/228199/10 "2020-05-17T04:25:09Z")

</div>

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