Hi, All,
We are trying to migrate a self-managed elastic search cluster (version 5.3) to a different Elasticsearch cluster with version 7.1. Below steps works for the first time but fails when I try to restore another snapshot from 5.3 to 7.1:
First attempt
- Take a snapshot(snap_1) from 5.3 to a S3 repo (snapshot_repo)
- Spin up a temp cluster with version 6.8 as a direct restore from 5.3 to 7.1 is not allowed.
- Register snapshot_repo for 6.8 (same repo as 5.3)
- Restore snap_1 on to 6.8
- Reindex data (To make mapping compatible with 6.8)
- Take a new snapshot on 6.8 (snap_2)
- Register snapshot_repo for 7.1 (same repo as 5.3)
- Restore snap_2 on 7.1
- Delete 6.8 version ES cluster
At this time everything works as expected. The number of indices, documents, mapping, etc are the same as the 5.3 version. After this, I tried to restore a new snapshot from 5.3
Second attempt:
- Take a snapshot(snap_3) from 5.3 to a S3 repo (snapshot_repo)
- Spin up a temp cluster with version 6.8 as a direct restore from 5.3 to 7.1 is not allowed.
- Register snapshot_repo for 6.8 (same repo as 5.3)
- Restore snap_3 on to 6.8 => Failed (see below)
org.elasticsearch.ElasticsearchParseException: Detected a corrupted repository, index [__PATH__] references an unknown snapshot uuid [6YLEH-C_RM6SA6TPYpI9CQ]
at org.elasticsearch.repositories.RepositoryData.snapshotsFromXContent(RepositoryData.java:466) ~[elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.getRepositoryData(BlobStoreRepository.java:800) ~[elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:184) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:77) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:40) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:124) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.doRun(TransportMasterNodeAction.java:211) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:760) [elasticsearch-6.8.0.jar:6.8.0]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.8.0.jar:6.8.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Any ideas? What can I do to avoid this?