# Creating new index with an already existing index pattern

**URL:** <https://discuss.elastic.co/t/creating-new-index-with-an-already-existing-index-pattern/236560>\
**Category:** Beats\
**Created:** [June 10, 2020, 5:50pm UTC](https://discuss.elastic.co/t/creating-new-index-with-an-already-existing-index-pattern/236560 "2020-06-10T17:50:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yashwant\_Shettigar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashwant_shettigar/32/47652_2.png) [@Yashwant\_Shettigar](https://discuss.elastic.co/u/Yashwant_Shettigar)\
**Post date:** [June 10, 2020, 5:50pm UTC](https://discuss.elastic.co/t/creating-new-index-with-an-already-existing-index-pattern/236560/1 "2020-06-10T17:50:26Z")

</div>

Hello,

Actually, I have by mistakenly deleted an index "filebeat-2020-06-05". My index gets generated on daily basis.

Now, I am trying create an index manually with older date, and trying to restore older data, but that is not working. Old data gets mapped to the latest index i.e. filebeat-2020-06-10' (or current day)

Thank You

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [June 10, 2020, 8:23pm UTC](https://discuss.elastic.co/t/creating-new-index-with-an-already-existing-index-pattern/236560/2 "2020-06-10T20:23:06Z")

</div>

You may want to override the `output.elasticsearch.index` setting and use the timestamp field from your event to set the date suffix in the index name. See [https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html#index-option-es](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html#index-option-es). That way, events from the past will go into an index with the event date as the suffix.

Shaunak

---

<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 8, 2020, 10:23pm UTC](https://discuss.elastic.co/t/creating-new-index-with-an-already-existing-index-pattern/236560/3 "2020-07-08T22:23:20Z")

</div>

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