# Syncing Mongodb with Elasticsearch

**URL:** <https://discuss.elastic.co/t/syncing-mongodb-with-elasticsearch/243328>\
**Category:** Elasticsearch\
**Created:** [July 31, 2020, 9:16am UTC](https://discuss.elastic.co/t/syncing-mongodb-with-elasticsearch/243328 "2020-07-31T09:16:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandeepsingh](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@sandeepsingh](https://discuss.elastic.co/u/sandeepsingh)\
**Post date:** [July 31, 2020, 9:16am UTC](https://discuss.elastic.co/t/syncing-mongodb-with-elasticsearch/243328/1 "2020-07-31T09:16:03Z")

</div>

Hi, I wish to transfer data from Elasticsearch into a Mongodb instance. The data in Elasticsearch is nearly 120 GBs and is continuoly updating with nearly 4GB per day. How do I do it?  
What I have tried:

- Logstash is very slow and also the problem is that on stopping logstash it restarts from the beginning again ([https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/93](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/93))
- Scroll Api is good for migrating large data, but what about real time data? The documentation doesn't recommend using it for real time data.
- Pagination is very slow, and it might work but in lot of discussions it is not recommended for documents in the size of millions. I have tried in less number of documents and it works fine but how do I make sure it will work on a scale too?

Any suggestions are welcome.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 3, 2020, 9:44am UTC](https://discuss.elastic.co/t/syncing-mongodb-with-elasticsearch/243328/2 "2020-08-03T09:44:38Z")

</div>

Hey,

googling around shows quite a few solutions. I don't know if there is _the one_ and best solution, but I have heard some good things of monstache - see [https://rwynn.github.io/monstache-site/](https://rwynn.github.io/monstache-site/) . Never used it myself though!

--Alex

---

<div class="post-metadata">

**Author:** ![sandeepsingh](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@sandeepsingh](https://discuss.elastic.co/u/sandeepsingh)\
**Post date:** [August 3, 2020, 2:15pm UTC](https://discuss.elastic.co/t/syncing-mongodb-with-elasticsearch/243328/3 "2020-08-03T14:15:06Z")

</div>

Hi Alex,  
Thanks for your answer but I think you misunderstood the question. I wish to get data from Elastisearch into MongoDB, not the other way around. Monstache does the opposite of my requirement.

---

<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:** [August 31, 2020, 2:15pm UTC](https://discuss.elastic.co/t/syncing-mongodb-with-elasticsearch/243328/4 "2020-08-31T14:15:11Z")

</div>

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