# Restoring a snapshot from one machine to a different machine

**URL:** https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104
**Category:** Elasticsearch
**Created:** [August 5, 2014, 9:40pm UTC](https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104 "2014-08-05T21:40:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Donald\_Cha](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@Donald\_Cha](https://discuss.elastic.co/u/Donald_Cha)
#### Post date: [August 5, 2014, 9:40pm UTC](https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104/1 "2014-08-05T21:40:38Z")

</div>

I would like to use the Snapshot functionality to move indices from an OLD  
server to a NEW server. My approach to do this task was to take a snapshot  
from OLD server, copy the snapshot over to the NEW server (I zipped this  
snapshot because it contained multiple indices), and try to restore that  
snapshot from NEW server. However, I am not able to restore my snapshot on  
NEW server.

Here are the commands that I've typed.

OLD$ curl -X PUT '[http://localhost:9200/\_snapshot/my\_backup](http://localhost:9200/_snapshot/my_backup)' -d '{  
"type" : "fs",  
"settings" : {  
"location" : "/mnt1/elasticsearch\_backup/my\_backup",  
"compress" : true  
}  
}'

OLD$ curl -XPUT  
"localhost:9200/\_snapshot/my\_backup/snapshot\_1?wait\_for\_completion=true"  
OLD$ tar cvfz elasticsearch\_backup.tgz /mnt1/elasticsearch\_backup/

OLD$ scp elasticsearch\_backup.tgz user@NEW:/mnt1/dropbox (We are using  
AmazonAWS server)

NEW$ tar -zxvf elasticsearch\_backup.tgz

curl -XPUT '[http://localhost:9200/\_snapshot/my\_backup2](http://localhost:9200/_snapshot/my_backup2)' -d '{  
"type": "fs",  
"settings": {  
"location": "/mnt1/dropbox/mnt1/my\_backup/",  
"compress": true  
}  
}'

