# Cluster \[271f47\] Reindex across clusters?

**URL:** https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474
**Category:** Elasticsearch
**Created:** [August 19, 2016, 3:28pm UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474 "2016-08-19T15:28:57Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Steve\_Suh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_suh/32/10638_2.png) [@Steve\_Suh](https://discuss.elastic.co/u/Steve_Suh)
#### Post date: [August 19, 2016, 3:28pm UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474/1 "2016-08-19T15:28:57Z")

</div>

Is it possible to reindex across clusters? In this case, I'm trying to migrate from ElasticCloud on Heroku to a different cluster on ElasticCloud on AWS.

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [August 19, 2016, 3:56pm UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474/2 "2016-08-19T15:56:47Z")

</div>

5.0 will have reindex-from-remote. I don't know how to make the clusters accessible to each other:

> <https://github.com/elastic/elasticsearch/pull/18585>

I imagine you could handle the reindex using logstash or the any of the clients that automate it (perl does).

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [August 19, 2016, 4:07pm UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474/3 "2016-08-19T16:07:41Z")

</div>

You are probably better of doing a snapshot to an S3 bucket from ElasticCloud Heroku and restoring in ElasticCloud AWS.

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [August 19, 2016, 4:07pm UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474/4 "2016-08-19T16:07:58Z")

</div>

That'd be faster than reindexing.

---

<div class="post-metadata">

### Author: ![Josh\_Harrison](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@Josh\_Harrison](https://discuss.elastic.co/u/Josh_Harrison)
#### Post date: [August 20, 2016, 3:39am UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474/5 "2016-08-20T03:39:03Z")

</div>

The snapshot restore should definitely be faster - but if you're set on reindexing you can rig that up pretty easily in the python client. See [https://elasticsearch-py.readthedocs.io/en/master/helpers.html#reindex](https://elasticsearch-py.readthedocs.io/en/master/helpers.html#reindex)  
`from elasticsearch import Elasticsearch from elasticsearch.helpers import reindex es_source=Elasticsearch("source_system:9200") es_destination=Elasticsearch("destination_system:9200") reindex(es_source, "my_source_index", "my_destination_index", target_client=es_destination)`

That's what I've done as I'm still stuck on 1.7.x - though the 2.3 reindex API looks handy.  
Nik, when doing a local cluster-\>local cluster reindexing, is the reindex API in 2.3 faster/more efficient than the python client's approach, if the python client is run directly on the host cluster?

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [August 20, 2016, 4:12am UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474/6 "2016-08-20T04:12:31Z")

</div>

Marginally but not enough so that I'd bend over backwards to use it. It  
might get faster at some point with the parallel scrolls added in 5.0 when  
I get around to implementing it in 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: [July 5, 2017, 10:26pm UTC](https://discuss.elastic.co/t/cluster-271f47-reindex-across-clusters/58474/7 "2017-07-05T22:26:31Z")

</div>


