# Migrating Elasticsearch indices to new cluster

**URL:** <https://discuss.elastic.co/t/migrating-elasticsearch-indices-to-new-cluster/87910>\
**Category:** Elasticsearch\
**Created:** [June 1, 2017, 12:57pm UTC](https://discuss.elastic.co/t/migrating-elasticsearch-indices-to-new-cluster/87910 "2017-06-01T12:57:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rupesh\_Ranjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rupesh_ranjan/32/22283_2.png) [@Rupesh\_Ranjan](https://discuss.elastic.co/u/Rupesh_Ranjan)\
**Post date:** [June 1, 2017, 12:57pm UTC](https://discuss.elastic.co/t/migrating-elasticsearch-indices-to-new-cluster/87910/1 "2017-06-01T12:57:28Z")

</div>

I have a ES cluster (3 data nodes + 1 coordinate-only node) currently running, having a number of indices.  
I am planning to migrate to another cluster. Is there a way I can migrate all my current indices to new cluster?

If i just copy my data directory to new cluster, will that be sufficient?

---

<div class="post-metadata">

**Author:** ![Mike.Barretta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike.barretta/32/16688_2.png) [@Mike.Barretta](https://discuss.elastic.co/u/Mike.Barretta)\
**Post date:** [June 1, 2017, 1:39pm UTC](https://discuss.elastic.co/t/migrating-elasticsearch-indices-to-new-cluster/87910/2 "2017-06-01T13:39:27Z")

</div>

You have a couple of options:

1. [Reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/docs-reindex.html#reindex-from-remote) - can pull data from the old cluster onto the new. Comes at the cost of network bandwidth, but not a problem for everyone
2. [Snapshot / Restore](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html) - snapshot the old indices and restore them on the new

Is the new cluster running the same version of Elasticsearch as the current?

---

<div class="post-metadata">

**Author:** ![Rupesh\_Ranjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rupesh_ranjan/32/22283_2.png) [@Rupesh\_Ranjan](https://discuss.elastic.co/u/Rupesh_Ranjan)\
**Post date:** [June 2, 2017, 6:06am UTC](https://discuss.elastic.co/t/migrating-elasticsearch-indices-to-new-cluster/87910/3 "2017-06-02T06:06:59Z")

</div>

Yes, its Elasticsearch-5.0.1.

One more thing, if I go for re-indexing, the host name that we mention, should it be coordinate-only node?  
And, query is not mandatory, right? I mean I can just mention index name, example config below mentioned.

```
POST _reindex
{
  "source": {
    "remote": {
      "host": "http://coordinateNode:9200"
    },
    "index": "source",
  },
  "dest": {
    "index": "dest"
  }
}
```

---

<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 2, 2017, 9:27am UTC](https://discuss.elastic.co/t/migrating-elasticsearch-indices-to-new-cluster/87910/4 "2017-06-02T09:27:52Z")

</div>

> [@Rupesh\_Ranjan](#):
>
> One more thing, if I go for re-indexing, the host name that we mention, should it be coordinate-only node?

It doesn't really matter.

> [@Rupesh\_Ranjan](#):
>
> And, query is not mandatory, right? I mean I can just mention index name, example config below mentioned.

Yep!

---

<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:** [June 30, 2017, 9:27am UTC](https://discuss.elastic.co/t/migrating-elasticsearch-indices-to-new-cluster/87910/5 "2017-06-30T09:27:55Z")

</div>

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