# Snapshot restore from 1.7.4 to 2.1.2 cannot find files

**URL:** https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538
**Category:** Elasticsearch
**Created:** [November 29, 2016, 8:01pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538 "2016-11-29T20:01:02Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![markcitizen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markcitizen/32/117307_2.png) [@markcitizen](https://discuss.elastic.co/u/markcitizen)
#### Post date: [November 29, 2016, 8:01pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/1 "2016-11-29T20:01:02Z")

</div>

Hello,  
I'm trying to restore an index snapshot created on ES cluster v. 1.7.4 to an ES cluster running version 2.1.2. I was able to register a S3 repository (myRepo), and I can verify that the new cluster can access it.  
However when running this command:

curl -XPOST "[http://esCluster-2.1.2/\_snapshot/myRepo/all\_11\_28\_2016/](http://esCluster-2.1.2/_snapshot/myRepo/all_11_28_2016/)_restore?wait\_for\_completion=true" -d'  
{  
"indices": "myIndex",  
"ignore\_unavailable": true,  
"rename\_pattern": "(.+)",  
"rename\_replacement": "index\_restored_$1"  
}'

I get the following error:

"file\_not\_found\_exception","reason":"Blob object [snap-all\_11\_28\_2016.dat] not found: The specified key does not exist.

Which is true, snapshot files stored in S3 are named "snapshot-all\_11\_28\_2016".

Why is ES cluster looking for a different snapshot name? According to this page:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html)

Restoring between the mentioned cluster versions should work.  
Is there a way to work around this problem, like by providing the snapshot file name explicitly?  
Thanks a lot,

M

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [November 30, 2016, 2:22pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/2 "2016-11-30T14:22:02Z")

</div>

That should work. Indeed, we switched from `snapshot-*` to `snap-*.dat` format in 2.0, but both formats should be supported for read operations. To help us diagnose the issue, could you post here the list of files in the base directory of S3 repository and the output of `curl -XPOST "http://esCluster-2.1.2/_snapshot/myRepo/_all`?

Related to this, could you also verify that you specified correct `base_path` and `bucket` in the repository settings. Was repository verification successful, when you registered it? When you try to restore and get the error back, do you see the corresponding error message in the log file on the master node? If you do, please post the entire error message with stack trace here.

---

<div class="post-metadata">

### Author: ![markcitizen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markcitizen/32/117307_2.png) [@markcitizen](https://discuss.elastic.co/u/markcitizen)
#### Post date: [November 30, 2016, 5:46pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/3 "2016-11-30T17:46:35Z")

</div>

Hello,  
The command you provided:

curl -XPOST "[http://esCluster-2.1.2/\_snapshot/myRepo/\_all](http://esCluster-2.1.2/_snapshot/myRepo/_all)"

Returns this message:

{"error":{"root\_cause":[{"type":"invalid\_snapshot\_name\_exception","reason":"[myRepo:\_all] Invalid snapshot name [_all], must not start with '_'"}],"type":"invalid\_snapshot\_name\_exception","reason":"[myRepo:\_all] Invalid snapshot name [_all], must not start with '_'"},"status":400}

I didn't have "base\_path" field in the repository creation body, only "location" field. I modified the command to use base\_path, then tried to restore the snapshot, but restore operation failed with the same error ("Blob object [snap-all\_11\_28\_2016.dat] not found: The specified key does not exist.").  
In both cases repository creation succeeded, I got this response from curl:

curl -XPUT "[http://esCluster-2.1.2/\_snapshot/myRepo](http://esCluster-2.1.2/_snapshot/myRepo)" -d '{  
"type": "s3",  
"settings": {  
"access\_key": "\*\*\*",  
"secret\_key": "\*\*\*",  
"bucket": "myBucket",  
"region": "us-west-2",  
"base-path": "mySnapshots", \<\<\< this was "location"  
"readonly": true  
}  
}'

{"acknowledged":true}

In S3 myBucket/mySnapshots folder contains the following:

index (file)  
indices (folder)  
metadata-all\_MM\_dd\_yyyy (files)  
snapshot-all\_MM\_dd\_yyyy (files)

I'm going to talk to the ops team to get the master node log output.  
Thanks a lot,

M

---

<div class="post-metadata">

### Author: ![markcitizen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markcitizen/32/117307_2.png) [@markcitizen](https://discuss.elastic.co/u/markcitizen)
#### Post date: [November 30, 2016, 6:45pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/4 "2016-11-30T18:45:41Z")

</div>

Hello,  
I pasted log entries from master node log file below. I only copied the messages that seemed relevant to repository/restore issues.  
Thanks a lot,

M

Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:445)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:177)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:82)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:41)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:98)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:185)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.cloud.aws.blobstore.S3BlobContainer.openInput(S3BlobContainer.java:109)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.blobstore.support.AbstractLegacyBlobContainer.readBlob(AbstractLegacyBlobContainer.java:62)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat.readBlob(ChecksumBlobStoreFormat.java:93)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreFormat.read(BlobStoreFormat.java:83)  
Nov 30 17:40:12 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:439)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:445)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:177)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:82)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:41)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:98)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:185)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.cloud.aws.blobstore.S3BlobContainer.openInput(S3BlobContainer.java:109)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.common.blobstore.support.AbstractLegacyBlobContainer.readBlob(AbstractLegacyBlobContainer.java:62)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat.readBlob(ChecksumBlobStoreFormat.java:93)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreFormat.read(BlobStoreFormat.java:83)  
Nov 30 17:40:54 es-master-3.novalocal docker[1538]: at org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshot(BlobStoreRepository.java:439)

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [November 30, 2016, 7:06pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/5 "2016-11-30T19:06:29Z")

</div>

Sorry, wrong command, I meant `curl -XGET "http://esCluster-2.1.2/_snapshot/myRepo/_all"` (GET instead of POST)

---

<div class="post-metadata">

### Author: ![markcitizen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markcitizen/32/117307_2.png) [@markcitizen](https://discuss.elastic.co/u/markcitizen)
#### Post date: [November 30, 2016, 7:11pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/6 "2016-11-30T19:11:11Z")

</div>

Hello,  
I executed the command you provided, it returned this message:

{"snapshots":[]}

Does that mean anything?  
Thanks a lot,

M

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [November 30, 2016, 7:36pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/7 "2016-11-30T19:36:32Z")

</div>

It means that elasticsearch doesn't see any snapshots in the path that you specified. Unless you are using an entire bucket, you need to specify correct `base_path` and it had to be spelled correctly (i.e. with underscore `base_path` and not with dash `base-path`).

---

<div class="post-metadata">

### Author: ![markcitizen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markcitizen/32/117307_2.png) [@markcitizen](https://discuss.elastic.co/u/markcitizen)
#### Post date: [November 30, 2016, 8:05pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/8 "2016-11-30T20:05:22Z")

</div>

Hello,  
It looks like that was the problem. Changing field name to "base\_path" (underscore) helped. After running the GET command you provided I was able to see a lot of snapshot entries.  
I was also able to start the restore operation.  
Thank you for your help!

M

---

<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 28, 2016, 8:05pm UTC](https://discuss.elastic.co/t/snapshot-restore-from-1-7-4-to-2-1-2-cannot-find-files/67538/9 "2016-12-28T20:05:28Z")

</div>

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