Migration from ES 2.x to ES 5.x

Yes, this error would happen when you try loading the repository's index file, which happens before trying to create a snapshot.

I would recommend the following to get you out of your predicament:

  1. disconnect your two clusters from the repository
  2. In your repository, at the top level directory, you will see some index-N files, where N is some number... for example, index-0, index-1, etc. Delete all of the index-N files, but do not delete the index file which does not have a -N after it. So keep index but delete all index-N blobs.
  3. Create the repository in your 5.x cluster. This should generate fresh index-N files for you, based on the current state of the repository.
  4. Now you can also create the repository in the 2.x cluster, just make sure you create it as readonly: see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html#_shared_file_system_repository for documentation on the readonly flag.
2 Likes