# Snapshot repo.path deson't match. It recongized by settings api

**URL:** <https://discuss.elastic.co/t/snapshot-repo-path-desont-match-it-recongized-by-settings-api/226299>\
**Category:** Elasticsearch\
**Created:** [April 3, 2020, 1:01am UTC](https://discuss.elastic.co/t/snapshot-repo-path-desont-match-it-recongized-by-settings-api/226299 "2020-04-03T01:01:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![naoko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/naoko/32/11822_2.png) [@naoko](https://discuss.elastic.co/u/naoko)\
**Post date:** [April 3, 2020, 1:01am UTC](https://discuss.elastic.co/t/snapshot-repo-path-desont-match-it-recongized-by-settings-api/226299/1 "2020-04-03T01:01:05Z")

</div>

I tried to create snapshot rep but failing with

```auto
location [/data/elasticsearch_backups] doesn't match any of the locations specified by path.repo

```

config is there:

```auto
cat /etc/elasticsearch/elasticsearch.yml | grep repo
        path.repo: /data/elasticsearch_backups

```

Also, this config is recongized via node settings api:

```auto
    curl -s http://192.168.51.80:9200/_nodes/settings?pretty | grep 'repo\|host"'
          "host" : "192.168.51.80",
              "host" : "192.168.51.80"
              "repo" : "/data/elasticsearch_backups"

```

and the mounted share directory have read/write for elasticsearch

```auto
    ls -al /data/ | grep elastic
    drwxr-xr-x 8 elasticsearch elasticsearch 114 May 14 2019 elasticsearch_backups

```

but this is what I get... and I'm out of idea... any advice would be appriciated!

```auto
    http://192.168.51.80:9200/_snapshot/_all?pretty

    curl -XPUT -H "Content-Type: application/json" 'http://192.168.51.81:9200/_snapshot/es6_dev' -d '{
      "type": "fs",
      "settings": {
         "location": "/data/elasticsearch_backups",
         "compress": true
      }
    }'

    {"error":{"root_cause":[{"type":"repository_exception","reason":"[es6_dev] location [/data/elasticsearch_backups] doesn't match any of the locations specified by path.repo"}],"type":"repository_exception","reason":"[es6_dev] failed to create repository","caused_by":{"type":"repository_exception","reason":"[es6_dev] location [/data/elasticsearch_backups] doesn't match any of the locations specified by path.repo"}},"status":500}

```

---

<div class="post-metadata">

**Author:** ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)\
**Post date:** [April 3, 2020, 1:43am UTC](https://discuss.elastic.co/t/snapshot-repo-path-desont-match-it-recongized-by-settings-api/226299/2 "2020-04-03T01:43:04Z")

</div>

Hi @naoko

1. How many nodes are running in the cluster? Which version of ES are you running?

2. Could you set `path.repo` in all your ES nodes as followed:

```auto
path.repo: ["/data/elasticsearch_backups"]

```

and restart all the nodes. Does that solve the problem?

Thank you.

---

<div class="post-metadata">

**Author:** ![naoko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/naoko/32/11822_2.png) [@naoko](https://discuss.elastic.co/u/naoko)\
**Post date:** [April 6, 2020, 8:27pm UTC](https://discuss.elastic.co/t/snapshot-repo-path-desont-match-it-recongized-by-settings-api/226299/3 "2020-04-06T20:27:31Z")

</div>

I am not allowed to restart nodes on this cluster but there are 10 nodes on the cluster. on my local, path.repo value being string worked (instead of list of string) so I'm not sure that's the issue. ES version is 6.8.  
One thing though... although all 10 clusters share single mounted volume, the mounted name is different. Would that cause the issue?

---

<div class="post-metadata">

**Author:** ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)\
**Post date:** [April 7, 2020, 4:04am UTC](https://discuss.elastic.co/t/snapshot-repo-path-desont-match-it-recongized-by-settings-api/226299/4 "2020-04-07T04:04:58Z")

</div>

@naoko From our [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-filesystem-repository): " The shared file system repository ( `"type": "fs"` ) uses the shared file system to store snapshots. **In order to register the shared file system repository it is necessary to mount the same shared filesystem to the same location on all master and data nodes. This location (or one of its parent directories) must be registered in the `path.repo` setting on all master and data nodes.**

If could set the same value in all the required nodes and restart these nodes (any changes in `elasticsearch.yml` require a restart), then let's see if that solves the problem.

Thank you.

---

<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:** [May 5, 2020, 4:04am UTC](https://discuss.elastic.co/t/snapshot-repo-path-desont-match-it-recongized-by-settings-api/226299/5 "2020-05-05T04:04:59Z")

</div>

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