# Elasticsearch snapshot working

**URL:** <https://discuss.elastic.co/t/elasticsearch-snapshot-working/326067>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [February 21, 2023, 12:43pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-working/326067 "2023-02-21T12:43:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikrant\_Aggarwal](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@Vikrant\_Aggarwal](https://discuss.elastic.co/u/Vikrant_Aggarwal)\
**Post date:** [February 21, 2023, 12:43pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-working/326067/1 "2023-02-21T12:43:32Z")

</div>

Hello Experts,

I have theoretical question about working of ES snapshots. I know snapshots are incremental.

We have one cluster in which we are keeping the data forever, we take the snapshot on daily basis, we want to keep 30 days snapshot retention, now after 30 days when snapshot rotate then whether it does the merging of data to existing snapshot so that it avoid taking the snapshot of the data again? or it will simply delete the snapshot after retention and new snapshot again will take the backup of data?

---

<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:** [February 21, 2023, 12:51pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-working/326067/2 "2023-02-21T12:51:19Z")

</div>

> [@Vikrant\_Aggarwal](#):
>
> I have theoretical question about working of ES snapshots. I know snapshots are incremental.

Each snapshot is a full snapshot of all the data in the cluster. The incremental aspect you are referring to is that any segments within a shard that have already been snapshotted will not be copied again, which means only new data is copied over when the snapshot is taken. The snapshot however links to and reuses already stored segments, so these will not be deleted if the snapshot where these were originally copied is removed.

---

<div class="post-metadata">

**Author:** ![Vikrant\_Aggarwal](https://avatars.discourse-cdn.com/v4/letter/v/f14d63/32.png) [@Vikrant\_Aggarwal](https://discuss.elastic.co/u/Vikrant_Aggarwal)\
**Post date:** [February 21, 2023, 1:41pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-working/326067/3 "2023-02-21T13:41:32Z")

</div>

thanks Christian,

- Let's say that index created on indices-20230201 deleted on 8th Feb (weekly policy), snapshots after 8th Feb will not have reference for this snapshot, if we delete snapshots older than 8th Feb then reference of this index will be gone from all snapshots.. right?

- If indices-20230201 retained forever then even if we delete all the snapshots excepts latest one we can still restore the index. am i correct in my understanding?

---

<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:** [February 21, 2023, 2:01pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-working/326067/4 "2023-02-21T14:01:38Z")

</div>

> [@Vikrant\_Aggarwal](#):
>
> Let's say that index created on indices-20230201 deleted on 8th Feb (weekly policy), snapshots after 8th Feb will not have reference for this snapshot, if we delete snapshots older than 8th Feb then reference of this index will be gone from all snapshots.. right?

Each snapshot contains the data that is available in the cluster when it was taken. If an index is deleted, snapshots generated after that time will no longer contain that index. If the oldest snapshot you have was taken after the index was deleted, you no longer have access to that index.

---

<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:** [March 21, 2023, 2:01pm UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-working/326067/5 "2023-03-21T14:01:38Z")

</div>

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