# Restoring snapshot on another machine?

**URL:** <https://discuss.elastic.co/t/restoring-snapshot-on-another-machine/226390>\
**Category:** Elasticsearch\
**Created:** [April 3, 2020, 10:55am UTC](https://discuss.elastic.co/t/restoring-snapshot-on-another-machine/226390 "2020-04-03T10:55:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arp](https://discuss.elastic.co/u/Arp)\
**Post date:** [April 3, 2020, 10:55am UTC](https://discuss.elastic.co/t/restoring-snapshot-on-another-machine/226390/1 "2020-04-03T10:55:59Z")

</div>

Hi,

I am playing around with elasticsearch. I have three VMs set up.  
1 provides a common nfs folder. Every machine has access to it.  
2 has a syslog server which sends logs into elasticsearch  
3 is supposed to be a machine that sends a command to 2 to create a snapshot and then import the snapshot locally.

I have installed elasticsearch and kibana on 2 and 3. I set the same path.repo on both machines, I registered the common folder as a repository.  
If I send the command to create the snapshot from 3 tot 2 using "`curl -X PUT remoteIP:9200 ...`" it works.

On 2 and 3 I can use the command to see information on the snapshot, both times using "localhost" as the ip.  
I get  
`{"snapshots" : [{"snapshot" : "snapshot_2",...}]}`

But when I try to restore it onto 3, using "curl -X POST "localhost:9200/\_snapshot/backup/snapshot\_2/\_restore?pretty", I get the message  
`[backup:snapshot_2] : snapshot does not exist.`

am I missing something here?

---

<div class="post-metadata">

**Author:** ![Wallie](https://avatars.discourse-cdn.com/v4/letter/w/54ee81/32.png) [@Wallie](https://discuss.elastic.co/u/Wallie)\
**Post date:** [April 3, 2020, 3:43pm UTC](https://discuss.elastic.co/t/restoring-snapshot-on-another-machine/226390/2 "2020-04-03T15:43:12Z")

</div>

Did you name the repository on machine 3 the same as on machine 2? As, this looks like you are restore from repositrory "backup"  
`GET /_snapshot/_all` shows the repositories.  
Than `GET /_snapshot/[REPO]/_all` should show your available snapshots.

---

<div class="post-metadata">

**Author:** ![Arp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arp](https://discuss.elastic.co/u/Arp)\
**Post date:** [April 6, 2020, 9:09am UTC](https://discuss.elastic.co/t/restoring-snapshot-on-another-machine/226390/3 "2020-04-06T09:09:21Z")

</div>

Hi,

Yes. I used exactly this on both machines:

```auto
    curl -X PUT "localhost:9200/_snapshot/backup?pretty" -H 'Content-type: application/json' -d'
    {
       "type": "fs",
       "settings": {
          "location": "/aux/snapshots"
       }
    }'

```

and /aux/snapshots is the common nfs folder provided by the other machine. Does this one maybe also need an elasticsearch user? Although, I used chmod 777 on it, so it shouldnt matter.

---

<div class="post-metadata">

**Author:** ![Arp](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Arp](https://discuss.elastic.co/u/Arp)\
**Post date:** [April 6, 2020, 11:04am UTC](https://discuss.elastic.co/t/restoring-snapshot-on-another-machine/226390/4 "2020-04-06T11:04:28Z")

</div>

Yeah, ok. My fault. I was sure I mounted the nfs directory, but apparently I didn't. It works, thank you 🙂

---

<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:** [May 4, 2020, 11:04am UTC](https://discuss.elastic.co/t/restoring-snapshot-on-another-machine/226390/5 "2020-05-04T11:04:43Z")

</div>

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