# Restore snapshot from remote fails to find snapshot

**URL:** <https://discuss.elastic.co/t/restore-snapshot-from-remote-fails-to-find-snapshot/258411>\
**Category:** Elasticsearch\
**Created:** [December 11, 2020, 12:19pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-remote-fails-to-find-snapshot/258411 "2020-12-11T12:19:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![haarts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haarts/32/2972_2.png) [@haarts](https://discuss.elastic.co/u/haarts)\
**Post date:** [December 11, 2020, 12:19pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-remote-fails-to-find-snapshot/258411/1 "2020-12-11T12:19:08Z")

</div>

Dear readers,

I have two clusters. One I'll call 'remote', the other 'local'.  
I have successfully created a snapshot called 'snapshot\_1' in the repository 'my\_backup' on the remote cluster.  
I'm trying to follow the instructions here: [Restore a snapshot | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-restore-snapshot.html#_restoring_to_a_different_cluster)  
It states:

> Therefore, it’s possible to restore a snapshot created from one cluster into another cluster by registering the repository that contains the snapshot in the new cluster and starting the restore process.

So on my local cluster I do that with:

```auto
    $ curl -X PUT "localhost:9201/_snapshot/my_local_backup?pretty" -H 'Content-Type: application/json' -d'
  {
    "type": "url",
    "settings": {
      "url": "http://<remote>:9200/_snapshot/my_backup"
    }
  }'

```

This seems to work. Please pay attention to the `url` key, I am not sure that is correct.

When trying to restore a snapshot I do:

```auto
    $ curl -X POST "localhost:9201/_snapshot/my_local_backup/snapshot_1/_restore?pretty"

```

This fails with:

```auto
    {
      "error" : {
        "root_cause" : [
          {
            "type" : "snapshot_restore_exception",
            "reason" : "[my_local_backup:snapshot_1] snapshot does not exist"
          }
        ],
        "type" : "snapshot_restore_exception",
        "reason" : "[my_local_backup:snapshot_1] snapshot does not exist"
      },
      "status" : 500
    }

```

What I expected to happen is that when I try to restore a snapshot on the local cluster is that Elasticsearch would query the remote cluster somehow to find the snapshot. Perhaps that is a misunderstanding?

I have set the env var: `repositories.url.allowed_urls=http://elasticsearch:9200`

I'm running the latest version/7.9.3.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 11, 2020, 12:41pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-remote-fails-to-find-snapshot/258411/2 "2020-12-11T12:41:12Z")

</div>

> [@haarts](#):
>
> Please pay attention to the `url` key, I am not sure that is correct.

Nor am I ...

> [@haarts](#):
>
> What I expected to happen is that when I try to restore a snapshot on the local cluster is that Elasticsearch would query the remote cluster somehow to find the snapshot. Perhaps that is a misunderstanding?

Yes, that's not how this works. Elasticsearch doesn't expose the repository contents over HTTP. If you want to use the [read-only URL repository](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-read-only-repository) then you need to set up a separate webserver that exposes the repository contents.

---

<div class="post-metadata">

**Author:** ![haarts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haarts/32/2972_2.png) [@haarts](https://discuss.elastic.co/u/haarts)\
**Post date:** [December 11, 2020, 1:36pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-remote-fails-to-find-snapshot/258411/3 "2020-12-11T13:36:04Z")

</div>

Excellent! Then I know what is wrong.

In order to 'expose' the repository content would that be as easy as hosting the content of `/usr/share/elasticsearch/backup` somewhere?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 11, 2020, 2:19pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-remote-fails-to-find-snapshot/258411/4 "2020-12-11T14:19:48Z")

</div>

Yes that's right

---

<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:** [January 8, 2021, 2:20pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-remote-fails-to-find-snapshot/258411/5 "2021-01-08T14:20:01Z")

</div>

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