# ES snapshot & restore

**URL:** <https://discuss.elastic.co/t/es-snapshot-restore/96933>\
**Category:** Elasticsearch\
**Created:** [August 14, 2017, 9:15am UTC](https://discuss.elastic.co/t/es-snapshot-restore/96933 "2017-08-14T09:15:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek\_Samaga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_samaga/32/43285_2.png) [@Vivek\_Samaga](https://discuss.elastic.co/u/Vivek_Samaga)\
**Post date:** [August 14, 2017, 9:15am UTC](https://discuss.elastic.co/t/es-snapshot-restore/96933/1 "2017-08-14T09:15:07Z")

</div>

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](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
```

---

<div class="post-metadata">

**Author:** ![arthur](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@arthur](https://discuss.elastic.co/u/arthur)\
**Post date:** [August 14, 2017, 2:36pm UTC](https://discuss.elastic.co/t/es-snapshot-restore/96933/2 "2017-08-14T14:36:44Z")

</div>

> [@Vivek\_Samaga](#):
>
> to crea

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 [Node | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#split-brain) )

---

<div class="post-metadata">

**Author:** ![Vivek\_Samaga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_samaga/32/43285_2.png) [@Vivek\_Samaga](https://discuss.elastic.co/u/Vivek_Samaga)\
**Post date:** [August 15, 2017, 7:07am UTC](https://discuss.elastic.co/t/es-snapshot-restore/96933/3 "2017-08-15T07:07:53Z")

</div>

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"
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 12, 2017, 7:08am UTC](https://discuss.elastic.co/t/es-snapshot-restore/96933/4 "2017-09-12T07:08:01Z")

</div>

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