Reputation: 1557
I just created a snapshot of a small index on an s3 repository. Now I am trying to restore it and it says that the snapshot was not found. The snapshot i created was from elasticearch 2.3 and i am trying to restore on elasticsearch 5.1.1. Is there some compatibility issue that i am unaware of?
2017-02-01T01:38:32,669][INFO ][o.e.r.RepositoriesService] [development] update repository [elasticsearch]
[2017-02-01T01:38:33,552][WARN ][o.e.s.RestoreService ] [development] [elasticsearch:backupname.17-01-31-1024] failed to restore snapshot
org.elasticsearch.snapshots.SnapshotRestoreException: [elasticsearch:backupname.17-01-31-1024]snapshot does not exist
at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:199) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:89) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:49) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:86) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:170) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:527) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.1.1.jar:5.1.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
[2017-02-01T01:38:33,552][WARN ][r.suppressed ] path: /_snapshot/elasticsearch/backupname.17-01-31-1024/_restore, params: {repository=elasticsearch, wait_for_completion=true, snapshot=backupname.17-01-31-1024}
org.elasticsearch.snapshots.SnapshotRestoreException: [elasticsearch:backupname.17-01-31-1024]snapshot does not exist
at org.elasticsearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:199) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:89) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:49) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:86) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$3.doRun(TransportMasterNodeAction.java:170) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:527) [elasticsearch-5.1.1.jar:5.1.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.1.1.jar:5.1.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
Also, i do not get the error on restoring the same snapshot on ES 2.3 I checked if the snapshot exists using the GET /_snapshot/elasticsearch/_all api. Got the following response:
{
"snapshot": "backup.backupname.17-01-31-1024",
"version_id": 2030099,
"version": "2.3.0",
"indices": [
"index_name"
],
"state": "SUCCESS",
"start_time": "2017-02-01T06:24:06.540Z",
"start_time_in_millis": 1485930246540,
"end_time": "2017-02-01T06:24:07.635Z",
"end_time_in_millis": 1485930247635,
"duration_in_millis": 1095,
"failures": [],
"shards": {
"total": 2,
"failed": 0,
"successful": 2
}
}
Upvotes: 1
Views: 4513
Reputation: 1042
From the logs I see:
/_snapshot/elasticsearch/backupname.17-01-31-1024/_restore
Are you sure that your snapshot name is elasticsearch:backupname.17-01-31-1024
?
You can check with
GET /_snapshot/elasticsearch/_all
If the snapshot exists, please output the status of the snapshot. If it isn't success, the snapshot wasn't done right.
UPDATE: Seems to me you are affected by a similar bug https://discuss.elastic.co/t/elasticsearch5-restore-snapshot-from-2-4/66488
Well the basic workaround, would be restore it in version 2.3 and shutdown the cluster and start the cluster with version 5, due the index will be upgraded then, or wait for the bugfix.
Although I'm not sure if ES 5 can restore from v2.3 directly, as v2.4 is in between.
Upvotes: 3