I have set path.repo in elasticsearch.yml and I can see that in
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' -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}