Restore data_stream from snapshot failed with 'no such index'

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch 2.4.1

Describe the issue:

I tried to restore data_stream from snapshot, but it failed with ‘index_not_found_exception’.
I verified that the name of my data stream is actually stored in the snapshot.

GET _snapshot/my-snapshot-01
{
  "snapshots": [
    {
      "snapshot": "my-snapshot-01",
      "indices": [
        ".ds-mystream-2024.05.01-000001",
      ],
      "data_streams": [
        "mystream-2024.05.01",
      ],
    },
  ],
}

And I failed to restore both stream indices, data_streams.

POST _snapshot/my-snapshot-01/_restore
{
  "indices": "mystream-2024.05.01",
  "ignore_unavailable": false,
  "include_global_state": false,
  "partial": false,
  "rename_pattern": "(.+)",
  "rename_replacement": "restored-$1"
}

it returns:

{
  "error": { 
  "root_cause": [ 
    { 
      "type": "index_not_found_exception",
      "reason": "no such index [mystream-2024.05.01]",
...

How can I restore data stream? According to guide docs, It should be restored when I put the data stream name in the “indices” field, but I can’t.

Do I need to do anything special settings to recover datastreams? Or are datastreams simply unrecoverable? (Despite the fact that the guide documentation says it’s possible)

Configuration:

  • OpenSearch 2.4.1
  • snapshot repository type: s3

Relevant Logs or Screenshots:

Seems to be a bug, and there’s an issue tracking it:[BUG] Unable to restore indexes from DataStream when specifying datastream name · Issue #6805 · opensearch-project/OpenSearch · GitHub.

1 Like