Elasticsearch cannot restore existing snapshot. Blob not found

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:

{
  "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:

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:

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?

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