# How to restore snapshot of elasticsearch in opensearch?

**URL:** <https://forum.opensearch.org/t/how-to-restore-snapshot-of-elasticsearch-in-opensearch/23735>\
**Category:** OpenSearch\
**Tags:** discuss, configure, upgrade\
**Created:** [March 11, 2025, 10:07am UTC](https://forum.opensearch.org/t/how-to-restore-snapshot-of-elasticsearch-in-opensearch/23735 "2025-03-11T10:07:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![okm](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@okm](https://forum.opensearch.org/u/okm)\
**Post date:** [March 11, 2025, 10:07am UTC](https://forum.opensearch.org/t/how-to-restore-snapshot-of-elasticsearch-in-opensearch/23735/1 "2025-03-11T10:07:32Z")

</div>

So i have Elasticsearch version : 8.5.1,  
and Opensearch version : 2.19.1

So i try to Elasticsearch snapshot backup restore in my Opensearch but there are not working and the error and Devtool command is :

GET \_snapshot/data2/\_all

Error :

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "parsing_exception",
        "reason": "Failed to parse object: unknown field [uuid] found",
        "line": 1,
        "col": 25
      }
    ],
    "type": "repository_exception",
    "reason": "[data2] Unexpected exception when loading repository data",
    "caused_by": {
      "type": "parsing_exception",
      "reason": "Failed to parse object: unknown field [uuid] found",
      "line": 1,
      "col": 25
    }
  },
  "status": 500
}

{
  "error": {
    "root_cause": [
      {
        "type": "parsing_exception",
        "reason": "Failed to parse object: unknown field [cluster_id] found",
        "line": 1,
        "col": 25
      }
    ],
    "type": "repository_exception",
    "reason": "[data2] Unexpected exception when loading repository data",
    "caused_by": {
      "type": "parsing_exception",
      "reason": "Failed to parse object: unknown field [cluster_id] found",
      "line": 1,
      "col": 25
    }
  },
  "status": 500
}

```

```auto
so i remove the uuid and cluster_id from the index-0 in elasticsearch snapshot backup file.

{
  "min_version": "7.12.0",
  "uuid": "JZRISaHSQe6m94CwRMbhUw", ------remove
  "cluster_id": "3_flbHViRqi74JmlAbN_jg", ------remove
  "snapshots": [
    {
      "name": "namanindex-8ym_6dibswmiova2dwzbmq",
      "uuid": "yl3hfIjNTwOyif_Ng2Y29w",
      "state": 1,
      "index_metadata_lookup": {
        "ZD-u6Z8BQTejEdAoMbV3RQ": "XL6YDw7UQnGe27PsZXW7Gg-_na_-2-2-2",
        "BhLPCmp7Qv6N9lVDL2ikVg": "4kOc5z8bQiq6grifEIHwuA-_na_-2-1-1",
        "zydRluNRQhWqS9qFTutCNw": "jBHUUw56S56IlJzzeSIHdA-_na_-2-1-1",
        "TkzRY11NRSekkh5h9LyMLw": "tLCY68rfRW6y273VHy-FLw-_na_-1-1-1",
        "CQN0SRiZTBaeyCGEAzISWg": "D3rRE-WzRKiRsrO0Lk60YA-_na_-2-8-2"
      },
      "version": "8.5.1",
      "start_time_millis": 1741678300605,
      "end_time_millis": 1741678300805,
      "slm_policy": "namanindex"
    }
  ],
  "indices": {
    ".apm-custom-link": {
      "id": "zydRluNRQhWqS9qFTutCNw",
      "snapshots": [
        "yl3hfIjNTwOyif_Ng2Y29w"
      ],
      "shard_generations": [
        "0KtcMh4CSoi5aF6o2T9elw"
      ]
    },
    "naman_index": {
      "id": "TkzRY11NRSekkh5h9LyMLw",
      "snapshots": [
        "yl3hfIjNTwOyif_Ng2Y29w"
      ],
      "shard_generations": [
        "3LgTPDOLSUG8tB-vPpZadg"
      ]
    },
    ".apm-agent-configuration": {
      "id": "BhLPCmp7Qv6N9lVDL2ikVg",
      "snapshots": [
        "yl3hfIjNTwOyif_Ng2Y29w"
      ],
      "shard_generations": [
        "YxQdI9D0R0KDA32Nrd2_LA"
      ]
    },
    ".kibana_8.5.1_001": {
      "id": "CQN0SRiZTBaeyCGEAzISWg",
      "snapshots": [
        "yl3hfIjNTwOyif_Ng2Y29w"
      ],
      "shard_generations": [
        "bciihFnGSuOpnpTCwi-peg"
      ]
    },
    ".kibana_task_manager_8.5.1_001": {
      "id": "ZD-u6Z8BQTejEdAoMbV3RQ",
      "snapshots": [
        "yl3hfIjNTwOyif_Ng2Y29w"
      ],
      "shard_generations": [
        "P8VgnRbfQEuloC1THoLJoA"
      ]
    }
  },
  "index_metadata_identifiers": {
    "tLCY68rfRW6y273VHy-FLw-_na_-1-1-1": "qIkdhJUBCnInUuv4znqV",
    "jBHUUw56S56IlJzzeSIHdA-_na_-2-1-1": "qYkdhJUBCnInUuv4znqW",
    "XL6YDw7UQnGe27PsZXW7Gg-_na_-2-2-2": "qokdhJUBCnInUuv4znqV",
    "4kOc5z8bQiq6grifEIHwuA-_na_-2-1-1": "q4kdhJUBCnInUuv4znqW",
    "D3rRE-WzRKiRsrO0Lk60YA-_na_-2-8-2": "rIkdhJUBCnInUuv4znqY"
  }
}

