# Is it possible to write collected data (using logstash in a database) becuase all the collected data is removed after stopping logstash

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-write-collected-data-using-logstash-in-a-database-becuase-all-the-collected-data-is-removed-after-stopping-logstash/186943>\
**Category:** Logstash\
**Created:** [June 22, 2019, 1:25am UTC](https://discuss.elastic.co/t/is-it-possible-to-write-collected-data-using-logstash-in-a-database-becuase-all-the-collected-data-is-removed-after-stopping-logstash/186943 "2019-06-22T01:25:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumar4/32/48326_2.png) [@kumar4](https://discuss.elastic.co/u/kumar4)\
**Post date:** [June 22, 2019, 1:25am UTC](https://discuss.elastic.co/t/is-it-possible-to-write-collected-data-using-logstash-in-a-database-becuase-all-the-collected-data-is-removed-after-stopping-logstash/186943/1 "2019-06-22T01:25:49Z")

</div>

i am using logstash to collect data from syslogs and social network (using "logstash -f" command) but i see that when i shutdown logstash all the data is deleted, how i can persist data so that i can it can be retrieved even if the connection is lost or logstash is stoped  
i was using this tutorial ([https://github.com/elastic/examples/tree/master/Common%20Data%20Formats/twitter](https://github.com/elastic/examples/tree/master/Common%20Data%20Formats/twitter)) but when i stop logstash all the collected data disapear the only thing that remain is tthe index name

---

<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:** [July 20, 2019, 1:25am UTC](https://discuss.elastic.co/t/is-it-possible-to-write-collected-data-using-logstash-in-a-database-becuase-all-the-collected-data-is-removed-after-stopping-logstash/186943/2 "2019-07-20T01:25:52Z")

</div>

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