# Snapshots - guarantee of correctness?

**URL:** <https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025>\
**Category:** Elasticsearch\
**Created:** [December 8, 2020, 4:25pm UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025 "2020-12-08T16:25:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rysiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rysiu/32/61919_2.png) [@Rysiu](https://discuss.elastic.co/u/Rysiu)\
**Post date:** [December 8, 2020, 4:25pm UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025/1 "2020-12-08T16:25:15Z")

</div>

Are the snapshots made by elasticsearch surely not to have any errors?

Is there any additional option to quickly check the correctness of generated snapshots?

---

<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:** [December 8, 2020, 7:08pm UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025/2 "2020-12-08T19:08:27Z")

</div>

> [@Rysiu](#):
>
> Are the snapshots made by elasticsearch surely not to have any errors?

We verify the checksum of every file uploaded to the repository, and verify the checksums again on restore. We can't guarantee that your repository works perfectly of course, that's on you, but at least we will report any errors that it introduces.

> [@Rysiu](#):
>
> Is there any additional option to quickly check the correctness of generated snapshots?

Not really, you're expected to take responsibility for the integrity of the data sitting in your repository. If in doubt, use one of the big cloud providers (AWS S3, Google Cloud Storage etc) since they're very reliable.

---

<div class="post-metadata">

**Author:** ![Rysiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rysiu/32/61919_2.png) [@Rysiu](https://discuss.elastic.co/u/Rysiu)\
**Post date:** [December 15, 2020, 5:58am UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025/3 "2020-12-15T05:58:10Z")

</div>

> We verify the checksum of every file uploaded to the repository

Can I somehow "manually" check the checksum of a file uploaded? (correctness)

I have a snapshot made for some resources.  
I can make a checksum for snapshot files.

How can I calculate the checksum for indexes/shards in Elasticsearch?

---

<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:** [December 15, 2020, 6:30am UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025/4 "2020-12-15T06:30:45Z")

</div>

> [@Rysiu](#):
>
> Can I somehow "manually" check the checksum of a file uploaded? (correctness)

Not directly, no, but you can get Elasticsearch to check all the checksums in a snapshot at once by restoring it into an empty cluster.

---

<div class="post-metadata">

**Author:** ![Rysiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rysiu/32/61919_2.png) [@Rysiu](https://discuss.elastic.co/u/Rysiu)\
**Post date:** [December 15, 2020, 6:47am UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025/5 "2020-12-15T06:47:59Z")

</div>

So I understand that Elasticsearch itself, automatically calculates checksums of all snapshot files after snapshot execution (in "Taking snapshot")? If the sums are not correct then Elasticsearch will return the error in snapshot status and I will see it in Kibana (snapshot section)?

---

<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:** [December 15, 2020, 7:35am UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025/6 "2020-12-15T07:35:35Z")

</div>

> If the sums are not correct then Elasticsearch will return the error in snapshot status and I will see it in Kibana (snapshot section)?

Yes that's correct.

In addition, it will also mark that copy of the shard as corrupt so that it is not used for any future searches or indexing. If there's a replica then it's promoted to primary and used to rebuild the failed copy; if there's no replica then your cluster health goes `red`.

---

<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:** [January 12, 2021, 7:35am UTC](https://discuss.elastic.co/t/snapshots-guarantee-of-correctness/258025/7 "2021-01-12T07:35:43Z")

</div>

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