# Path.repo is set but cannot create snapshot

**URL:** <https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659>\
**Category:** Elasticsearch\
**Created:** [October 22, 2016, 3:20am UTC](https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659 "2016-10-22T03:20:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Cheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christopher_cheng/32/117417_2.png) [@Christopher\_Cheng](https://discuss.elastic.co/u/Christopher_Cheng)\
**Post date:** [October 22, 2016, 3:20am UTC](https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659/1 "2016-10-22T03:20:03Z")

</div>

I have set path.repo in elasticsearch.yml and I can see that in

[http://127.0.0.1:9200/\_nodes/?pretty](http://127.0.0.1:9200/_nodes/?pretty)

"path" : {  
"data" : "/var/lib/elasticsearch",  
"home" : "/usr/share/elasticsearch",  
"conf" : "/etc/elasticsearch",  
"logs" : "/var/log/elasticsearch",  
"repo" : ["/backups/elasticsearch"]  
},

It is the only node in the cluster and I have restarted elasticsearch after the config is modified.  
The repo directory is a NFS directory and the mode is 777,  
When I issue the command to create a snapshot, it returns that path.repo is missing...

curl -XPUT '[http://127.0.0.1:9200/\_snapshot/my\_backup](http://127.0.0.1:9200/_snapshot/my_backup)' -d '  
{  
"type": "fs",  
"settings": {  
"compress": true,  
"location": "/backups/elasticsearch"  
}  
}  
'

{"error":{"root\_cause":[{"type":"repository\_exception","reason":"[my\_backup] location [/backups/elasticsearch] doesn't match any of the locations specified by path.repo because this setting is empty"}],"type":"repository\_exception","reason":"[my\_backup] failed to create repository","caused\_by":{"type":"creation\_exception","reason":"creation\_exception: Guice creation errors:\n\n1) Error injecting constructor, RepositoryException[[my\_backup] location [/backups/elasticsearch] doesn't match any of the locations specified by path.repo because this setting is empty]\n at org.elasticsearch.repositories.fs.FsRepository.(Unknown Source)\n while locating org.elasticsearch.repositories.fs.FsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error","caused\_by":{"type":"repository\_exception","reason":"[my\_backup] location [/backups/elasticsearch] doesn't match any of the locations specified by path.repo because this setting is empty"}}},"status":500}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 22, 2016, 3:22am UTC](https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659/2 "2016-10-22T03:22:27Z")

</div>

> [@Christopher\_Cheng](#):
>
> I have set path.repo in elasticsearch.yml

Set how?

---

<div class="post-metadata">

**Author:** ![Christopher\_Cheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christopher_cheng/32/117417_2.png) [@Christopher\_Cheng](https://discuss.elastic.co/u/Christopher_Cheng)\
**Post date:** [October 22, 2016, 3:23am UTC](https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659/3 "2016-10-22T03:23:45Z")

</div>

I have tried both of them

path.repo: ["/backups/elasticsearch"]

path.repo: /backups/elasticsearch

---

<div class="post-metadata">

**Author:** ![Christopher\_Cheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christopher_cheng/32/117417_2.png) [@Christopher\_Cheng](https://discuss.elastic.co/u/Christopher_Cheng)\
**Post date:** [October 22, 2016, 3:58am UTC](https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659/4 "2016-10-22T03:58:14Z")

</div>

Forgot to mention, the version is  
elasticsearch-2.4.1-1.noarch

---

<div class="post-metadata">

**Author:** ![Christopher\_Cheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christopher_cheng/32/117417_2.png) [@Christopher\_Cheng](https://discuss.elastic.co/u/Christopher_Cheng)\
**Post date:** [October 22, 2016, 7:21am UTC](https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659/5 "2016-10-22T07:21:56Z")

</div>

> [@Christopher\_Cheng](#):
>
> [http://127.0.0.1:9200/\_nodes/?pretty](http://127.0.0.1:9200/_nodes/?pretty)

It turned out that there are 2 instance of elasticsearch running on the same machine because of unclean shutdown.  
I use kill -9 to kill of them and restarted, then it is fine

---

<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 5, 2017, 10:10pm UTC](https://discuss.elastic.co/t/path-repo-is-set-but-cannot-create-snapshot/63659/6 "2017-07-05T22:10:21Z")

</div>


