# Checking elasticsearch backups

**URL:** <https://discuss.elastic.co/t/checking-elasticsearch-backups/335955>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [June 14, 2023, 8:54am UTC](https://discuss.elastic.co/t/checking-elasticsearch-backups/335955 "2023-06-14T08:54:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hopa56](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@hopa56](https://discuss.elastic.co/u/hopa56)\
**Post date:** [June 14, 2023, 8:54am UTC](https://discuss.elastic.co/t/checking-elasticsearch-backups/335955/1 "2023-06-14T08:54:10Z")

</div>

i have Elasticsearch on which snapshots are taken daily, there is also a separately Elasticsearch which every day is restored by a script from the last snapshot and after restoration sends to the mail how much space the data takes up on the disk and how many documents in each index which gives an approximate a picture of the fact that everything is OK with the backup, it is intact and you can compare this data with Production in terms of the occupied disk space and the number of documents in the database

But I want to finalize the check, and write a service that, after restoration, will “go” to the data on Production and compare them (from some index) between the backup and the live system (diff?), And if there is a discrepancy, then alert to the mail or some other channel

what else can be added here? I want to make a full check of backups for recovery

---

<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:** [June 14, 2023, 9:37am UTC](https://discuss.elastic.co/t/checking-elasticsearch-backups/335955/2 "2023-06-14T09:37:30Z")

</div>

All the files in a snapshot include a checksum, and the restore process involves verifying the checksum of every file restored, so if the restore succeeds you can be pretty confident that your data is intact.

I don't think there's an elegant way to diff the contents of two indices, you'd just have to dump their contents out into an external tool.

---

<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:** [July 12, 2023, 9:37am UTC](https://discuss.elastic.co/t/checking-elasticsearch-backups/335955/3 "2023-07-12T09:37:46Z")

</div>

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