# I didn't understand the Elastic Snapshot properly Please help

**URL:** <https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 8:54am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260 "2020-06-16T08:54:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![111349](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111349/32/69694_2.png) [@111349](https://discuss.elastic.co/u/111349)\
**Post date:** [June 16, 2020, 8:54am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/1 "2020-06-16T08:54:24Z")

</div>

My configuration is to run each elastic on 3 different servers.  
Elastic that works as a master node (also a data node) on the 1st server.  
Elastic No. 2 and No. 3 operate as data nodes.

I know that I have to specify the same path in all three Elastic configuration files by searching.

However, I have no idea how to write the path.repo.

After configuring Elastic on 3 different servers like this, please do not know how to set path.repo to set up snapshot..

---

<div class="post-metadata">

**Author:** ![defalt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defalt/32/71379_2.png) [@defalt](https://discuss.elastic.co/u/defalt)\
**Post date:** [June 16, 2020, 9:04am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/2 "2020-06-16T09:04:02Z")

</div>

1. You set the Path Repo in the .yml  
` path.repo: ["\\\\MY_SERVER\\Snapshots"]`
2. You register that repo

```auto
PUT /_snapshot/RepoName
{
    "type": "fs",
    "settings": {
        "location": "\\\\MY_SERVER\\Snapshots\\Repo",
        "compress": true
    }
}

```

1. Take the snapshot  
`PUT /_snapshot/RepoName/snapshot_1?wait_for_completion=true `

Note: This apporach uses windows paths which have to be escaped with . Thats why it has \. Its different in linux.  
Find more information here  
[https://www.elastic.co/guide/en/elasticsearch/reference/7.x/snapshot-restore.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/snapshot-restore.html)

---

<div class="post-metadata">

**Author:** ![111349](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111349/32/69694_2.png) [@111349](https://discuss.elastic.co/u/111349)\
**Post date:** [June 16, 2020, 11:30am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/3 "2020-06-16T11:30:17Z")

</div>

Thank you for your help. I have one question.

Is it okay if the path.repo is not the same in the three elastics?

If so, do i need to combine the three when recovering?

---

<div class="post-metadata">

**Author:** ![defalt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defalt/32/71379_2.png) [@defalt](https://discuss.elastic.co/u/defalt)\
**Post date:** [June 16, 2020, 11:41am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/4 "2020-06-16T11:41:19Z")

</div>

A snapshot contains all indices from a cluster (as far as i know). If you enter path.repo on node1 and you use this node for the snapshots you should be finde. Why do you want to enter different paths on different nodes?  
To be sure that your snapshot system works:

1. Set Path.repo on Node1.
2. Take a snapshot using this Node1.
3. Set up a new node outside the cluster and try to restore the snapshot.  
If all goes according to plan you will have all the indices from the cluster. Even if they are not on Node1.  
If this works you are all set.

---

<div class="post-metadata">

**Author:** ![111349](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111349/32/69694_2.png) [@111349](https://discuss.elastic.co/u/111349)\
**Post date:** [June 17, 2020, 12:16am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/5 "2020-06-17T00:16:08Z")

</div>

Thank you very much for your help. However, my problem has not been solved.

Does it mean to set path.repo on node 1, does it mean that it is not necessary to set on node 2 and node 3?

If you set path.repo on node 1 only and issue a snapshot command, the phrase "failed to verify repository" appears on node 2 and node 3.

I wonder. Shouldn't all nodes look at a single path when specifying a snapshot?.

If not, how can you take a snapshot of the data that is divided into elastics?

Am I misunderstanding?

I have split the Elastic on different ip servers in the Linux environment.

If you need to look at one place as the path of the snapshot, how do you write path.repo on the remaining nodes 2 and 3?

(in elasticsearch-node1.yml)  
path.repo: [/home/elasticsearch-node1]

(in elasticsearch-node2,3.yml)  
path.repo: [How should I write this part?]

---

<div class="post-metadata">

**Author:** ![Vinayak\_Sapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinayak_sapre/32/45939_2.png) [@Vinayak\_Sapre](https://discuss.elastic.co/u/Vinayak_Sapre)\
**Post date:** [June 17, 2020, 2:33am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/6 "2020-06-17T02:33:27Z")

</div>

@111349

IMHO don't set different values. More importantly why do you want to set different values?

[https://www.elastic.co/guide/en/elasticsearch/reference/7.x/snapshots-register-repository.html#snapshots-filesystem-repository](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/snapshots-register-repository.html#snapshots-filesystem-repository)

1. The location path used while registering a shared filesystem repository must resolve to a single directory location (not just path string value) from every master and data node.
2. One of the directories in the location path must be specified in repo.path.

Let's say you mount a shared directory on 3 ES nodes as /mnt/backup.

You can specify path.repo on 3 nodes as

```auto
/mnt/backup/foo/bar/baz
/mnt/backup/foo/bar
/mnt/backup/foo

```

and repository location as `/mnt/backup/foo/bar/baz`. Configuration meets both criteria. Your snapshots will work.

However this configuration will not work if use relative path as repository location for ex. my\_backup. The first node will resolve the relative path as /mnt/backup/foo/bar/baz/my\_backup, second node will resolve as /mnt/backup/foo/bar/my\_backup and third node as /mnt/backup/foo/my\_backup. Your register repository call will fail.

---

<div class="post-metadata">

**Author:** ![111349](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111349/32/69694_2.png) [@111349](https://discuss.elastic.co/u/111349)\
**Post date:** [June 17, 2020, 5:38am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/7 "2020-06-17T05:38:27Z")

</div>

I want to set path.repo to a common directory.

How can I have a common directory on different Linux servers?

Is there such a function in Elastic? Or should I mount it?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 17, 2020, 5:51am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/9 "2020-06-17T05:51:47Z")

</div>

The repository you use have to be shared storage and accessible from ALL nodes in the cluster. Elasticsearch will test this by having one node write a file and have another one read it. The path has to be set up on all nodes and has to be the same across the board.

---

<div class="post-metadata">

**Author:** ![111349](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111349/32/69694_2.png) [@111349](https://discuss.elastic.co/u/111349)\
**Post date:** [June 17, 2020, 6:04am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/10 "2020-06-17T06:04:29Z")

</div>

First of all, thank you so much for helping me with the difficulties I have had for a long time

First, I set path.repo on node1 only  
then taking a snapshot. But what I got is an error.  
The error came out like this  
RemoteTransportException[[node2][node2\_ip][internal:admin/repository/verify]]; nested: RepositoryMissingException[[mybackup] missing];  
Same for node 3.

So I thought I did that by not setting path.repo on nodes 2 and 3.  
However, it is amazing to say that you only need to set node1.  
So what am I missing now? Confusing

---

<div class="post-metadata">

**Author:** ![111349](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111349/32/69694_2.png) [@111349](https://discuss.elastic.co/u/111349)\
**Post date:** [June 17, 2020, 6:07am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/11 "2020-06-17T06:07:23Z")

</div>

Thank you for your reply

So I'm running Elastic on different Linux servers now, does that mean I need to mount it?

Does it mean that you can set the path.repo of node 2 and 3 to the directory mounted on node 1?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 17, 2020, 6:14am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/12 "2020-06-17T06:14:14Z")

</div>

Typically you create an NFS volume and mount this on all the nodes in the same path.

---

<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:** [July 15, 2020, 6:14am UTC](https://discuss.elastic.co/t/i-didnt-understand-the-elastic-snapshot-properly-please-help/237260/13 "2020-07-15T06:14:16Z")

</div>

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