# Write the same data to two S3 repositories?

**URL:** <https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [April 19, 2023, 12:42pm UTC](https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306 "2023-04-19T12:42:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeod](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jeod](https://discuss.elastic.co/u/jeod)\
**Post date:** [April 19, 2023, 12:42pm UTC](https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306/1 "2023-04-19T12:42:06Z")

</div>

Hi Guys,

Is it possible to create 2 x S3 repositories, and join or link both repositories as my frozen tier?.  
We have two local 2 DCs with S3 object storage in each DC. - So I would like to have my frozen-tier represented as a bucket from each system.. in case of a DC outage, I was hoping elastic could then reach its data in the bucket still online... This would require me to make sure elastic writes the data twice.. so was hoping it was possible 🙂

Thanks for the input.

---

<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:** [April 19, 2023, 1:41pm UTC](https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306/2 "2023-04-19T13:41:34Z")

</div>

Welcome!

You can create 2 repositories and start 2 snapshots in parallel but I don't think you can "link" them.

You can mount only one repository for a given index. So in case of "failure", you would need to manually mount the other repo.

Or you can mount both repositories using a renamed index. In which case you will have to switch the index name in case of failure.

---

<div class="post-metadata">

**Author:** ![jeod](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jeod](https://discuss.elastic.co/u/jeod)\
**Post date:** [April 19, 2023, 4:21pm UTC](https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306/3 "2023-04-19T16:21:08Z")

</div>

Hi David,

Thanks a lot - that path should get me what I want to achieve.

And we will save a loadbalancer, in the process as well - as we can now handle it all from elastic.

Just 1 follow up question, when we write in parallel, and mount both repositories with the renamed index approach as you explained, does elastic support the clean up of both mounted repositories if a retention is set at 180 days. After that I need to make sure the aged snapshots are gone.

Thanks,

Br  
Jeppe

---

<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:** [April 19, 2023, 5:09pm UTC](https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306/4 "2023-04-19T17:09:43Z")

</div>

Each repository will need its own cleanup jobs. That means one SLM policy per repository.

---

<div class="post-metadata">

**Author:** ![jeod](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jeod](https://discuss.elastic.co/u/jeod)\
**Post date:** [April 21, 2023, 8:00am UTC](https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306/5 "2023-04-21T08:00:39Z")

</div>

Thanks David 🙂

---

<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:** [May 19, 2023, 8:00am UTC](https://discuss.elastic.co/t/write-the-same-data-to-two-s3-repositories/330306/6 "2023-05-19T08:00:46Z")

</div>

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