Restoring snapshot on another machine?


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?

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.


Yes. I used exactly this on both machines:

    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.

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

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