# Does elastic search store the data and logs permanently?

**URL:** <https://discuss.elastic.co/t/does-elastic-search-store-the-data-and-logs-permanently/55655>\
**Category:** Elasticsearch\
**Created:** [July 15, 2016, 8:29pm UTC](https://discuss.elastic.co/t/does-elastic-search-store-the-data-and-logs-permanently/55655 "2016-07-15T20:29:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubul](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@dubul](https://discuss.elastic.co/u/dubul)\
**Post date:** [July 15, 2016, 8:29pm UTC](https://discuss.elastic.co/t/does-elastic-search-store-the-data-and-logs-permanently/55655/1 "2016-07-15T20:29:43Z")

</div>

I'm very curious to know whether elastic search stores the data and logs permannetly or deletes the old filess.

I'm trying to store the logs and data of few machines permanently, for other servers say for 30 days or upto 20 files.

Is there anyway we can make changes in the config? Can anyone guide me?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 15, 2016, 8:37pm UTC](https://discuss.elastic.co/t/does-elastic-search-store-the-data-and-logs-permanently/55655/2 "2016-07-15T20:37:47Z")

</div>

Elasticsearch does not delete anything by itself. To have different retention policies for different kind of logs, use multiple index series (e.g. logstash-shortterm-YYYY.MM.DD and logstash-longterm-YYYY.MM.DD) and use [Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/4.0/index.html) to cull one of the series after e.g. 30 days.

---

<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 5, 2017, 10:35pm UTC](https://discuss.elastic.co/t/does-elastic-search-store-the-data-and-logs-permanently/55655/3 "2017-07-05T22:35:05Z")

</div>


