# Repository Fuctionality

**URL:** <https://discuss.elastic.co/t/repository-fuctionality/163626>\
**Category:** Elasticsearch\
**Created:** [January 9, 2019, 10:02pm UTC](https://discuss.elastic.co/t/repository-fuctionality/163626 "2019-01-09T22:02:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![srgeek1](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@srgeek1](https://discuss.elastic.co/u/srgeek1)\
**Post date:** [January 9, 2019, 10:02pm UTC](https://discuss.elastic.co/t/repository-fuctionality/163626/1 "2019-01-09T22:02:45Z")

</div>

Setup:  
If I create repository and put daily snapshot in it then on the 31st day start deleting the oldest snap and continue to do this day after day without end. Each day create a new snapshot and delete the oldest one.  
The documentation says even if a snapshot is deleted that data is not deleted if it is needed by subsequent snapshots.

Questions:  
Does this mean that the repository will always contain what is necessary to do a full restore?  
Does it also mean that the repository will just continue to grow in size regardless of how many of the daily snapshaots are deleted from it provided the most current one is  
always retained?

Say after a year of using the first repository in above scenario a second repository is created when the first snapshot is put into it will that snapshot be a complete snapshot or incremental ?

Is there a way to delete a repository?

---

<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:** [January 9, 2019, 10:21pm UTC](https://discuss.elastic.co/t/repository-fuctionality/163626/2 "2019-01-09T22:21:15Z")

</div>

> [@srgeek1](#):
>
> Does this mean that the repository will always contain what is necessary to do a full restore?

Yes. All needed segments referenced by a snapshot will remain.

> [@srgeek1](#):
>
> Does it also mean that the repository will just continue to grow in size regardless of how many of the daily snapshaots are deleted from it provided the most current one is  
> always retained?

If some segments are not referenced anymore by any snapshots they will be removed.

If you create a new repository it will create a full backup again.

---

<div class="post-metadata">

**Author:** ![srgeek1](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@srgeek1](https://discuss.elastic.co/u/srgeek1)\
**Post date:** [January 10, 2019, 7:08pm UTC](https://discuss.elastic.co/t/repository-fuctionality/163626/3 "2019-01-10T19:08:31Z")

</div>

Is there a way to delete a repostiroy? I see the command for deleting sanpshots but nothing for a repository

---

<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:** [January 10, 2019, 9:21pm UTC](https://discuss.elastic.co/t/repository-fuctionality/163626/4 "2019-01-10T21:21:34Z")

</div>

```
DELETE /_snapshot/my_backup
```

---

<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:** [February 7, 2019, 9:21pm UTC](https://discuss.elastic.co/t/repository-fuctionality/163626/5 "2019-02-07T21:21:43Z")

</div>

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