```

so there are working perfectly but when i try to restore command in opensearch devtool like this :

GET \_snapshot/data2/\_all

output :

```auto
{
  "snapshots": [
    {
      "snapshot": "namanindex-8ym_6dibswmiova2dwzbmq",
      "uuid": "yl3hfIjNTwOyif_Ng2Y29w",
      "version_id": 8050199,
      "version": "8.5.1",
      "indices": [
        ".kibana_task_manager_8.5.1_001",
        ".apm-agent-configuration",
        ".apm-custom-link",
        "naman_index",
        ".kibana_8.5.1_001"
      ],
      "data_streams": [],
      "include_global_state": true,
      "metadata": {
        "policy": "namanindex"
      },
      "state": "SUCCESS",
      "start_time": "2025-03-11T07:31:40.605Z",
      "start_time_in_millis": 1741678300605,
      "end_time": "2025-03-11T07:31:40.805Z",
      "end_time_in_millis": 1741678300805,
      "duration_in_millis": 200,
      "failures": [],
      "shards": {
        "total": 5,
        "failed": 0,
        "successful": 5
      }
    }
  ]
}

```

```auto
POST _snapshot/data2/namanindex-8ym_6dibswmiova2dwzbmq/_restore
{
  "indices": "-.kibana_*",
  "rename_pattern": "(.+)",
  "rename_replacement": "restored_$1",
  "ignore_unavailable": true
}

output:
{
  "accepted": true
}

