Skip to content

Improve handling of incompatible snapshots during restore #20867

@ppf2

Description

@ppf2

Related to #20866 but on the functionality side.

A snapshot can contain multiple indices that are created across different major versions, eg. a snapshot containing an index created on 1.x (upgraded to 2.x), and an index created on 2.x.

When attempting to restore such snapshot to a 5.0 cluster, it currently (correctly) checks and rejects the snapshot request when encountering a snapshot that is created in 1.x:

      "type": "illegal_state_exception",
      "reason": "The index [[.marvel-2016.08.25/WL796FFwR76Zas-sILNlMQ]] was created before v2.0.0.beta1. It should be reindexed in Elasticsearch 2.x before upgrading to 5.0.0-beta1."

It will be nice to provide additional features:

  • Provide a way for users to easily tell if a snapshot contains previously created indices. Currently, the snapshot _status API does not include index.version.created information. It will be nice to include index.version.created and index.version.upgraded as metadata as part of the _status API.
  • Currently snapshot restore fails right away when the list of indices requested contains ones created in versions that it does not support/not compatible with (eg. if a snapshot contains both indices created on 1.x and 2.x, the restore will fail completely). It will be nice to provide an option to ignore these 1.x snapshots (eg. a flag like ignore_incompatible, ignore_obsolete, etc..).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions