# Elasticsearch cannot restore existing snapshot. Blob not found

**URL:** <https://discuss.elastic.co/t/elasticsearch-cannot-restore-existing-snapshot-blob-not-found/335506>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [June 8, 2023, 6:18am UTC](https://discuss.elastic.co/t/elasticsearch-cannot-restore-existing-snapshot-blob-not-found/335506 "2023-06-08T06:18:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naresh1919](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Naresh1919](https://discuss.elastic.co/u/Naresh1919)\
**Post date:** [June 8, 2023, 6:18am UTC](https://discuss.elastic.co/t/elasticsearch-cannot-restore-existing-snapshot-blob-not-found/335506/1 "2023-06-08T06:18:15Z")

</div>

Elasticsearch version: 6.3.2

I was trying to restore an old snapshot (taken in January 2018) of a read only S3 repository. The necessary permissions in the IAM role for the instance are setup.

Here is the repository definition:

```auto
{
  "production_copy_old": {
    "type": "s3",
    "settings": {
      "bucket": "elasticsearch-snapshot",
      "protocol" : "https"
       "region" : "us-east-1"
      "max_snapshot_bytes_per_sec" : "100mb"
    }
  }
}

```

The repository is setup well, because when I issue the GET snapshot on the repository, I get the right response:

```auto
GET _snapshot/production_copy_old/elasticsearch-snapshot-201804190000
{
  "snapshots": [
    {
      "snapshot": "elasticsearch-snapshot-201804190000",
      "uuid": "fT0oftdTQhi5sns704pg45",
      "version_id": 5020299,
      "version": "5.2.2",
      "indices": [<huge list of indices>],
      "state": "SUCCESS",
      "start_time": "2018-04-19T00:00:20.726Z",
      "start_time_in_millis": 1524096020726,
      "end_time": "2018-04-19T00:09:30.210Z",
      "end_time_in_millis": 1524096570210,
      "duration_in_millis": 549484,
      "failures": [],
      "shards": {
        "total": 2875,
        "failed": 0,
        "successful": 2875
      }
    }
  ]
}

```

However, when I try to restore a snapshot, I get an error:

```auto
POST _snapshot/production_copy_old/elasticsearch-snapshot-201804190000/_restore
{
  "indices": "myindex-201801",
  "ignore_unavailable": false,
  "include_global_state": false,
  "index_settings": {
    "index.number_of_replicas": 0
  }
}

{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[s-elasticsearch-2][IP:9300][cluster:admin/snapshot/restore]"
      }
    ],
    "type": "no_such_file_exception",
    "reason": "Blob object [meta-fT0oftdTQhi5ns70paP4pg.dat] not found: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID:<reqid>; S3 Extended Request ID:<extended-req-id)"
  },
  "status": 500
}

```

However, when I try `aws s3 ls elasticsearch-snapshot/meta-fT0oftdTQhi5ns70paP4pg.dat`, I see that the instance is able to see the object and also download it. From this we can know that the permissions are setup correctly.

Is there any way we can work around this? Do i have to change the prefix?

---

<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, 2023, 6:19am UTC](https://discuss.elastic.co/t/elasticsearch-cannot-restore-existing-snapshot-blob-not-found/335506/2 "2023-07-06T06:19:04Z")

</div>

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