# Missing Snapshot Error

**URL:** https://discuss.elastic.co/t/missing-snapshot-error/134485
**Category:** Elasticsearch
**Created:** [June 4, 2018, 8:32pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485 "2018-06-04T20:32:13Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![MPurcell](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@MPurcell](https://discuss.elastic.co/u/MPurcell)
#### Post date: [June 4, 2018, 8:32pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/1 "2018-06-04T20:32:13Z")

</div>

I'm trying to use curator to delete all snapshots older then a 100 days in my repository. I noticed it was failing with the error message:

`Failed to complete action: delete_snapshots. <class 'curator.exceptions.FailedExecution'>: Unable to get snapshot information from repository: dcselasticsnapshot. Error: TransportError(500, 'snapshot_exception', '[dcselasticsnapshot:citydirectory_ocrpages/XGftDvzIRPGe_wMfN6FsSw] is missing')`

Looking into this further, I went and tried to list all snapshots that are currently in the repo:

```
GET /_cat/snapshots/dcselasticsnapshot?v&s=id

```

This again failed which proves to me it's not an issue with Curator but rather an issue with the snapshot API and the metadata associated with that. Intrigued, I tried to delete the snapshot, and not surprisingly I get the following:

```
{
  "error": {
    "root_cause": [
      {
        "type": "snapshot_missing_exception",
        "reason": "[dcselasticsnapshot:citydirectory_ocrpages/XGftDvzIRPGe_wMfN6FsSw] is missing"
      }
    ],
    "type": "snapshot_missing_exception",
    "reason": "[dcselasticsnapshot:citydirectory_ocrpages/XGftDvzIRPGe_wMfN6FsSw] is missing",
    "caused_by": {
      "type": "no_such_file_exception",
      "reason": "Blob object [snap-XGftDvzIRPGe_wMfN6FsSw.dat] not found: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: 26ED0010FAD1957E; S3 Extended Request ID: mC8EZfdWuubobpZndQGLi38t84Ni9EmDMc6kJzburYBGLhZijEtu5BUPluC4aq5hDHd5HcEN2l0=)"
    }
  },
  "status": 404
}

```

I tried to create a new snapshot with the missing name in order to delete it, hoping it would override the existing snapshot somehow. I get the following error, saying the snapshot already exists!

```
{
  "error": {
    "root_cause": [
      {
        "type": "invalid_snapshot_name_exception",
        "reason": "[dcselasticsnapshot:citydirectory_ocrpages] Invalid snapshot name [citydirectory_ocrpages], snapshot with the same name already exists"
      }
    ],
    "type": "invalid_snapshot_name_exception",
    "reason": "[dcselasticsnapshot:citydirectory_ocrpages] Invalid snapshot name [citydirectory_ocrpages], snapshot with the same name already exists"
  },
  "status": 400

```

}

Is there a way to delete this, so the curator script runs properly? Or even so listing all the snapshots in the repo works? I believe this is the case of a missing meta pointer. I tried looking in the repo for the actual data associated with the snapshot, but couldn't find it. If I was able to find it, would deleting the individual data/meta for the snapshot clear up this problem? FYI I'm trying to avoid deleted the entire repo and starting over, as there are many current/useful backups located there. Thanks for any/all help.

---

<div class="post-metadata">

### Author: ![MPurcell](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@MPurcell](https://discuss.elastic.co/u/MPurcell)
#### Post date: [June 4, 2018, 8:33pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/2 "2018-06-04T20:33:01Z")

</div>

4 node cluster, 3 data, 1 master. s3 backup is on AWS - bucket is named 'dcselasticsnapshot'.

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [June 4, 2018, 9:52pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/3 "2018-06-04T21:52:18Z")

</div>

A `500` error indicates something is wrong at the server level. Elasticsearch is perhaps having difficulty communicating with S3.

What happens if you run:

```auto
GET /_cat/snapshots/dcselasticsnapshot/

```

...without the extra stuff?

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [June 4, 2018, 10:16pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/4 "2018-06-04T22:16:39Z")

</div>

For that matter, what do you get if you run:

```auto
GET /_cat/repositories

```

---

<div class="post-metadata">

### Author: ![MPurcell](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@MPurcell](https://discuss.elastic.co/u/MPurcell)
#### Post date: [June 5, 2018, 1:38pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/5 "2018-06-05T13:38:41Z")

</div>

Hey @theuntergeek, thanks for responding. When I run:

> GET /\_cat/snapshots/dcselasticsnapshot/

I receive the following response:

```
{
  "error": {
    "root_cause": [
      {
        "type": "snapshot_missing_exception",
        "reason": "[dcselasticsnapshot:citydirectory_ocrpages/XGftDvzIRPGe_wMfN6FsSw] is missing"
      }
    ],
    "type": "snapshot_exception",
    "reason": "[dcselasticsnapshot:citydirectory_ocrpages/XGftDvzIRPGe_wMfN6FsSw] Snapshot could not be read",
    "caused_by": {
      "type": "snapshot_missing_exception",
      "reason": "[dcselasticsnapshot:citydirectory_ocrpages/XGftDvzIRPGe_wMfN6FsSw] is missing",
      "caused_by": {
        "type": "no_such_file_exception",
        "reason": "Blob object [snap-XGftDvzIRPGe_wMfN6FsSw.dat] not found: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: F53FFCB60B165355; S3 Extended Request ID: HLrbreo3Y/a0w1mHTqtLx83AZH58Mm9li1lEjRzK+FsMAWfEqOYLM7jfIrEVuyERjPf5c1dJSZU=)"
      }
    }
  },
  "status": 500
}

```

When I run:

> GET /\_cat/repositories?v

I receive the following response:

```
id type
dcselasticsnapshot s3

```

Let me know if there's anything else you need. I look forward to hearing back from you, thanks! And FYI I'm currently still putting new snapshots in this s3 repo, with success in restoring them in other clusters.

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [June 5, 2018, 1:40pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/6 "2018-06-05T13:40:38Z")

</div>

You may be stuck there. The issue sounds to me like something changed or did not propagate properly in the S3 bucket that the repository metadata thinks should be there. I personally know of no way to correct that. If it were me, I'd start with a fresh repository in a different bucket.

---

<div class="post-metadata">

### Author: ![MPurcell](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@MPurcell](https://discuss.elastic.co/u/MPurcell)
#### Post date: [June 5, 2018, 1:47pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/7 "2018-06-05T13:47:24Z")

</div>

Oh No- I had a feeling you were going to say that 😶. Do I need to create the repo in a different bucket in order to fix the problem, or can I just delete what's in the existing bucket manually or via commands to the cluster.

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [June 5, 2018, 2:20pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/8 "2018-06-05T14:20:11Z")

</div>

If you delete the contents of the bucket, and also delete the repository from Elasticsearch, you should be able to re-use it by re-creating the repository.

---

<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 3, 2018, 2:26pm UTC](https://discuss.elastic.co/t/missing-snapshot-error/134485/9 "2018-07-03T14:26:48Z")

</div>

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