Restore snapshot from ES 2.4 to ES 5.2

I've made snapshot on a repository using ES 2.4.

I need to restore the last one on an ES 5.2 instance.

I've read some issues related with index-N I don't quite figure out what's it for.

By now, I'm now able to restore the last snapshot. When I list the available snapshot into repository only shows me one (I don't know whether it's the last or the first one).

How could I restore the last snapshot created by a ES 2.4 instance into an ES 5.2 instance?

Thanks.

Once you connect a 5.x cluster to the same repo that a 2.x cluster is connected to, the 5.x cluster goes through an upgrade process on the file formats. Any subsequent snapshots created by the 2.x cluster will not be seen by the 5.x cluster.

See https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html for details on multiple clusters being connected to the same repository.

If you really want to restore the latest snapshot from the 2.x cluster, you will have to:

  1. Delete the 5.x repository
  2. Delete all of the index-N blobs (but not the index blob) from the repository
  3. Delete the index.latest blob
  4. Set the 2.x cluster's repo to read_only mode
  5. Create the repo on 5.x.
  6. Restore the snapshot you want

An untested, unsupported alternative if you want to keep writing snapshots from the 2.x cluster is to do the aforementioned process but create the repo on 5.x with read_only set to true. However, its not supported and I'm not sure if it'll work - YMMV

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.