# When i tried to create a repository by using kibana it is throwing an error like this

**URL:** <https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367>\
**Category:** Elasticsearch\
**Created:** [July 13, 2016, 4:30am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367 "2016-07-13T04:30:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sukesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukesh/32/10890_2.png) [@sukesh](https://discuss.elastic.co/u/sukesh)\
**Post date:** [July 13, 2016, 4:30am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/1 "2016-07-13T04:30:13Z")

</div>

command i used to create the repository

PUT /\_snapshot/my\_backup  
{

```
"type": "fs", 

"settings": {

    "location": "repo/my_backup", 

    "compress": true

}

```

}

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

---

<div class="post-metadata">

**Author:** ![Joshua\_Rich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshua_rich/32/44953_2.png) [@Joshua\_Rich](https://discuss.elastic.co/u/Joshua_Rich)\
**Post date:** [July 13, 2016, 5:04am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/2 "2016-07-13T05:04:37Z")

</div>

Hi Sukesh,

You'll need to [whitelist the repo path](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/breaking_20_snapshot_and_restore_changes.html#_file_system_repositories_must_be_whitelisted) first in your `elasticsearch.yml` before you can add a repo with that path.

Best regards,

@Joshua_Rich

---

<div class="post-metadata">

**Author:** ![sukesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukesh/32/10890_2.png) [@sukesh](https://discuss.elastic.co/u/sukesh)\
**Post date:** [July 13, 2016, 5:15am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/3 "2016-07-13T05:15:47Z")

</div>

Hi Joshua,

i tried to whitelist the repo path in elasticsearch.yml with

#path.repo: /path/to/repo

in paths section but same error is throwing agian.

---

<div class="post-metadata">

**Author:** ![Joshua\_Rich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshua_rich/32/44953_2.png) [@Joshua\_Rich](https://discuss.elastic.co/u/Joshua_Rich)\
**Post date:** [July 13, 2016, 5:20am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/4 "2016-07-13T05:20:52Z")

</div>

What you've shown there is still commented? Did you remove the # at the start of the line? You'll also need to restart Elasticsearch, config file changes are not live. I also don't think you can use a relative path there, I would suggest using the full path.

---

<div class="post-metadata">

**Author:** ![sukesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukesh/32/10890_2.png) [@sukesh](https://discuss.elastic.co/u/sukesh)\
**Post date:** [July 13, 2016, 5:31am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/5 "2016-07-13T05:31:09Z")

</div>

No it was not commented ,I used path.repo: [D:/elasticsearch-2.3.1/repo/my\_backup] without # tag , i used full path of the file ,and i restarted the ES , i tried with the  
PUT /\_snapshot/my\_backup  
{

"type": "fs",

"settings": {

```
"location": "repo/my_backup", 

"compress": true

```

}  
}  
and changed the path like

PUT /\_snapshot/my\_backup  
{

"type": "fs",

"settings": {

```
"location": "D:\\elasticsearch-2.3.1\\repo\\my_backup", 

"compress": true

```

}  
}

still having the same exception .

---

<div class="post-metadata">

**Author:** ![Joshua\_Rich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshua_rich/32/44953_2.png) [@Joshua\_Rich](https://discuss.elastic.co/u/Joshua_Rich)\
**Post date:** [July 13, 2016, 6:47am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/6 "2016-07-13T06:47:24Z")

</div>

The original exception you posted is because you already have a repo "my\_backup" registered that literally has the path `repo/my_backup`. Try deleting that repo and try again with the new settings.

---

<div class="post-metadata">

**Author:** ![sukesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukesh/32/10890_2.png) [@sukesh](https://discuss.elastic.co/u/sukesh)\
**Post date:** [July 13, 2016, 7:17am UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/7 "2016-07-13T07:17:19Z")

</div>

i tried to delete the my\_backup in kibana using

DELETE /\_snapshot/my\_backup  
{

```
  "type": "fs",

  "settings": {

"location": "D:\\elasticsearch-2.3.1\\repo\\my_backup"
  }

```

}

but throwing exception like

exception : {  
"error": {  
"root\_cause": [  
{  
"type": "repository\_missing\_exception",  
"reason": "[my\_backup] missing"  
}  
],  
"type": "repository\_missing\_exception",  
"reason": "[my\_backup] missing"  
},  
"status": 404  
}

---

<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:36pm UTC](https://discuss.elastic.co/t/when-i-tried-to-create-a-repository-by-using-kibana-it-is-throwing-an-error-like-this/55367/8 "2017-07-05T22:36:09Z")

</div>


