# Issue in restoring an Elastic Snapshot

**URL:** <https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [September 19, 2023, 8:16am UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329 "2023-09-19T08:16:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![girolamo](https://avatars.discourse-cdn.com/v4/letter/g/439d5e/32.png) [@girolamo](https://discuss.elastic.co/u/girolamo)\
**Post date:** [September 19, 2023, 8:16am UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/1 "2023-09-19T08:16:06Z")

</div>

Hello there, I'm having issues restoring an elasticsearch snapshot.  
I've tried:

```auto
POST _snapshot/snapshot_repo/snap-EIHidJXeQWuHpnGfzR04Uw/_restore
{
"indices": "target_indicies"
}

```

but I've got:

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "snapshot_restore_exception",
        "reason" : "[snapshot_repo:snap-EIHidJXeQWuHpnGfzR04Uw] snapshot does not exist"
      }
    ],
    "type" : "snapshot_restore_exception",
    "reason" : "[snapshot_repo:snap-EIHidJXeQWuHpnGfzR04Uw] snapshot does not exist"
  },
  "status" : 500
}

```

Yet the .dat file is on my directory.

The snapshot was created with this CURL:  
FILE\_TM=$(date +%Y%m%d)  
curl -X PUT "http://$ELASTIC\_URL/_snapshot/myproject\_repository/snapshot_$FILE\_TM?wait\_for\_completion=true"

searching for the snapshot's uuid in the repository bucket, I've found two files  
named as such: snap-UUID.dat and meta-UUID.dat  
those are the file that I'm trying to restore.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 19, 2023, 8:59am UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/2 "2023-09-19T08:59:00Z")

</div>

Welcome!

You must use the same snapshot name you used when you created the snaphot. `snapshot$FILE_TM`.  
You can't use the UUID of the snapshot.

You can list your snapshots with:

```
GET /_cat/snapshots/snapshot_repo?v

```

---

<div class="post-metadata">

**Author:** ![girolamo](https://avatars.discourse-cdn.com/v4/letter/g/439d5e/32.png) [@girolamo](https://discuss.elastic.co/u/girolamo)\
**Post date:** [September 19, 2023, 9:11am UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/3 "2023-09-19T09:11:30Z")

</div>

Hello David and thank you for the swift reply.

My issue here is that I must run locally an instance that is running as a stateful set on a gke instance that I can't yet access.  
I do only have access to the bucket where the snapshots are stored and to the log of the job that runs the snapshot.

Therefore: running

```auto
GET /_cat/snapshots/snapshot_repo?v

```

will not return the snapshot I'm trying to restore.

---

<div class="post-metadata">

**Author:** ![girolamo](https://avatars.discourse-cdn.com/v4/letter/g/439d5e/32.png) [@girolamo](https://discuss.elastic.co/u/girolamo)\
**Post date:** [September 19, 2023, 9:14am UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/4 "2023-09-19T09:14:33Z")

</div>

Is there a way to restore an instance based only to its indexes and snapshots?  
Along with the .dat files (meta-UUID.dat and snap-UUID.dat) I do have access to those files:

index.latest  
index-1007  
indices

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 19, 2023, 9:23am UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/5 "2023-09-19T09:23:12Z")

</div>

But from which machine did you try to run this?

```auto
POST _snapshot/snapshot_repo/snap-EIHidJXeQWuHpnGfzR04Uw/_restore
{
   "indices": "target_indicies"
}

```

---

<div class="post-metadata">

**Author:** ![girolamo](https://avatars.discourse-cdn.com/v4/letter/g/439d5e/32.png) [@girolamo](https://discuss.elastic.co/u/girolamo)\
**Post date:** [September 19, 2023, 9:25am UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/6 "2023-09-19T09:25:36Z")

</div>

My local machine

---

<div class="post-metadata">

**Author:** ![girolamo](https://avatars.discourse-cdn.com/v4/letter/g/439d5e/32.png) [@girolamo](https://discuss.elastic.co/u/girolamo)\
**Post date:** [September 19, 2023, 1:19pm UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/7 "2023-09-19T13:19:25Z")

</div>

Solved, I had to import all indexes and snapshot data into a local repository. From there, snapshot started to appear.

---

<div class="post-metadata">

**Author:** ![girolamo](https://avatars.discourse-cdn.com/v4/letter/g/439d5e/32.png) [@girolamo](https://discuss.elastic.co/u/girolamo)\
**Post date:** [October 4, 2023, 3:08pm UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/8 "2023-10-04T15:08:18Z")

</div>

I've written a post about this issue. Don't know if it would be useful.

> **[How to locally restore an elastic db index](https://girolamodaschio.it/posts/how-to-restore-an-elastic-db-locally/)**
>
> How to restore an Elasticsearch Snapshot locally Introduction: This guide outlines the process of restoring a copy of an Elasticsearch snapshot on your local machine.

---

<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:** [November 1, 2023, 3:08pm UTC](https://discuss.elastic.co/t/issue-in-restoring-an-elastic-snapshot/343329/9 "2023-11-01T15:08:24Z")

</div>

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