# Elasticsearch snapshot settings on statefulset (stack)

**URL:** <https://discuss.elastic.co/t/elasticsearch-snapshot-settings-on-statefulset-stack/283377>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [September 5, 2021, 4:34pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-settings-on-statefulset-stack/283377 "2021-09-05T16:34:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asaf\_Moalem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asaf_moalem/32/80330_2.png) [@Asaf\_Moalem](https://discuss.elastic.co/u/Asaf_Moalem)\
**Post date:** [September 5, 2021, 4:34pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-settings-on-statefulset-stack/283377/1 "2021-09-05T16:34:01Z")

</div>

After setting up the stack, unable to activate the path.repo for snapshotting  
the setup is based on the elasticsearch statefulset setup

> **[Snapshot and restore | Elasticsearch Guide \[7.14\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html)**

cant find where to insert:  
path.repo: ["/mnt/backup"]

error i'm getting:  
curl -XPUT "[http://localhost:9200/\_snapshot/backup\_repo](http://localhost:9200/_snapshot/backup_repo)" -H 'Content-Type: application/json' -d'{ "type": "fs", "settings": { "location": "/mnt/backup", "compress": true }}'  
{"error":{"root\_cause":[{"type":"repository\_exception","reason":"[backup\_repo] location [/mnt/backup] doesn't match any of the locations specified by path.repo because this setting is empty"}],"type":"repository\_exception","reason":"[backup\_repo] failed to create repository","caused\_by":{"type":"repository\_exception","reason":"[backup\_repo] location [/mnt/backup] doesn't match any of the locations specified by path.repo because this setting is empty"}},"status":500}%

---

<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:** [September 5, 2021, 5:25pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-settings-on-statefulset-stack/283377/2 "2021-09-05T17:25:09Z")

</div>

Here is the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-filesystem-repository) on how to register a filesystem (`fs`) repository.

You will need to set the `path.repo` in the `elasticsearch.yml` of every master and data node in your cluster, then you will need to mount the same shared area in every master and data node in your cluster.

You also need to do a restart of every node to enable a `fs` repository.

---

<div class="post-metadata">

**Author:** ![Asaf\_Moalem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asaf_moalem/32/80330_2.png) [@Asaf\_Moalem](https://discuss.elastic.co/u/Asaf_Moalem)\
**Post date:** [September 8, 2021, 8:59pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-settings-on-statefulset-stack/283377/3 "2021-09-08T20:59:45Z")

</div>

the Elasticsearch is installed by Helm, using statefulset config,  
for this installation theres no elasticsearch yaml file,

cant find where the to apply the values fro snapshot  
following this document,

> **[elasticsearch 7.14.0 · elastic/elastic](https://artifacthub.io/packages/helm/elastic/elasticsearch)**
>
> Official Elastic helm chart for Elasticsearch

though it has a section of snapshot - not clear how to do this.

---

<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:** [October 6, 2021, 9:00pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-settings-on-statefulset-stack/283377/4 "2021-10-06T21:00:17Z")

</div>

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