# Reindex api to move all data from one cluster to another

**URL:** <https://discuss.elastic.co/t/reindex-api-to-move-all-data-from-one-cluster-to-another/263721>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [February 9, 2021, 11:28am UTC](https://discuss.elastic.co/t/reindex-api-to-move-all-data-from-one-cluster-to-another/263721 "2021-02-09T11:28:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijit](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@abhijit](https://discuss.elastic.co/u/abhijit)\
**Post date:** [February 9, 2021, 11:28am UTC](https://discuss.elastic.co/t/reindex-api-to-move-all-data-from-one-cluster-to-another/263721/1 "2021-02-09T11:28:26Z")

</div>

I have a use-case where I want to move all my elastic data (index/shards/documents etc) from one cluster to another remote cluster. I am trying to use the \_reindex api for the same but it requires source and destination index names. As this is my production cluster, it is not possible for me to specify each index name and I want to move all the data at one go.

For this I am following the below link, which is giving output as mentioned.  
URL - [Reindex API | Elasticsearch Reference [7.10] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#reindex-from-remote)

Can someone please suggest if I am missing anything? How would this work?

Execution:

[abc@target-elastic-server ~]$ curl -X POST "target-elastic-server:9200/\_reindex?pretty" -H 'Content-Type: application/json' -d'  
{  
"source": {  
"remote": {  
"host": "[http://source-elastic-server:9200](http://source-elastic-server:9200)"  
},  
"index": "_",  
"size": 10,  
"query": {  
"match": {  
"test": "data"  
}  
}  
},  
"dest": {  
"index": "_"  
}  
}  
'

Output:

{  
"took" : 637,  
"timed\_out" : false,  
"total" : 0,  
"updated" : 0,  
"created" : 0,  
"deleted" : 0,  
"batches" : 0,  
"version\_conflicts" : 0,  
"noops" : 0,  
"retries" : {  
"bulk" : 0,  
"search" : 0  
},  
"throttled\_millis" : 0,  
"requests\_per\_second" : -1.0,  
"throttled\_until\_millis" : 0,  
"failures" :

---

<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:** [March 9, 2021, 11:29am UTC](https://discuss.elastic.co/t/reindex-api-to-move-all-data-from-one-cluster-to-another/263721/2 "2021-03-09T11:29:03Z")

</div>

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