ES snapshot & restore


(VivSam) #1

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

(Arthur Gimpel) #2

Hi,
I think that both of your nodes should have same path, since you type it both in the YML and the Snapshot API.
Why are the paths differ on both nodes?

Regardless, you really shouldn't run Elasticsearch on less that 3 nodes... ( please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#split-brain )


(VivSam) #3

ya i changed the config to have same path.repo:
Now when i run the same

PUT /_snapshot/my_backup
{
    "type": "fs",
    "settings": {
        "location": "/elk_bak/esback",
        "compress": true
    }
}

O/P:

{
   "error": {
      "root_cause": [
         {
            "type": "repository_verification_exception",
            "reason": "[my_backup] [3nPqHGNxTL-I7hbCbTsxnw, 'RemoteTransportException[[monelkescrt01.northamerica.cerner.net][10.162.119.234:9300][internal:admin/repository/verify]]; nested: RepositoryMissingException[[my_backup] missing];']]"
         }
      ],
      "type": "repository_verification_exception",
      "reason": "[my_backup] [3nPqHGNxTL-I7hbCbTsxnw, 'RemoteTransportException[[monelkescrt01.northamerica.cerner.net][10.162.119.234:9300][internal:admin/repository/verify]]; nested: RepositoryMissingException[[my_backup] missing];']]"
   },
   "status": 500
}

but when i check for the repo

GET /_snapshot/_all

it gives me proper O/P:

{
  "my_backup": {
    "type": "fs",
    "settings": {
      "compress": "true",
      "location": "/elk_bak/esback"
    }
  }
}

(system) #4

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