# Error when Registering new Snapshot Repository

**URL:** <https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828>\
**Category:** Elasticsearch\
**Created:** [March 31, 2020, 9:24am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828 "2020-03-31T09:24:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpb14pk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cpb14pk/32/49853_2.png) [@cpb14pk](https://discuss.elastic.co/u/cpb14pk)\
**Post date:** [March 31, 2020, 9:24am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828/1 "2020-03-31T09:24:42Z")

</div>

Hi, I am trying to snapshot an elasticsearch repository.

I have three different nodes across three different servers, e.g. 10.212.145.10, 10.212.145.20, 10.212.145.30.

I have added the path.repo field in my elasticsearch.yml file (etc/elasticsearch/elasticsearch.yml) on 10.212.145.10 as such:

`path.repo: ["/mnt/elasticsearch_repository/backup"]`

Note, I have also tried without the square brackets to no avail.

I then do an `service elasticsearch restart` which works fine.

Then, when I run the following curl command to registry the repository:

```auto
curl -XPUT -H "Content-Type: application/json" 'http://10.212.145.10:9200/_snapshot/backup' -d '{
    "type": "fs",
    "settings": {
        "location": "/mnt/elasticsearch_repository/backup",
        "compress": true
    }
}'

```

I get the following error:

```auto
{"error":{"root_cause":[{"type":"repository_exception","reason":"[backup] location [/mnt/elasticsearch_repository/backup] doesn't match any of the locations specified by path.repo because this setting is empty"}],"type":"repository_exception","reason":"[backup] failed to create repository","caused_by":{"type":"repository_exception","reason":"[backup] location [/mnt/elasticsearch_repository/backup] doesn't match any of the locations specified by path.repo because this setting is empty"}},"status":500} 

```

I am using centos. Does anyone have any ideas.

I have also already looked on this thread and it doesn't solve my problem: [Path.repo is empty](https://discuss.elastic.co/t/path-repo-is-empty/25166/4)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 31, 2020, 9:35am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828/2 "2020-03-31T09:35:31Z")

</div>

Welcome!

You need to add this setting on every node.

---

<div class="post-metadata">

**Author:** ![cpb14pk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cpb14pk/32/49853_2.png) [@cpb14pk](https://discuss.elastic.co/u/cpb14pk)\
**Post date:** [April 1, 2020, 8:14am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828/3 "2020-04-01T08:14:25Z")

</div>

would I have to add the IP of the first node?

So, for my 10.212.145.20 node, would I set path.repo as:

`path.repo: ["/mnt/elasticsearch_repository/backup"]`

or

`path.repo: 10.212.145.10:["/mnt/elasticsearch_repository/backup"]`

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 1, 2020, 8:23am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828/4 "2020-04-01T08:23:02Z")

</div>

The dir needs to be mounted the same way on every machine and you should have on all machines the same setting:

```
path.repo: ["/mnt/elasticsearch_repository/backup"]
```

---

<div class="post-metadata">

**Author:** ![cpb14pk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cpb14pk/32/49853_2.png) [@cpb14pk](https://discuss.elastic.co/u/cpb14pk)\
**Post date:** [April 1, 2020, 8:41am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828/5 "2020-04-01T08:41:12Z")

</div>

Great thank you so much - they do all have the same config so that makes sense.

---

<div class="post-metadata">

**Author:** ![cpb14pk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cpb14pk/32/49853_2.png) [@cpb14pk](https://discuss.elastic.co/u/cpb14pk)\
**Post date:** [April 1, 2020, 9:35am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828/6 "2020-04-01T09:35:21Z")

</div>

So, my repository is registered now. However, I don't know how to make the repo interact with the other nodes. Do I need to mount the repository to the other nodes or is that what path.repo does?

My nodes 2 and 3 are giving the following errors:

Active: failed (Result: exit-code) since Wed 2020-04-01 10:42:08 BST; 23s ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 25916 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID\_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)  
Main PID: 25916 (code=exited, status=1/FAILURE)

Apr 01 10:42:05 ES02 systemd[1]: Started Elasticsearch.  
Apr 01 10:42:08 ES02 systemd[1]: elasticsearch.service: main process exited...RE  
Apr 01 10:42:08 ES02 systemd[1]: Unit elasticsearch.service entered failed ...e.  
Apr 01 10:42:08 ES02 systemd[1]: elasticsearch.service failed

---

<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 29, 2020, 9:35am UTC](https://discuss.elastic.co/t/error-when-registering-new-snapshot-repository/225828/7 "2020-04-29T09:35:24Z")

</div>

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