【发布时间】:2021-02-04 11:29:41
【问题描述】:
我正在尝试将数据从一个实例移动到另一个弹性搜索实例。如here 所述,我已经创建了 Roles 和 s3 存储桶。
我已经在两个实例中注册了存储库,快照创建成功,s3 有了新对象。但是当我运行恢复命令时。我收到如下错误
:[{"type":"snapshot_restore_exception","reason":"[test:sample5/xcMBVd21SQky8E2TX8Z76xf] index [example] wasn't fully snapshotted - cannot restore"}]
我使用 python 脚本创建了一个快照,
path = '_snapshot/test/' + sampe_snap
url = host + path
payload = {
"indices": "example",
"include_global_state": False
}
r = requests.put(url, json=payload, auth=awsauth)
返回
{"accepted":true}
为了调试,我使用了 Kibana 并搜索了快照。如下所示
GET _snapshot/test/sampe_snap
....
"indices" : [ "example" ],
"include_global_state" : false,
"state" : "PARTIAL",
"start_time" : "2021-02-04T11:14:22.153Z",
"start_time_in_millis" : 1612437262153,
"end_time" : "2021-02-04T11:14:22.554Z",
"end_time_in_millis" : 1612437262554,
"duration_in_millis" : 401,
"failures" : [ {
"index" : "example",
"index_uuid" : "example",
"shard_id" : 3,
"reason" : """java.nio.file.NoSuchFileException: Blob object [indices/TJz0FNoGQUfvJ5pbTFLyQ/3/index-f16nCDQoiRl4UV8vCFSA] not found: The specified key does not exist.
(Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey...;
为什么会失败?
【问题讨论】:
-
嗯,错误信息很清楚:
index [example] wasn't fully snapshotted - cannot restore这意味着您尝试恢复的索引没有完全快照,因此无法恢复 -
@Val 我已经更新了问题,请看一下
标签: amazon-web-services elasticsearch amazon-s3 aws-elasticsearch