1、恢复备份好的snapshot
1.1恢复snapshot_1下的所有index
POST _snapshot/my_backup/snapshot_1/_restore
1.2恢复snapshot_1下指定的index
POST /_snapshot/my_backup/snapshot_1/_restore
{
"indices": "index_1",
"rename_pattern": "index_(.+)",
"rename_replacement": "restored_index_$1"
}
恢复index_1的数据,并将index_1重命名为restored_index_1
2、查看恢复进度
2.1、查看指定的index恢复进度
GET restored_index_3/_recovery
2.2、查看所有的index恢复进度
GET /_recovery/
{
"restored_index_3" : {
"shards" : [ {
"id" : 0,
"type" : "snapshot",
"stage" : "index",
"primary" : true,
"start_time" : "2014-02-24T12:15:59.716",
"stop_time" : 0,
"total_time_in_millis" : 175576,
"source" : {
"repository" : "my_backup",
"snapshot" : "snapshot_3",
"index" : "restored_index_3"
},
"target" : {
"id" : "ryqJ5lO5S4-lSFbGntkEkg",
"hostname" : "my.fqdn",
"ip" : "10.0.1.7",
"name" : "my_es_node"
},
"index" : {
"files" : {
"total" : 73,
"reused" : 0,
"recovered" : 69,
"percent" : "94.5%"
},
"bytes" : {
"total" : 79063092,
"reused" : 0,
"recovered" : 68891939,
"percent" : "87.1%"
},
"total_time_in_millis" : 0
},
"translog" : {
"recovered" : 0,
"total_time_in_millis" : 0
},
"start" : {
"check_index_time" : 0,
"total_time_in_millis" : 0
}
} ]
}
}
type 待恢复的snapshot
source 待恢复的snapshot的详细信息
percent 恢复进度
3、取消恢复
DELETE /restored_index_3
Elasticsearch恢复备份的数据
未经允许不得转载:搜云库技术团队 » Elasticsearch恢复备份的数据