问题
curl -XGET 'elasticsearch-domain-endpoint/_snapshot/repository/_all?pretty'
below are the list of indices snapshot, how do i restore a particular snapshot, on to another machine, using Elasticsearch 6.0.1, kibana provided by AWS
{
"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
}
}
回答1:
You first need to create the same S3 repo on your other ES cluster (the exact same command as when you initially created the repository on your source cluster)
PUT _snapshot/repository
{
"type": "s3",
"settings": {
"bucket": "your_bucket"
}
}
And then you can restore any snapshot very simply with:
POST /_snapshot/repository/2018-04-08t04-43-08.c5da6a35-8158-4799-a58d-0baf0a432275/_restore
来源:https://stackoverflow.com/questions/49877172/restore-a-specific-aws-elasticsearch-database-snapshot-backup-on-a-different-mac