# Backup and update the document

**URL:** https://discuss.elastic.co/t/backup-and-update-the-document/361338
**Category:** Elasticsearch
**Created:** [June 12, 2024, 2:37pm UTC](https://discuss.elastic.co/t/backup-and-update-the-document/361338 "2024-06-12T14:37:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![shrm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shrm/32/131044_2.png) [@shrm](https://discuss.elastic.co/u/shrm)
#### Post date: [June 12, 2024, 2:37pm UTC](https://discuss.elastic.co/t/backup-and-update-the-document/361338/1 "2024-06-12T14:37:34Z")

</div>

How to backup the documents and restore them if I change my mind after updating them?  
I want to make an update from the current data with some new fields. The content of the document is huge and if I want to reverse the update, I don't want to insert them from scratch.  
I am aware of the Snapshot system, but I am not sure if I make a snapshot and then update the contents, can I later go back to the snapshot and retrieve the none updated contents?

I am using the local linux version of ELK [elasticsearch-8.13.2-linux-x86\_64]  
Please address the solution in complete keywords that I can find it in the documentation.  
Thanks

---

<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: [June 12, 2024, 8:50pm UTC](https://discuss.elastic.co/t/backup-and-update-the-document/361338/2 "2024-06-12T20:50:49Z")

</div>

> [@shrm](#):
>
> but I am not sure if I make a snapshot and then update the contents, can I later go back to the snapshot and retrieve the none updated contents?

That's correct. If you take a snapshot before the update, then you can restore the index in the state it was before the update.

---

<div class="post-metadata">

### Author: ![shrm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shrm/32/131044_2.png) [@shrm](https://discuss.elastic.co/u/shrm)
#### Post date: [June 13, 2024, 12:13pm UTC](https://discuss.elastic.co/t/backup-and-update-the-document/361338/3 "2024-06-13T12:13:15Z")

</div>

Thanks for the response @dadoonet  
Do you have any suggestions on the best method to make a snapshot in the local service?  
I found [this](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html) on the official website but that is focused on the cloud services. The other [page](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html) is more comprehensive but as I am a newbie I am not sure if it is fit to my question.

---

<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: [June 13, 2024, 12:22pm UTC](https://discuss.elastic.co/t/backup-and-update-the-document/361338/4 "2024-06-13T12:22:30Z")

</div>

Basically:

- [Create a repository](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-filesystem-repository.html)
- [Create a Snapshot](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html)
- Do your tests or whatever

And if you decide to cancel this:

- Delete the index
- [Restore the snapshot](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-restore-snapshot.html)

If you are blocked at one of the steps, please share what is the issue or what you don't understand from the documentation. We'll be happy to help.

I'd recommend to practice this first on a non production cluster.
