curl -XGET' elasticsearch-domain-endpoint / _snapshot / repository / _all?pretty'
下面是使用Elasticsearch 6.0.1,AWS提供的kibana将索引快照列表,如何将特定快照还原到另一台计算机上
{
"snapshot": "2018-04-08t04-43-08.c5da6a35-8158-4799-a58d-0baf0a432275",
"uuid": "cJ2XzzDHSROh-SmiJ1mbHA",
"version_id": 6000199,
"version": "6.0.1",
"indices": [
"test-index2",
"l",
"test-index",
".kibana",
"test-index1",
"s"
],
"state": "SUCCESS",
"start_time": "2018-04-08T04:43:08.113Z",
"start_time_in_millis": 1523162588113,
"end_time": "2018-04-08T04:43:14.992Z",
"end_time_in_millis": 1523162594992,
"duration_in_millis": 6879,
"failures": [],
"shards": {
"total": 26,
"failed": 0,
"successful": 26
}
},
{
"snapshot": "2018-04-09t04-43-07.b2e215dc-5bea-446c-812a-4a2f0dddad9c",
"uuid": "2ib6BIdURSmoL1OlUpzIPg",
"version_id": 6000199,
"version": "6.0.1",
"indices": [
"test-index2",
"l",
"test-index",
".kibana",
"test-index1",
"s"
],
"state": "SUCCESS",
"start_time": "2018-04-09T04:43:07.639Z",
"start_time_in_millis": 1523248987639,
"end_time": "2018-04-09T04:43:14.590Z",
"end_time_in_millis": 1523248994590,
"duration_in_millis": 6951,
"failures": [],
"shards": {
"total": 26,
"failed": 0,
"successful": 26
}
}
答案 0 :(得分:1)
首先需要在其他ES群集上创建相同的S3 repo(与最初在源群集上创建存储库时完全相同的命令)
PUT _snapshot/repository
{
"type": "s3",
"settings": {
"bucket": "your_bucket"
}
}
然后您可以使用以下命令简单地恢复任何快照:
POST /_snapshot/repository/2018-04-08t04-43-08.c5da6a35-8158-4799-a58d-0baf0a432275/_restore