# Template directory to store configurations?

**URL:** <https://discuss.elastic.co/t/template-directory-to-store-configurations/4632>\
**Category:** Elasticsearch\
**Created:** [June 15, 2011, 7:19pm UTC](https://discuss.elastic.co/t/template-directory-to-store-configurations/4632 "2011-06-15T19:19:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phobos182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phobos182/32/3011_2.png) [@phobos182](https://discuss.elastic.co/u/phobos182)\
**Post date:** [June 15, 2011, 7:19pm UTC](https://discuss.elastic.co/t/template-directory-to-store-configurations/4632/1 "2011-06-15T19:19:18Z")

</div>

I know that I can XPUT a template into an ElasticSearch cluster and it will persist. I'm wondering if there is a directory on each node that I can put a template file for persistence, kinda like mappings. Reason being is that in testing my ES cluster I am removing the entire contents of the data directory before doing additional tests. This requires me to XPUT the templates back (All 5 of them).

I like the convention that mappings use ([http://www.elasticsearch.org/guide/reference/mapping/conf-mappings.html](http://www.elasticsearch.org/guide/reference/mapping/conf-mappings.html). The ability to have a 'mappings' directory under 'config'. I'm wondering if Index Templates follow the same convention.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 15, 2011, 7:28pm UTC](https://discuss.elastic.co/t/template-directory-to-store-configurations/4632/2 "2011-06-15T19:28:38Z")

</div>

No, there isn't an option for that. It gets a bit trickier, as they are stored as part of the metadata of the cluster.

On Wednesday, June 15, 2011 at 10:19 PM, phobos182 wrote:

> I know that I can XPUT a template into an Elasticsearch cluster and it will  
> persist. I'm wondering if there is a directory on each node that I can put a  
> template file for persistence, kinda like mappings. Reason being is that in  
> testing my ES cluster I am removing the entire contents of the data  
> directory before doing additional tests. This requires me to XPUT the  
> templates back (All 5 of them).
> 
> I like the convention that mappings use  
> ([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/conf-mappings.html).  
> The ability to have a 'mappings' directory under 'config'. I'm wondering if  
> Index Templates follow the same convention.
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Template-directory-to-store-configurations-tp3069014p3069014.html](http://elasticsearch-users.115913.n3.nabble.com/Template-directory-to-store-configurations-tp3069014p3069014.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com) ([http://Nabble.com](http://Nabble.com)).

---

<div class="post-metadata">

**Author:** ![phobos182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phobos182/32/3011_2.png) [@phobos182](https://discuss.elastic.co/u/phobos182)\
**Post date:** [June 15, 2011, 7:53pm UTC](https://discuss.elastic.co/t/template-directory-to-store-configurations/4632/3 "2011-06-15T19:53:30Z")

</div>

Gotcha. I'll just make it part of my test plan to XPUT back the templates.

Thanks!

---

<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 6, 2017, 4:03am UTC](https://discuss.elastic.co/t/template-directory-to-store-configurations/4632/4 "2017-07-06T04:03:25Z")

</div>