^ (At that location, I see my indices directory that I've unzipped from tar  
file that I've copied over from OLD server)

NEW$ curl -X POST  
"localhost:9200/\_snapshot/my\_backup2/snapshot\_1/\_restore?wait\_for\_completion=true"

and the error message I get at this point is

{"error":"SnapshotMissingException[[my\_backup2:snapshot\_1] is missing];  
nested:  
FileNotFoundException[/mnt1/dropbox/mnt1/my\_backup/snapshot-snapshot\_1 (No  
such file or directory)]; ","status":404}

It would be great if someone can point out what I can possibly do wrong here

Thanks.

Additionally, if I type

[http://OLD:9200/\_snapshot/my\_backup/\_all](http://OLD:9200/_snapshot/my_backup/_all)

I see

{

- 
## snapshots: [
{  
- snapshot: "snapshot\_1",  
- indices:  
[  
- "user\_events\_43294971\_1401773217",  
- "user\_events\_111630610\_1404969230",  
- "user\_events\_85270411\_1398889365",  
- "user\_events\_86845965\_1399787308"  
],  
- state: "SUCCESS",  
- start\_time: "2014-08-05T01:42:15.655Z",  
- start\_time\_in\_millis: 1407202935655,  
- end\_time: "2014-08-05T02:16:39.919Z",  
- end\_time\_in\_millis: 1407204999919,  
- duration\_in\_millis: 2064264,  
- failures: [],  
- shards:  
{  
- total: 32,  
- failed: 0,  
- successful: 32  
}  
}  
]

}

However, if I type

[http://NEW:9200/\_snapshot/my\_backup2/\_all](http://NEW:9200/_snapshot/my_backup2/_all)

All I see is

{

- snapshots: []

}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b1360def-15d8-4eab-8cbd-1257b56adca7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b1360def-15d8-4eab-8cbd-1257b56adca7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dan\_sl](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dan\_sl](https://discuss.elastic.co/u/dan_sl)
#### Post date: [August 10, 2014, 6:59pm UTC](https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104/2 "2014-08-10T18:59:40Z")

</div>

Hi,

Maybe it is permission issue on the new server directory?

Try to make chmod 777 on directory and then try to restore.

Thanks,

Dan.

---

<div class="post-metadata">

### Author: ![Bryan\_Shannon](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@Bryan\_Shannon](https://discuss.elastic.co/u/Bryan_Shannon)
#### Post date: [August 11, 2014, 8:49pm UTC](https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104/3 "2014-08-11T20:49:57Z")

</div>

Still the same issue here as well... Settings are the same on both servers,  
but after copying (rsync) the files to the other server, the other server  
fails to see any snapshots in the API call to list them. Same problem as  
Donald: the respository has only the "indices" sub directory, and the PUT  
command on the secondary server gives the same "(No such file or  
directory)" error message.  
Any help would be greatly appreciated!

-Bryan

On Tuesday, August 5, 2014 5:40:39 PM UTC-4, Donald Cha wrote:

> I would like to use the Snapshot functionality to move indices from an OLD  
> server to a NEW server. My approach to do this task was to take a snapshot  
> from OLD server, copy the snapshot over to the NEW server (I zipped this  
> snapshot because it contained multiple indices), and try to restore that  
> snapshot from NEW server. However, I am not able to restore my snapshot on  
> NEW server.
> 
> Here are the commands that I've typed.
> 
> OLD$ curl -X PUT '[http://localhost:9200/\_snapshot/my\_backup](http://localhost:9200/_snapshot/my_backup)' -d '{  
> "type" : "fs",  
> "settings" : {  
> "location" : "/mnt1/elasticsearch\_backup/my\_backup",  
> "compress" : true  
> }  
> }'
> 
> OLD$ curl -XPUT  
> "localhost:9200/\_snapshot/my\_backup/snapshot\_1?wait\_for\_completion=true"  
> OLD$ tar cvfz elasticsearch\_backup.tgz /mnt1/elasticsearch\_backup/
> 
> OLD$ scp elasticsearch\_backup.tgz user@NEW:/mnt1/dropbox (We are using  
> AmazonAWS server)
> 
> NEW$ tar -zxvf elasticsearch\_backup.tgz
> 
> curl -XPUT '[http://localhost:9200/\_snapshot/my\_backup2](http://localhost:9200/_snapshot/my_backup2)' -d '{  
> "type": "fs",  
> "settings": {  
> "location": "/mnt1/dropbox/mnt1/my\_backup/",  
> "compress": true  
> }  
> }'
> 
> ^ (At that location, I see my indices directory that I've unzipped from  
> tar file that I've copied over from OLD server)
> 
> NEW$ curl -X POST  
> "localhost:9200/\_snapshot/my\_backup2/snapshot\_1/\_restore?wait\_for\_completion=true"
> 
> and the error message I get at this point is
> 
> {"error":"SnapshotMissingException[[my\_backup2:snapshot\_1] is missing];  
> nested:  
> FileNotFoundException[/mnt1/dropbox/mnt1/my\_backup/snapshot-snapshot\_1 (No  
> such file or directory)]; ","status":404}
> 
> It would be great if someone can point out what I can possibly do wrong  
> here
> 
> Thanks.
> 
> Additionally, if I type
> 
> [http://OLD:9200/\_snapshot/my\_backup/\_all](http://OLD:9200/_snapshot/my_backup/_all)
> 
> I see
> 
> {
> 
> - 
> ## snapshots: [
> {  
> - snapshot: "snapshot\_1",  
> - indices:  
> [  
> - "user\_events\_43294971\_1401773217",  
> - "user\_events\_111630610\_1404969230",  
> - "user\_events\_85270411\_1398889365",  
> - "user\_events\_86845965\_1399787308"  
> ],  
> - state: "SUCCESS",  
> - start\_time: "2014-08-05T01:42:15.655Z",  
> - start\_time\_in\_millis: 1407202935655,  
> - end\_time: "2014-08-05T02:16:39.919Z",  
> - end\_time\_in\_millis: 1407204999919,  
> - duration\_in\_millis: 2064264,  
> - failures: ,  
> - shards:  
> {  
> - total: 32,  
> - failed: 0,  
> - successful: 32  
> }  
> }  
> ]
> 
> }
> 
> However, if I type
> 
> [http://NEW:9200/\_snapshot/my\_backup2/\_all](http://NEW:9200/_snapshot/my_backup2/_all)
> 
> All I see is
> 
> {
> 
> - snapshots: 
> 
> }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4b7f8505-f4d2-466f-a0e0-aaac0821218c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4b7f8505-f4d2-466f-a0e0-aaac0821218c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Bryan\_Shannon](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@Bryan\_Shannon](https://discuss.elastic.co/u/Bryan_Shannon)
#### Post date: [August 11, 2014, 9:33pm UTC](https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104/4 "2014-08-11T21:33:09Z")

</div>

The permissions are wide open for the snapshot repository. I followed the  
directions from the snapshot documentation; I wonder if I'm missing a  
trailing slash or something, there are various files under different  
indices underneath the sub directories beneath my  
/snapshots/indices/{indexname}/ but there the "restore" command is looking  
for them in the root of my "/snapshots" directory.

I will try with the index specific backups, but the round trip time to  
determine whether or not a given PUT or POST work is about an half an hour  
for each shot.. .So far, everything fails with the same 404 error, looking  
for a file during the restore named /snapshots/snapshot-snapshot\_1 that  
really does not exist (in either the backup or the rsync destination).

Regards,  
-Bryan

On Monday, August 11, 2014 4:49:57 PM UTC-4, Bryan Shannon wrote:

> Still the same issue here as well... Settings are the same on both  
> servers, but after copying (rsync) the files to the other server, the other  
> server fails to see any snapshots in the API call to list them. Same  
> problem as Donald: the respository has only the "indices" sub directory,  
> and the PUT command on the secondary server gives the same "(No such file  
> or directory)" error message.  
> Any help would be greatly appreciated!
> 
> -Bryan
> 
> On Tuesday, August 5, 2014 5:40:39 PM UTC-4, Donald Cha wrote:
> 
> > I would like to use the Snapshot functionality to move indices from an  
> > OLD server to a NEW server. My approach to do this task was to take a  
> > snapshot from OLD server, copy the snapshot over to the NEW server (I  
> > zipped this snapshot because it contained multiple indices), and try to  
> > restore that snapshot from NEW server. However, I am not able to restore my  
> > snapshot on NEW server.
> > 
> > Here are the commands that I've typed.
> > 
> > OLD$ curl -X PUT '[http://localhost:9200/\_snapshot/my\_backup](http://localhost:9200/_snapshot/my_backup)' -d '{  
> > "type" : "fs",  
> > "settings" : {  
> > "location" : "/mnt1/elasticsearch\_backup/my\_backup",  
> > "compress" : true  
> > }  
> > }'
> > 
> > OLD$ curl -XPUT  
> > "localhost:9200/\_snapshot/my\_backup/snapshot\_1?wait\_for\_completion=true"  
> > OLD$ tar cvfz elasticsearch\_backup.tgz /mnt1/elasticsearch\_backup/
> > 
> > OLD$ scp elasticsearch\_backup.tgz user@NEW:/mnt1/dropbox (We are using  
> > AmazonAWS server)
> > 
> > NEW$ tar -zxvf elasticsearch\_backup.tgz
> > 
> > curl -XPUT '[http://localhost:9200/\_snapshot/my\_backup2](http://localhost:9200/_snapshot/my_backup2)' -d '{  
> > "type": "fs",  
> > "settings": {  
> > "location": "/mnt1/dropbox/mnt1/my\_backup/",  
> > "compress": true  
> > }  
> > }'
> > 
> > ^ (At that location, I see my indices directory that I've unzipped from  
> > tar file that I've copied over from OLD server)
> > 
> > NEW$ curl -X POST  
> > "localhost:9200/\_snapshot/my\_backup2/snapshot\_1/\_restore?wait\_for\_completion=true"
> > 
> > and the error message I get at this point is
> > 
> > {"error":"SnapshotMissingException[[my\_backup2:snapshot\_1] is missing];  
> > nested:  
> > FileNotFoundException[/mnt1/dropbox/mnt1/my\_backup/snapshot-snapshot\_1 (No  
> > such file or directory)]; ","status":404}
> > 
> > It would be great if someone can point out what I can possibly do wrong  
> > here
> > 
> > Thanks.
> > 
> > Additionally, if I type
> > 
> > [http://OLD:9200/\_snapshot/my\_backup/\_all](http://OLD:9200/_snapshot/my_backup/_all)
> > 
> > I see
> > 
> > {
> > 
> > - 
> > ## snapshots: [
> > {  
> > - snapshot: "snapshot\_1",  
> > - indices:  
> > [  
> > - "user\_events\_43294971\_1401773217",  
> > - "user\_events\_111630610\_1404969230",  
> > - "user\_events\_85270411\_1398889365",  
> > - "user\_events\_86845965\_1399787308"  
> > ],  
> > - state: "SUCCESS",  
> > - start\_time: "2014-08-05T01:42:15.655Z",  
> > - start\_time\_in\_millis: 1407202935655,  
> > - end\_time: "2014-08-05T02:16:39.919Z",  
> > - end\_time\_in\_millis: 1407204999919,  
> > - duration\_in\_millis: 2064264,  
> > - failures: ,  
> > - shards:  
> > {  
> > - total: 32,  
> > - failed: 0,  
> > - successful: 32  
> > }  
> > }  
> > ]
> > 
> > }
> > 
> > However, if I type
> > 
> > [http://NEW:9200/\_snapshot/my\_backup2/\_all](http://NEW:9200/_snapshot/my_backup2/_all)
> > 
> > All I see is
> > 
> > {
> > 
> > - snapshots: 
> > 
> > }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e0de73d5-8e3d-4ab7-ab6f-266c72fa437a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e0de73d5-8e3d-4ab7-ab6f-266c72fa437a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Vinayak\_Bhosale](https://avatars.discourse-cdn.com/v4/letter/v/a587f6/32.png) [@Vinayak\_Bhosale](https://discuss.elastic.co/u/Vinayak_Bhosale)
#### Post date: [October 21, 2014, 11:56am UTC](https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104/5 "2014-10-21T11:56:22Z")

</div>

If you created snapshot on filesystem, you need to copy backup from the  
master node VM of your cluster. This is where entire snapshot is located.

On Wednesday, 6 August 2014 03:10:39 UTC+5:30, Donald Cha wrote:

> I would like to use the Snapshot functionality to move indices from an OLD  
> server to a NEW server. My approach to do this task was to take a snapshot  
> from OLD server, copy the snapshot over to the NEW server (I zipped this  
> snapshot because it contained multiple indices), and try to restore that  
> snapshot from NEW server. However, I am not able to restore my snapshot on  
> NEW server.
> 
> Here are the commands that I've typed.
> 
> OLD$ curl -X PUT '[http://localhost:9200/\_snapshot/my\_backup](http://localhost:9200/_snapshot/my_backup)' -d '{  
> "type" : "fs",  
> "settings" : {  
> "location" : "/mnt1/elasticsearch\_backup/my\_backup",  
> "compress" : true  
> }  
> }'
> 
> OLD$ curl -XPUT  
> "localhost:9200/\_snapshot/my\_backup/snapshot\_1?wait\_for\_completion=true"  
> OLD$ tar cvfz elasticsearch\_backup.tgz /mnt1/elasticsearch\_backup/
> 
> OLD$ scp elasticsearch\_backup.tgz user@NEW:/mnt1/dropbox (We are using  
> AmazonAWS server)
> 
> NEW$ tar -zxvf elasticsearch\_backup.tgz
> 
> curl -XPUT '[http://localhost:9200/\_snapshot/my\_backup2](http://localhost:9200/_snapshot/my_backup2)' -d '{  
> "type": "fs",  
> "settings": {  
> "location": "/mnt1/dropbox/mnt1/my\_backup/",  
> "compress": true  
> }  
> }'
> 
> ^ (At that location, I see my indices directory that I've unzipped from  
> tar file that I've copied over from OLD server)
> 
> NEW$ curl -X POST  
> "localhost:9200/\_snapshot/my\_backup2/snapshot\_1/\_restore?wait\_for\_completion=true"
> 
> and the error message I get at this point is
> 
> {"error":"SnapshotMissingException[[my\_backup2:snapshot\_1] is missing];  
> nested:  
> FileNotFoundException[/mnt1/dropbox/mnt1/my\_backup/snapshot-snapshot\_1 (No  
> such file or directory)]; ","status":404}
> 
> It would be great if someone can point out what I can possibly do wrong  
> here
> 
> Thanks.
> 
> Additionally, if I type
> 
> [http://OLD:9200/\_snapshot/my\_backup/\_all](http://OLD:9200/_snapshot/my_backup/_all)
> 
> I see
> 
> {
> 
> - 
> ## snapshots: [
> {  
> - snapshot: "snapshot\_1",  
> - indices:  
> [  
> - "user\_events\_43294971\_1401773217",  
> - "user\_events\_111630610\_1404969230",  
> - "user\_events\_85270411\_1398889365",  
> - "user\_events\_86845965\_1399787308"  
> ],  
> - state: "SUCCESS",  
> - start\_time: "2014-08-05T01:42:15.655Z",  
> - start\_time\_in\_millis: 1407202935655,  
> - end\_time: "2014-08-05T02:16:39.919Z",  
> - end\_time\_in\_millis: 1407204999919,  
> - duration\_in\_millis: 2064264,  
> - failures: ,  
> - shards:  
> {  
> - total: 32,  
> - failed: 0,  
> - successful: 32  
> }  
> }  
> ]
> 
> }
> 
> However, if I type
> 
> [http://NEW:9200/\_snapshot/my\_backup2/\_all](http://NEW:9200/_snapshot/my_backup2/_all)
> 
> All I see is
> 
> {
> 
> - snapshots: 
> 
> }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cb11f337-b85e-4dbe-8777-94283b409c48%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cb11f337-b85e-4dbe-8777-94283b409c48%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:54am UTC](https://discuss.elastic.co/t/restoring-a-snapshot-from-one-machine-to-a-different-machine/19104/6 "2017-07-06T00:54:45Z")

</div>


