# Taking snapshot of existing data and restore it after some disaster

**URL:** <https://discuss.elastic.co/t/taking-snapshot-of-existing-data-and-restore-it-after-some-disaster/334174>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [May 24, 2023, 6:22am UTC](https://discuss.elastic.co/t/taking-snapshot-of-existing-data-and-restore-it-after-some-disaster/334174 "2023-05-24T06:22:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kunalhiremath](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kunalhiremath](https://discuss.elastic.co/u/kunalhiremath)\
**Post date:** [May 24, 2023, 6:22am UTC](https://discuss.elastic.co/t/taking-snapshot-of-existing-data-and-restore-it-after-some-disaster/334174/1 "2023-05-24T06:22:05Z")

</div>

I am running one node which is a master node it receives data/logs from data nodes. This node has some indices that are created when I install this master node on a server.

So the logs generated by master node and data nodes are stored in the form of indices that have been created by default by a configuration tool.

I will take the snapshot of all the indices. So when the master node goes down due to disk failure I will install a new master node in different server which will be having default indices created by that tool. When I perform restore operation it will give following error:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "snapshot_restore_exception",
        "reason": "[repo2:snapshot-wed25/AW9RLLj8RpeVK_U65Jqz-A] cannot restore index [owner] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name"
      }

```

I want the indices(with same name) which I have taken as backup to merge with the Indices with same name(created by default) in new server.

---

<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:** [May 25, 2023, 7:44am UTC](https://discuss.elastic.co/t/taking-snapshot-of-existing-data-and-restore-it-after-some-disaster/334174/2 "2023-05-25T07:44:24Z")

</div>

> [@kunalhiremath](#):
>
> I want the indices(with same name) which I have taken as backup to merge with the Indices with same name(created by default) in new server.

Restoring a snapshot can not merge indices, so that is not possible. You might however be able to restore the snapshotted indices under different names and then merge using a custom script or application.

---

<div class="post-metadata">

**Author:** ![kunalhiremath](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kunalhiremath](https://discuss.elastic.co/u/kunalhiremath)\
**Post date:** [May 25, 2023, 8:09am UTC](https://discuss.elastic.co/t/taking-snapshot-of-existing-data-and-restore-it-after-some-disaster/334174/3 "2023-05-25T08:09:26Z")

</div>

Ok I will try this.

---

<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:** [June 22, 2023, 8:10am UTC](https://discuss.elastic.co/t/taking-snapshot-of-existing-data-and-restore-it-after-some-disaster/334174/4 "2023-06-22T08:10:20Z")

</div>

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