# How can I restore an index pattern and dashboards?

**URL:** <https://discuss.elastic.co/t/how-can-i-restore-an-index-pattern-and-dashboards/261709>\
**Category:** Kibana\
**Created:** [January 20, 2021, 10:36pm UTC](https://discuss.elastic.co/t/how-can-i-restore-an-index-pattern-and-dashboards/261709 "2021-01-20T22:36:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)\
**Post date:** [January 20, 2021, 10:36pm UTC](https://discuss.elastic.co/t/how-can-i-restore-an-index-pattern-and-dashboards/261709/1 "2021-01-20T22:36:07Z")

</div>

Hi all,

I made a mistake and deleted an index pattern that broke 3 dashboards I have. I don't know exactly how to reconstruct the visualizations inside the dashboard, as it was not named correctly, and when I click in the gear button in the right upper corner, it doesn't let me see which fields were used, neither the name of the visualization.  
Is there a way to restore only index pattern and dashboard objects? I can't restore the indices because I would lose the newest events that got sent to Elasticsearch.

Thanks for any help

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [January 20, 2021, 11:58pm UTC](https://discuss.elastic.co/t/how-can-i-restore-an-index-pattern-and-dashboards/261709/2 "2021-01-20T23:58:10Z")

</div>

Assuming that you don't have a backup, you can recreate index patterns based on the index mappings- what you will need to do is:

1. Find the index pattern IDs that you need, by looking at the visualizations that are broken in the [dashboard export](https://www.elastic.co/guide/en/kibana/current/dashboard-api.html). They will reference specific index patterns.

2. When creating your new index pattern, there is an option to set a custom ID for the index pattern. For each one you can provide the known ID.

---

<div class="post-metadata">

**Author:** ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)\
**Post date:** [January 21, 2021, 2:33am UTC](https://discuss.elastic.co/t/how-can-i-restore-an-index-pattern-and-dashboards/261709/3 "2021-01-21T02:33:14Z")

</div>

Amazing @wylie, worked flawlessly. Thank you so much

---

<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:** [February 18, 2021, 2:33am UTC](https://discuss.elastic.co/t/how-can-i-restore-an-index-pattern-and-dashboards/261709/4 "2021-02-18T02:33:20Z")

</div>

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