# Restarting logstash from where it last shutdown

**URL:** <https://discuss.elastic.co/t/restarting-logstash-from-where-it-last-shutdown/241915>\
**Category:** Logstash\
**Created:** [July 20, 2020, 4:15pm UTC](https://discuss.elastic.co/t/restarting-logstash-from-where-it-last-shutdown/241915 "2020-07-20T16:15:52Z")\
**Posts on this page:** 3\
**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 20, 2020, 4:15pm UTC](https://discuss.elastic.co/t/restarting-logstash-from-where-it-last-shutdown/241915/1 "2020-07-20T16:15:52Z")

</div>

I am using Logstash to transfer data from Elasticsearch to MongoDB. Now whenever there is an error or a Shutdown of Logstash instance, upon restarting Logstash, it starts reading the indexes in Elasticsearch from the beginning, causing duplicity of data and a significant amount of time to get the latest data to the mongodb. Is there a way to tackle this in Logstash, or some custom solution is the way forward this problem?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 20, 2020, 5:26pm UTC](https://discuss.elastic.co/t/restarting-logstash-from-where-it-last-shutdown/241915/2 "2020-07-20T17:26:43Z")

</div>

This is a [known issue](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/93). I am not aware of a workaround.

---

<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 17, 2020, 5:26pm UTC](https://discuss.elastic.co/t/restarting-logstash-from-where-it-last-shutdown/241915/3 "2020-08-17T17:26:44Z")

</div>

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