# List all the stale data that is no longer referenced by existing snapshots

**URL:** <https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-searchable-snapshots\
**Created:** [May 3, 2021, 1:17pm UTC](https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988 "2021-05-03T13:17:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aeres-u99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aeres-u99/32/88139_2.png) [@Aeres-u99](https://discuss.elastic.co/u/Aeres-u99)\
**Post date:** [May 3, 2021, 1:17pm UTC](https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988/1 "2021-05-03T13:17:23Z")

</div>

We have a small setup where in we have been taking snapshots since last two years and I would like to clean it up to make some storage space on our backup server.  
I was going through this documentation  
[Clean up snapshots repo api](https://www.elastic.co/guide/en/elasticsearch/reference/current/clean-up-snapshot-repo-api.html)  
but sadly it doesn't shows a way by which I can view the stale data before cleaning them up.  
Is there any means by which I can view a list of stale data before deletion? I would also like to control the parameters of age of stale data.

---

<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:** [May 3, 2021, 2:06pm UTC](https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988/2 "2021-05-03T14:06:06Z")

</div>

> [@Aeres-u99](#):
>
> it doesn't shows a way by which I can view the stale data before cleaning them up

The the cleanup snapshot repository API only removes completely unusable data: it exists only as a workaround for a bug in older versions, and normally it does nothing since there's nothing for it to clean up. It is not meaningful to ask to view the data it would delete.

---

<div class="post-metadata">

**Author:** ![Aeres-u99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aeres-u99/32/88139_2.png) [@Aeres-u99](https://discuss.elastic.co/u/Aeres-u99)\
**Post date:** [May 3, 2021, 2:59pm UTC](https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988/3 "2021-05-03T14:59:04Z")

</div>

I see, thank you for your quick response @DavidTurner . Basically that means I won't lose any data, instead only the unusable chunk of data that is laying around? I think I misunderstood the "stale" here. Is the stale old and unusable data or corrupt data that is not in any functional state?

---

<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:** [May 3, 2021, 5:24pm UTC](https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988/4 "2021-05-03T17:24:13Z")

</div>

Yes that's correct, you won't lose anything of value via this API.

---

<div class="post-metadata">

**Author:** ![Aeres-u99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aeres-u99/32/88139_2.png) [@Aeres-u99](https://discuss.elastic.co/u/Aeres-u99)\
**Post date:** [May 3, 2021, 5:48pm UTC](https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988/5 "2021-05-03T17:48:34Z")

</div>

Thank you, I shall close the topic.

---

<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 31, 2021, 5:49pm UTC](https://discuss.elastic.co/t/list-all-the-stale-data-that-is-no-longer-referenced-by-existing-snapshots/271988/6 "2021-05-31T17:49:18Z")

</div>

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