# Snapshot and path.repo on one cluster node

**URL:** <https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717>\
**Category:** Elasticsearch\
**Created:** [November 7, 2018, 12:41pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717 "2018-11-07T12:41:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillaume\_RENARD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guillaume_renard/32/37369_2.png) [@Guillaume\_RENARD](https://discuss.elastic.co/u/Guillaume_RENARD)\
**Post date:** [November 7, 2018, 12:41pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/1 "2018-11-07T12:41:29Z")

</div>

How can I create a snapshot on my kibana index with a cluster of 4 nodes.  
I have created a /data/bakcup folder on my kibana host, then add path.repo=["/data/backup"], restarted ES; Then I try to  
PUT /\_snapshot/my\_backup  
{  
"type": "fs",  
"settings": {  
"location": "/data/backup"  
}  
}

but get  
{  
"error": {  
"root\_cause": [  
{  
"type": "repository\_exception",  
"reason": "[my\_backup] location [/data/backup] 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": "repository\_exception",  
"reason": "[my\_backup] location [/data/backup] doesn't match any of the locations specified by path.repo because this setting is empty"  
}  
},  
"status": 500  
}

I don't have shared filesystem between my node and i'm using 6.4.2 stack.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [November 7, 2018, 12:51pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/2 "2018-11-07T12:51:32Z")

</div>

Hello  
I have the same situation (4 nodes with 2 data nodes).  
On both data nodes, I have created the folder for the snapshots and restart elasticsearch, but I have the same error message as you.  
I am wondering if the folder has to be shared by all the node, I have not yet tested.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2018, 12:52pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/3 "2018-11-07T12:52:31Z")

</div>

Yes it must be a shared folder.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2018, 12:52pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/4 "2018-11-07T12:52:58Z")

</div>

You can always use Kibana UI to export your objects.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [November 7, 2018, 1:00pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/5 "2018-11-07T13:00:53Z")

</div>

Thank you for your reply.  
if I remove the path.repo in one of 2 .yml file configuration, it's possible ? What is the impact ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2018, 1:12pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/6 "2018-11-07T13:12:06Z")

</div>

No this won't work. Path must be set on all nodes and must be shared.

But why do you want to use Snapshot and restore ?

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [November 7, 2018, 1:19pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/7 "2018-11-07T13:19:43Z")

</div>

Ok !  
In my case, the purpose is to rename indices, so I have to take snapshots and restore with a new name.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [November 7, 2018, 1:40pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/8 "2018-11-07T13:40:25Z")

</div>

Just 2 more questions

1. 

the path.repo has to be indicated in all nodes or just the data nodes ?

I have set the path.repo in my 2 data nodes, mount the nfs path on my folder, it's not working.

1. 

This morning, when I have restarted elasticsearch after set the path.repo, the state of the cluster was red, because the replica shard was to 0 until all shard was replicated.

How to avoid that ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2018, 1:44pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/9 "2018-11-07T13:44:16Z")

</div>

You can use reindex API may be?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2018, 1:45pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/10 "2018-11-07T13:45:46Z")

</div>

> the path.repo has to be indicated in all nodes or just the data nodes ?

All data and master elligible nodes IIRC.

> How to avoid that ?

You can set one replica and do a rolling restart instead.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [November 7, 2018, 2:05pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/11 "2018-11-07T14:05:14Z")

</div>

thank you very much for your answers ; I am going to test the reindex API with some fakes indices.

For the rolling restart, what do you mean by set "one replica" ?

The documentation says to set "none" :  
[https://www.elastic.co/guide/en/elasticsearch/guide/master/\_rolling\_restarts.html](https://www.elastic.co/guide/en/elasticsearch/guide/master/_rolling_restarts.html)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2018, 2:46pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/12 "2018-11-07T14:46:30Z")

</div>

Not the same option. The one I'm speaking about is `number_of_replicas` In index settings.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [November 7, 2018, 4:50pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/13 "2018-11-07T16:50:22Z")

</div>

I have done this :  
reindex API on all the indices I wanted to rename : no problem, I see the new indices with the same number of documents than the original indices.

FIY, I have renamed the indices _filebeat-6.3.0-YYYY.mm.dd_ to _filezilla-logs-YYYY.mm.dd_

When I change the source of a saved searched to have the informations from the new indices, I have a error message :

```
Could not locate that index-pattern (id: filezilla-logs-*),

```

But this pattern exisits, I have created this once I have renamed the indices.

I don't undestand what's wrong.

I have also created a new search from the new index and I saved it. When I read it, the index is a serial number : _2a61ec40-e2a2-11e8-a38e-69b7fe5aaa9d_

Why it's not the same name as the index pattern ?

Fo winlogbeat or heartbeat, it's not a serial number.

So how I can have the saved searches with the new indices pattern without to recreated them from scratch ?

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 7, 2018, 5:05pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/14 "2018-11-07T17:05:31Z")

</div>

> [@Ludovic9](#):
>
> So how I can have the saved searches with the new indices pattern without to recreated them from scratch ?

I don't know but you should probably ask in #kibana instead.

---

<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:** [December 5, 2018, 5:05pm UTC](https://discuss.elastic.co/t/snapshot-and-path-repo-on-one-cluster-node/155717/15 "2018-12-05T17:05:42Z")

</div>

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