# API Key delete by mistake in stack Management

**URL:** <https://discuss.elastic.co/t/api-key-delete-by-mistake-in-stack-management/334304>\
**Category:** Elasticsearch\
**Created:** [May 25, 2023, 10:08am UTC](https://discuss.elastic.co/t/api-key-delete-by-mistake-in-stack-management/334304 "2023-05-25T10:08:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maniacci](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@maniacci](https://discuss.elastic.co/u/maniacci)\
**Post date:** [May 25, 2023, 10:08am UTC](https://discuss.elastic.co/t/api-key-delete-by-mistake-in-stack-management/334304/1 "2023-05-25T10:08:42Z")

</div>

Hi ,  
I have by mistake deleted API keys (while doing some manipulations following a test to add a Linux server on the SIEM).  
I would like to know if it is possible to restore his keys?  
I have Veeam backups .  
I would like to know where his keys are stored and wich agent restore ?  
there is no key history?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 25, 2023, 11:35am UTC](https://discuss.elastic.co/t/api-key-delete-by-mistake-in-stack-management/334304/2 "2023-05-25T11:35:17Z")

</div>

You would need to restore the security index from a recent snapshot, but you can't do that from a Veeam backup. From [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html#other-backup-methods):

> **Taking a snapshot is the only reliable and supported way to back up a cluster.** You cannot back up an Elasticsearch cluster by making copies of the data directories of its nodes. There are no supported methods to restore any data from a filesystem-level backup. If you try to restore a cluster from such a backup, it may fail with reports of corruption or missing files or other data inconsistencies, or it may appear to have succeeded having silently lost some of your data.

---

<div class="post-metadata">

**Author:** ![maniacci](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@maniacci](https://discuss.elastic.co/u/maniacci)\
**Post date:** [May 25, 2023, 12:54pm UTC](https://discuss.elastic.co/t/api-key-delete-by-mistake-in-stack-management/334304/3 "2023-05-25T12:54:27Z")

</div>

thank you for answering me if I don't have snapshots included in my Elasticsearch it won't be possible for me to recover them? is that what you are telling me?

 ![Capture ecran siem](https://us1.discourse-cdn.com/elastic/original/3X/9/a/9a7c7d6365f5b8beb9f5b2a4c32237521bfcd608.png)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [May 25, 2023, 1:04pm UTC](https://discuss.elastic.co/t/api-key-delete-by-mistake-in-stack-management/334304/4 "2023-05-25T13:04:11Z")

</div>

> [@maniacci](#):
>
> thank you for answering me if I don't have snapshots included in my Elasticsearch it won't be possible for me to recover them?

Yes, if you do not have snapshots of your security index you will not able to recover the deleted key.

---

<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:** [June 22, 2023, 1:04pm UTC](https://discuss.elastic.co/t/api-key-delete-by-mistake-in-stack-management/334304/5 "2023-06-22T13:04:37Z")

</div>

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