# 404 - missing repository error when trying to restore snapshot

**URL:** <https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474>\
**Category:** Elasticsearch\
**Created:** [December 19, 2018, 8:55am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474 "2018-12-19T08:55:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eva](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@Eva](https://discuss.elastic.co/u/Eva)\
**Post date:** [December 19, 2018, 8:55am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/1 "2018-12-19T08:55:43Z")

</div>

Hello there

I have an ES cluster with 2 nodes and i'm now switching to AWS ES domain and trying to migrate existing ELK logs to new AWS domain. I have registered a repo and also taken a snapshot of existing ES cluster but when restoring this snapshot to new ES domain i see below error.

{"error":{"root\_cause":[{"type":"repository\_missing\_exception","reason":"[news3repository] missing"}],"type":"repository\_missing\_exception","reason":"[news3repository] missing"},"status":404}

I use below command -

curl -X POST '\<new\_ES\_domain\_Endpoint\>/\_snapshot/news3repository/\<snapshot\_name\>/\_restore'

When i run the below, i see two repos that were created:

curl -X GET ":9200/\_snapshot/\_all"

{"my\_s3\_repository":{"type":"s3","settings":{"bucket":"XXXXXX","secret\_key":"XXXXXX","region":"XXXX","access\_key":"XXXXX"}},"news3repository":{"type":"s3","settings":{"bucket":"XXXXXX","secret\_key":"XXXXXX","region":"XXXXXX","access\_key":"XXXXXX"}}}

but why is the 404 error coming up when posting to a new ES domain endpoint. Kindly help

Thanks

---

<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:** [December 19, 2018, 9:19am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/3 "2018-12-19T09:19:00Z")

</div>

Are you sure that the command

```auto
curl -X GET ":9200/_snapshot/_all"

```

is run on the new cluster and not the old one?  
Did you create the repository in the new cluster?

Also which version are you using? Anything in logs?

---

<div class="post-metadata">

**Author:** ![Eva](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@Eva](https://discuss.elastic.co/u/Eva)\
**Post date:** [December 19, 2018, 9:25am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/4 "2018-12-19T09:25:46Z")

</div>

Hi David  
Thank you for the response.

I created repo on the old cluster [old cluster is on 2 separate EC2 instances], created a repo and took a snapshot. Now i want to switch to new AWS Elasticsearch domain and I am trying to migrate old elk cluster logs to this new AWS ES Domain. For this i'm now trying to use the old cluster snapshot to new AWS Elasticsearch domain.

Hope this is more clear.

And the commands are run on old cluster. how do i migrate them to my new AWS ES domain.

---

<div class="post-metadata">

**Author:** ![Eva](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@Eva](https://discuss.elastic.co/u/Eva)\
**Post date:** [December 19, 2018, 9:26am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/5 "2018-12-19T09:26:29Z")

</div>

to add to, i'm using version 5.6 for both old cluster and new AWS ES domain

---

<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:** [December 19, 2018, 9:43am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/6 "2018-12-19T09:43:52Z")

</div>

How the new cluster could be aware of the repository if you don't create it?

Create the repo on the new cluster first.

---

<div class="post-metadata">

**Author:** ![Eva](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@Eva](https://discuss.elastic.co/u/Eva)\
**Post date:** [December 19, 2018, 10:13am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/7 "2018-12-19T10:13:54Z")

</div>

Ok, so i need to create a repo on new cluster and then take a snapshot of old cluster ?

---

<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:** [December 19, 2018, 10:26am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/8 "2018-12-19T10:26:41Z")

</div>

I believe you already created a snapshot of the old cluster so the last step is not needed.

---

<div class="post-metadata">

**Author:** ![Eva](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@Eva](https://discuss.elastic.co/u/Eva)\
**Post date:** [December 20, 2018, 7:37am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/9 "2018-12-20T07:37:54Z")

</div>

Hi David

I tried couple of times and i get this error when i register the repo on new AWS ES domain:

{"Message":"User: anonymous is not authorized to perform: iam:PassRole on resource: arn:aws:iam::--------------------"}

What is the issue here.

Thanks!

---

<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:** [December 20, 2018, 8:32am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/10 "2018-12-20T08:32:44Z")

</div>

I'm not AWS expert and I'm not sure where this message is coming from and how but I'd say that you need to check your credentials in elasticsearch (did you set up the client as well?) and in AWS?

I'd need to understand **exactly** what you are doing to assist further.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 20, 2018, 8:35am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/11 "2018-12-20T08:35:11Z")

</div>

I believe you are using the AWS ES service, is that correct? In that case this may be due to limitations or constraints imposed by their service, so you may want to also raise this with AWS support.

---

<div class="post-metadata">

**Author:** ![Eva](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@Eva](https://discuss.elastic.co/u/Eva)\
**Post date:** [December 20, 2018, 9:43am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/12 "2018-12-20T09:43:14Z")

</div>

Thank you for the response!

That's right! I'm now using AWS ES domain. This is the new domain that I'm going to configure and I require my old ELK(I have a cluster with 2 nodes run on 2 different EC2 instances) logs to be migrated to this new AWS ES domain. For this, as the procedure says I have registered a repository and taken a snapshot of old ES cluster. Now as David mentioned I'm trying to register the repository on new AWS ES endpoint, where I'm failing with the mentioned error.

---

<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:** [December 20, 2018, 10:40am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/13 "2018-12-20T10:40:38Z")

</div>

Did you look at [https://www.elastic.co/cloud](https://www.elastic.co/cloud) and [https://aws.amazon.com/marketplace/pp/B01N6YCISK](https://aws.amazon.com/marketplace/pp/B01N6YCISK) ?

Cloud by elastic is one way to have access to all features, all managed by us. Think about what is there yet like Security, Monitoring, Reporting, SQL, Canvas...

---

<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 17, 2019, 10:40am UTC](https://discuss.elastic.co/t/404-missing-repository-error-when-trying-to-restore-snapshot/161474/14 "2019-01-17T10:40:38Z")

</div>

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