```

GET \_cat/shards?v

output :

index shard prirep state docs store ip node  
.ql-datasources 0 p STARTED 0 208b 10.244.12.116 opensearch-cluster-master-1  
.ql-datasources 0 r STARTED 0 208b 10.244.12.114 opensearch-cluster-master-0  
.ql-datasources 0 r STARTED 0 208b 10.244.12.110 opensearch-cluster-master-2  
.kibana\_92668751\_admin\_1 0 r STARTED 1 5.3kb 10.244.12.116 opensearch-cluster-master-1  
.kibana\_92668751\_admin\_1 0 p STARTED 1 5.3kb 10.244.12.110 opensearch-cluster-master-2  
security-auditlog-2025.03.10 0 r STARTED 969 1.1mb 10.244.12.116 opensearch-cluster-master-1  
security-auditlog-2025.03.10 0 p STARTED 969 1mb 10.244.12.110 opensearch-cluster-master-2  
security-auditlog-2025.03.11 0 r STARTED 906 1.4mb 10.244.12.116 opensearch-cluster-master-1  
security-auditlog-2025.03.11 0 p STARTED 906 1.4mb 10.244.12.110 opensearch-cluster-master-2  
top\_queries-2025.03.11-21662 0 r STARTED 34 66.2kb 10.244.12.116 opensearch-cluster-master-1  
top\_queries-2025.03.11-21662 0 p STARTED 34 66.2kb 10.244.12.114 opensearch-cluster-master-0  
om\_tadhak 0 p STARTED 1 4.4kb 10.244.12.114 opensearch-cluster-master-0  
om\_tadhak 0 r STARTED 1 4.4kb 10.244.12.110 opensearch-cluster-master-2  
om\_open 0 r STARTED 1 4.4kb 10.244.12.116 opensearch-cluster-master-1  
om\_open 0 p STARTED 1 4.4kb 10.244.12.114 opensearch-cluster-master-0  
.opendistro\_security 0 p STARTED 10 90.1kb 10.244.12.116 opensearch-cluster-master-1  
.opendistro\_security 0 r STARTED 10 90.1kb 10.244.12.114 opensearch-cluster-master-0  
.opendistro\_security 0 r STARTED 10 90.1kb 10.244.12.110 opensearch-cluster-master-2  
.kibana\_1 0 r STARTED 1 5.3kb 10.244.12.114 opensearch-cluster-master-0  
.kibana\_1 0 p STARTED 1 5.3kb 10.244.12.110 opensearch-cluster-master-2  
.plugins-ml-config 0 p STARTED 1 4kb 10.244.12.116 opensearch-cluster-master-1  
.plugins-ml-config 0 r STARTED 1 4kb 10.244.12.114 opensearch-cluster-master-0  
.plugins-ml-config 0 r STARTED 1 4kb 10.244.12.110 opensearch-cluster-master-2  
.opensearch-observability 0 p STARTED 0 208b 10.244.12.116 opensearch-cluster-master-1  
.opensearch-observability 0 r STARTED 0 208b 10.244.12.114 opensearch-cluster-master-0  
.opensearch-observability 0 r STARTED 0 208b 10.244.12.110 opensearch-cluster-master-2  
restored\_.apm-custom-link 0 r UNASSIGNED  
restored\_.apm-custom-link 0 p UNASSIGNED  
.opensearch-sap-log-types-config 0 r STARTED 10.244.12.116 opensearch-cluster-master-1  
.opensearch-sap-log-types-config 0 r STARTED 10.244.12.114 opensearch-cluster-master-0  
.opensearch-sap-log-types-config 0 p STARTED 10.244.12.110 opensearch-cluster-master-2  
top\_queries-2025.03.10-21661 0 r STARTED 115 363kb 10.244.12.116 opensearch-cluster-master-1  
top\_queries-2025.03.10-21661 0 p STARTED 115 433.8kb 10.244.12.114 opensearch-cluster-master-0  
restored\_.apm-agent-configuration 0 r UNASSIGNED  
restored\_.apm-agent-configuration 0 p UNASSIGNED  
.opensearch-notifications-config 0 r STARTED 10.244.12.116 opensearch-cluster-master-1  
.opensearch-notifications-config 0 p STARTED 10.244.12.114 opensearch-cluster-master-0  
.opensearch-notifications-config 0 r STARTED 10.244.12.110 opensearch-cluster-master-2  
restored\_naman\_index 0 r UNASSIGNED  
restored\_naman\_index 0 p UNASSIGNED

So how to restore snapshot backup of Elasticsearch in my Opensearch  
I want Elasticsearch all logs or messages are backup set in my Opensearch

but the index is not working the status is Red and not any size are mentioned.

 ![opensearch_index](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/a/a22c3dfc1da64fc503a51f5362e6ff779dea7817.png)
