# ElasticSearch - MongoDB sync

**URL:** <https://discuss.elastic.co/t/elasticsearch-mongodb-sync/113663>\
**Category:** Elasticsearch\
**Created:** [December 31, 2017, 4:25pm UTC](https://discuss.elastic.co/t/elasticsearch-mongodb-sync/113663 "2017-12-31T16:25:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koustav\_Chatterjee](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Koustav\_Chatterjee](https://discuss.elastic.co/u/Koustav_Chatterjee)\
**Post date:** [December 31, 2017, 4:25pm UTC](https://discuss.elastic.co/t/elasticsearch-mongodb-sync/113663/1 "2017-12-31T16:25:14Z")

</div>

I have a elasticSearch server and mongodb Server.Data is feed into mongodb which needs to in turn pushed into ElasticSearch.I am looking for realtime updates into the ES server.  
I evaluated logstash using [logstash-input-mongodb](https://github.com/phutchins/logstash-input-mongodb).But it works for only inserts into db, any updates on existing records are not detected/reflected in ES.  
I also tried [mongo-connector](https://github.com/mongodb-labs/mongo-connector), but getting exception  
Last entry no longer in oplog cannot recover!. I tried various solutions using [Resyncing Connector](https://github.com/mongodb-labs/mongo-connector/wiki/Resyncing%20the%20Connector).It didn't worked.

Not sure which way to go.

Is there any other ways i can do the sync ?

---

<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:** [December 31, 2017, 5:39pm UTC](https://discuss.elastic.co/t/elasticsearch-mongodb-sync/113663/2 "2017-12-31T17:39:47Z")

</div>

I don't know for mongo specifically but if you have access to the application layer which is writing in Mongo, just send the same documents in elasticsearch at the same time you insert in mongo.

---

<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:** [January 28, 2018, 5:39pm UTC](https://discuss.elastic.co/t/elasticsearch-mongodb-sync/113663/3 "2018-01-28T17:39:48Z")

</div>

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