Nfs repository and restore elastic snapshot

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch v 2.8.0
elasticsearch v 8.10.3

Configuration:
elk \ os repo params:

path.repo: ["/var/lib/snapshots"]

problem:
hello! Tell me please.
I created nfs and connected it to the elk cluster, created a snapshot with a couple of indexes.
connected the same nfs to the opensearch cluster. I’m now faced with two problems

PUT /_snapshot/my-repo
{
  "type": "fs",
  "settings": {
    "location": "/var/lib/snapshots"
  }
}

output

{
  "acknowledged": true
}

now when I go to opensearch dashboards in the repositories tab there is an error

{"error":{"root_cause":[{"type":"parsing_exception","reason":"Failed to parse object: unknown field [uuid] found","line":1,"col":25}],"type":"repository_exception","reason":"[snapshots] 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}

now when I try to load indexes from a snapshot I get an error

POST /_snapshot/my-repo/snapshot_1/_restore
output response:
{
  "error": {
    "root_cause": [
      {
        "type": "parsing_exception",
        "reason": "Failed to parse object: unknown field [uuid] found",
        "line": 1,
        "col": 25
      }
    ],
    "type": "repository_exception",
    "reason": "[my-repo] 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
}

please tell me what is my mistake

I realized that it will not be possible to transfer indexes from these versions, are there any other ways?

@maxim According to the documentation you can snapshot and restore with OpenSearch indices of ES 6.x and 7.x

When your data are at version 8.x then the only option I’m aware of would be streaming the data between the clusters using i.e. Logtash OSS with OpenSearch output plugin.

To migrate a post-fork version of Elasticsearch (7.11+) to OpenSearch, you can use Logstash. You’ll need to employ the Elasticsearch input plugin within Logstash to extract data from the Elasticsearch cluster, and the Logstash Output OpenSearch plugin to write the data to the OpenSearch 2.x cluster. We suggest using Logstash version 7.13.4 or earlier, as newer versions may encounter compatibility issues when establishing a connection with OpenSearch due to changes introduced by Elasticsearch subsequent to the fork. We strongly recommend that users test this solution with their own data to ensure effectiveness.

1 Like

@pablo
I was able to solve the problem by using https://github.com/elasticsearch-dump/elasticsearch-dump
uploaded the necessary indexes into .json and then sent it as a filebit to opensearch, but first you need to use compatibility mode

PUT /_cluster/settings
{
  "persistent" : {
    "compatibility.override_main_response_version" : true
  }
}

thank you for your help