Skip to content

Data stream backing index restored from snapshot missing in the index recovery API #118843

Open
@fdartayre

Description

@fdartayre

Backing indices of a data stream restored from snapshot are not visible in the index recovery API until they have been re-added to the data stream (with the modify data streams API).

Steps to reproduce:

DELETE .ds-logs-elastic_agent.packetbeat-default-2023.04.25-000001

POST _snapshot/found-snapshots/cloud-snapshot-2024.12.17-zpritqyatr6ac1zmrfgffq/_restore
{
  "indices": ".ds-logs-elastic_agent.packetbeat-default-2023.04.25-000001",
  "include_global_state": false,
  "include_aliases": true
}

=> GET _recovery?human&filter_path=.ds-logs-elastic_agent.packetbeat-default-2023.04.25-000001 returns {}

POST _data_stream/_modify
{
  "actions": [
    {
      "add_backing_index": {
        "data_stream": "logs-elastic_agent.packetbeat-default",
        "index": ".ds-logs-elastic_agent.packetbeat-default-2023.04.25-000001"
      }
    }
  ]
}

GET _recovery?human&filter_path=.ds-logs-elastic_agent.packetbeat-default-2023.04.25-000001 returns the expected results.

Notes:

  • GET .ds-logs-elastic_agent.packetbeat-default-2023.04.25-000001/_recovery?human works even if the index was not added to the data stream
  • Kibana relies on _recovery for the app/management/data/snapshot_restore/restore_status page, so restored backing indices are missing from the page until are added back to the data stream
  • relates Allow indices to be restored/mounted into a data stream #76153

Activity

elasticsearchmachine

elasticsearchmachine commented on Dec 17, 2024

@elasticsearchmachine
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed Indexing/RecoveryAnything around constructing a new shard, either from a local or a remote source.>bugTeam:Distributed IndexingMeta label for Distributed Indexing team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @fdartayre@elasticsearchmachine

        Issue actions

          Data stream backing index restored from snapshot missing in the index recovery API · Issue #118843 · elastic/elasticsearch