Repository exception - doesn't match any of the locations specified by path.repo because this setting is empty

Hello All,

I would like to setup snapshot repository for my elastic search. The elasticsearch is running as a container. I followed the same process like mentioned in document:

  1. Added path

root@elasticsearch-5-elasticsearch-clients-1:/usr/share/elasticsearch# grep path.repo /etc/elasticsearch/elasticsearch.yml
path.repo: /tmp/elastic_backup
root@elasticsearch-5-elasticsearch-clients-1:/usr/share/elasticsearch#

I restarted the elasticsearch.

  1. Using Sense to create the repository.
    PUT /_snapshot/my_backup
    {
    "type": "fs",
    "settings": {
    "compress" : "true",
    "location" : "/tmp/elastic_backup"
    }
    }

Fails with the error:

{
"error": {
"root_cause": [
{
"type": "repository_exception",
"reason": "[my_backup] location [/tmp/elastic_backup] 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": "repository_exception",
"reason": "[my_backup] location [/tmp/elastic_backup] doesn't match any of the locations specified by path.repo because this setting is empty"
}
},
"status": 500
}

One question is where should be this repository location(/tmp/elastic_backup) present? incase of elasticsearch running inside a docker container.

Any help is much appreciated.

Set path.repo to /tmp in elasticsearch.yml and restart your node

I did that now. Still facing the same issue.

So you did something wrong I believe. May be share your config?

Config means you need which files here?

elasticsearch.yml

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