I have been trying to create snapshot of indices for my 2 node ES cluster. I have created NFS and mounted them. Now am running below json code in kibana sense UI and getting the error. Am running this against the ES url http://elkcrt.(org).com:9200.
Tried it with individual node:9200 as well but its erroring out.
PUT /_snapshot/backup
{
"type": "fs",
"settings": {
"location": "/elk_bak/esback",
"compress": true
}
}
{
"error": {
"root_cause": [
{
"type": "repository_exception",
"reason": "[backup] location [/elk_bak/esback] doesn't match any of the locations specified by path.repo"
}
],
"type": "repository_exception",
"reason": "[backup] failed to create repository",
"caused_by": {
"type": "creation_exception",
"reason": "Guice creation errors:\n\n1) Error injecting constructor, RepositoryException[[backup] location [/elk_bak/esback] doesn't match any of the locations specified by path.repo]\n at org.elasticsearch.repositories.fs.FsRepository.<init>(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": "[backup] location [/elk_bak/esback] doesn't match any of the locations specified by path.repo"
}
}
},
"status": 500
}
es config in /etc/elasticsearch/elasticsearch.yml
cluster.name: csm_elk_es_crt_01
node.name: "monelkescrt00.***.net"
network.host: 10.162.***.***
http.port: 9200
discovery.zen.ping.unicast.hosts: ["monelkescrt00.***.net", "monelkescrt01.***.net"]
path.repo: ["/elk_bak/esback"] // my NFS dir to store snapshot
path.repo: ["/tmp/elk-bkp"] //2nd node (MONELKESCRT00:/elk_bak) shared path