# Snapshot - Register repository for Snapshot

**URL:** <https://discuss.elastic.co/t/snapshot-register-repository-for-snapshot/299388>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [March 11, 2022, 2:08am UTC](https://discuss.elastic.co/t/snapshot-register-repository-for-snapshot/299388 "2022-03-11T02:08:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prabakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prabakar/32/81795_2.png) [@Prabakar](https://discuss.elastic.co/u/Prabakar)\
**Post date:** [March 11, 2022, 2:08am UTC](https://discuss.elastic.co/t/snapshot-register-repository-for-snapshot/299388/1 "2022-03-11T02:08:44Z")

</div>

Hello Team,

We are using Elastic on Kubernetes (ECK) with elastic Enterprise license. We have created on- premise elastic clusters. We are trying to create repository to take snapshots, but we are getting below error while firing below API.

PUT /\_snapshot/nfs-server  
{  
"type": "fs",  
"settings": {  
"location": "/ **path** /",  
"compress": true  
}  
}

{  
"error" : {  
"root\_cause" : [  
{  
"type" : "repository\_exception",  
"reason" : "[nfs-server] location [/osl\_nonprod\_car7598\_nodr\_pr/] doesn't match any of the locations specified by path.repo because this setting is empty"  
}  
],  
"type" : "repository\_exception",  
"reason" : "[nfs-server] failed to create repository",  
"caused\_by" : {  
"type" : "repository\_exception",  
"reason" : "[nfs-server] location [/ **path** /] doesn't match any of the locations specified by path.repo because this setting is empty"  
}  
},  
"status" : 500  
}

It says we need to add path.repo property on yml files of each node. But we are using ECK and we use YAML files for the deployments. Still do I need to add path.repo on all the nodes? Please share your thoughts.

---

<div class="post-metadata">

**Author:** ![casterQ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casterq/32/93257_2.png) [@casterQ](https://discuss.elastic.co/u/casterQ)\
**Post date:** [March 11, 2022, 2:46am UTC](https://discuss.elastic.co/t/snapshot-register-repository-for-snapshot/299388/2 "2022-03-11T02:46:53Z")

</div>

when you use nfs as your snapshot repository，you need to ：

1. mount the file system to the same location on all master and data nodes.
2. Then add the file system’s path or parent directory to the `path.repo` setting in `elasticsearch.yml` for each master and data node

---

<div class="post-metadata">

**Author:** ![Prabakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prabakar/32/81795_2.png) [@Prabakar](https://discuss.elastic.co/u/Prabakar)\
**Post date:** [March 11, 2022, 4:27pm UTC](https://discuss.elastic.co/t/snapshot-register-repository-for-snapshot/299388/3 "2022-03-11T16:27:41Z")

</div>

1. Do I need to add **path.repo** setting in **Elasticsearch.yml** for ECK (Elastic on Kubernetes ) environment as well? We have not done that for ECK on GCP (Google eCloud) environment.

2. We are using coordinating nodes as well. Do we need to add path.repo on coordinating yml files as well?

---

<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:** [March 11, 2022, 5:00pm UTC](https://discuss.elastic.co/t/snapshot-register-repository-for-snapshot/299388/4 "2022-03-11T17:00:51Z")

</div>

You need to add `path.repo` in the `elasticsearch.yml` file for all `data` and `master` nodes, and all of those nodes need to have the same path mounted.

I'm not sure how you will do that with ECK, but every data and master node needs to have this config.

The [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-filesystem-repository.html#snapshots-filesystem-repository) does not say anything about the need to have `path.repo` on coordinating nodes, if they are not data and master nodes as well, you can leave this config out for coordinating nodes.

---

<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:** [April 8, 2022, 5:01pm UTC](https://discuss.elastic.co/t/snapshot-register-repository-for-snapshot/299388/5 "2022-04-08T17:01:43Z")

</div>

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