# ElasticSearch S3 Repository : Question on what is "repository"?

**URL:** <https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138>\
**Category:** Elasticsearch\
**Created:** [March 8, 2018, 8:58pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138 "2018-03-08T20:58:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![titan1978](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@titan1978](https://discuss.elastic.co/u/titan1978)\
**Post date:** [March 8, 2018, 8:58pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138/1 "2018-03-08T20:58:43Z")

</div>

Hello,  
I'm trying to understand the nuance of "repository" when it comes to restoring a snapshot on a DIFFERENT newly constructed stack. Here's the scenario:

1. I create an ELK stack in US-EAST-1.
2. I use the PUT/snapshot/my\_repository with the { ... } approriate settings to create a respository
3. I create a snapshot successfully in this repository
4. I create an ELK stack in US-WEST-2.
5. In this newly created stack in US-WEST-2 : I first try to get all the snapshots using:  
`GET /_snapshot/my_repository/_all`  
At this point I get an exception:  
"type": "repository\_missing\_exception",  
"reason": "[my\_repository] missing"

However, if at step 5 BEFORE running that step in this new region, I do the step 2 (Create a repository with the SAME name my\_repository using the same PUT API Call) and then attempt the GET all snapshots under the repository - things magically start working!

The Question is :

1. Whenever we create a BRAND NEW ELK stack - is this create repository step mandatory ? If yes - is this like a "pre-registration" of sorts that is mandatory ?
2. How would I account for this in curator if I create a new stack that starts up a curator job (as part of DR where I would need a new stack in a different region) ? would a manual intervention on my part be needed to run this "pre-registration" step needed before curator can do its job?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 8, 2018, 9:05pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138/2 "2018-03-08T21:05:15Z")

</div>

1. Yes, an Elasticsearch cluster only knows of the repos you have defined within it's own config.
2. Yes, you want to do that as part of your setup.

Also we’ve renamed ELK to the Elastic Stack, otherwise Beats and APM feel left out! 😉 Check out [https://www.elastic.co/elk-stack](https://www.elastic.co/elk-stack)

---

<div class="post-metadata">

**Author:** ![titan1978](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@titan1978](https://discuss.elastic.co/u/titan1978)\
**Post date:** [March 8, 2018, 9:08pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138/3 "2018-03-08T21:08:17Z")

</div>

@warkolm Thank you for the quick reply. What exactly is a "repository" in this case(I'm trying to get a picture of what it is tangibly - where is it "stored" on the Elastic Stack physically)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 8, 2018, 9:12pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138/4 "2018-03-08T21:12:57Z")

</div>

It's an external thing like an S3 bucket. The only thing Elasticsearch stores is a pointer - the config - to where it can access it.

---

<div class="post-metadata">

**Author:** ![titan1978](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@titan1978](https://discuss.elastic.co/u/titan1978)\
**Post date:** [March 8, 2018, 9:15pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138/5 "2018-03-08T21:15:36Z")

</div>

@warkolm thank you! Not to be a pain 🙂 but could you specify exactly what is "external thing"? Can I look it up or see where its stored - if yes - where? I looked at the s3 bucket where my snapshots are stored and I see no indication of my repository.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 8, 2018, 9:19pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138/6 "2018-03-08T21:19:50Z")

</div>

Have a read of [https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-snapshots.html#\_repositories](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-snapshots.html#_repositories)

---

<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:** [April 5, 2018, 9:20pm UTC](https://discuss.elastic.co/t/elasticsearch-s3-repository-question-on-what-is-repository/123138/7 "2018-04-05T21:20:15Z")

</div>

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