# What's the best way to backup ILM policies & index templates

**URL:** https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231
**Category:** Elasticsearch
**Created:** [October 7, 2020, 8:20am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231 "2020-10-07T08:20:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Chr0my](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@Chr0my](https://discuss.elastic.co/u/Chr0my)
#### Post date: [October 7, 2020, 8:20am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231/1 "2020-10-07T08:20:18Z")

</div>

Hi everyone,

I'm currently looking for a way to backup ILM policies and index templates automatically, but I cannot find where these informations are stored, and I don't want to snapshot my entire cluster.  
Is it stored in a dedicated index ?  
If it's the case, I will be able to use the snapshot functionality, if not, I still can develop something to talk with the API directly and get the json...

Do you have any advice ?

Thanks !

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [October 7, 2020, 8:33am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231/2 "2020-10-07T08:33:22Z")

</div>

Hi,

We use the ElasticSearch API to backup [ILM policies](https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-get-lifecycle.html) and [index templates](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html).

This API also allows restoring the data using a PUT request...

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![Chr0my](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@Chr0my](https://discuss.elastic.co/u/Chr0my)
#### Post date: [October 12, 2020, 1:03pm UTC](https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231/3 "2020-10-12T13:03:04Z")

</div>

Hi, thanks for your answer. Yes basically that's what I had in mind and it works well.  
But still don't find where these data can be located precisely 🤔

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [October 15, 2020, 6:01am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231/4 "2020-10-15T06:01:40Z")

</div>

> [@Chr0my](#):
>
> But still don't find where these data can be located precisely

What do you want to know? Do you mean where Elasticsearch stores it internally?

---

<div class="post-metadata">

### Author: ![Chr0my](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@Chr0my](https://discuss.elastic.co/u/Chr0my)
#### Post date: [October 15, 2020, 7:26am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231/5 "2020-10-15T07:26:51Z")

</div>

That's it

---

<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: [November 12, 2020, 7:26am UTC](https://discuss.elastic.co/t/whats-the-best-way-to-backup-ilm-policies-index-templates/251231/6 "2020-11-12T07:26:56Z")

</div>

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