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:
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:
{"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