# Elasticsearch data migration

**URL:** <https://discuss.elastic.co/t/elasticsearch-data-migration/235268>\
**Category:** Elasticsearch\
**Created:** [June 2, 2020, 4:26am UTC](https://discuss.elastic.co/t/elasticsearch-data-migration/235268 "2020-06-02T04:26:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)\
**Post date:** [June 2, 2020, 4:26am UTC](https://discuss.elastic.co/t/elasticsearch-data-migration/235268/1 "2020-06-02T04:26:17Z")

</div>

Hi

I need to migrate data from Elasticsearch on premises to Elasticsearch Cloud  
Is there any documentation I can refer??

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 2, 2020, 1:14pm UTC](https://discuss.elastic.co/t/elasticsearch-data-migration/235268/2 "2020-06-02T13:14:11Z")

</div>

I know that we are thinking of providing such a guide. I don't think it's available yet though.

I can think of multiple solutions:

- Reindex from the source the same way you indexed in your local cluster
- Create a job which use the Scroll API against the local cluster, get the `_source` and send it as part of a bulk request to the cloud cluster.
- Use Snapshot feature to store the data within AWS, Azure or GCP. And then use Restore to restore from the cloud cluster. See [https://www.elastic.co/guide/en/cloud/current/ec-custom-repository.html](https://www.elastic.co/guide/en/cloud/current/ec-custom-repository.html)

I hope this can help.

---

<div class="post-metadata">

**Author:** ![abrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abrx/32/43881_2.png) [@abrx](https://discuss.elastic.co/u/abrx)\
**Post date:** [June 2, 2020, 1:20pm UTC](https://discuss.elastic.co/t/elasticsearch-data-migration/235268/3 "2020-06-02T13:20:44Z")

</div>

Maybe also some logstash with [elasticsearch input](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-elasticsearch.html) and [elasticseach output](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html) that bind your 2 clusters ?  
We do that sometime for testing purpose.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 2, 2020, 1:22pm UTC](https://discuss.elastic.co/t/elasticsearch-data-migration/235268/4 "2020-06-02T13:22:34Z")

</div>

Yeah! Very good idea indeed. It's better than my solution 2 as you won't have to write the code yourself 🙂

---

<div class="post-metadata">

**Author:** ![abrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abrx/32/43881_2.png) [@abrx](https://discuss.elastic.co/u/abrx)\
**Post date:** [June 2, 2020, 1:37pm UTC](https://discuss.elastic.co/t/elasticsearch-data-migration/235268/5 "2020-06-02T13:37:47Z")

</div>

Yes, but maybe compare size & doc number of both indices at the end, so you'll be sure that there's no data loss

---

<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, 2020, 1:37pm UTC](https://discuss.elastic.co/t/elasticsearch-data-migration/235268/6 "2020-06-30T13:37:51Z")

</div>

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