Elasticsearch恢复备份的数据
1 1、恢复备份好的snapshot 2 3 1.1恢复snapshot_1下的所有index 4 5 POST _snapshot/my_backup/snapshot_1/_restore 6 7 1.2恢复snapshot_1下指定的index 8 9 POST /_snapshot/my_backup/snapshot_1/_restore 10 { 11 "indices": "index_1", 12 "rename_pattern": "index_(.+)", 13 "rename_replacement": "restored_index_$1" 14 } 15 16 恢复index_1的数据,并将index_1重命名为restored_index_1 17 18 2、查看恢复进度 19 20 2.1、查看指定的index恢复进度 21 GET restored_index_3/_recovery 22 23 2.2、查看所有的index恢复进度 24 GET /_recovery/ 25 { 26 "restored_index_3" : { 27 "shards" : [ { 28 "id" : 0, 29 "type" : "snapshot", 30 "stage" : "index", 31 "primary" : true, 32 "start_time" : "2014-02-24T12:15:59.716", 33 "stop_time" : 0, 34 "total_time_in_millis" : 175576, 35 "source" : { 36 "repository" : "my_backup", 37 "snapshot" : "snapshot_3", 38 "index" : "restored_index_3" 39 }, 40 "target" : { 41 "id" : "ryqJ5lO5S4-lSFbGntkEkg", 42 "hostname" : "my.fqdn", 43 "ip" : "10.0.1.7", 44 "name" : "my_es_node" 45 }, 46 "index" : { 47 "files" : { 48 "total" : 73, 49 "reused" : 0, 50 "recovered" : 69, 51 "percent" : "94.5%" 52 }, 53 "bytes" : { 54 "total" : 79063092, 55 "reused" : 0, 56 "recovered" : 68891939, 57 "percent" : "87.1%" 58 }, 59 "total_time_in_millis" : 0 60 }, 61 "translog" : { 62 "recovered" : 0, 63 "total_time_in_millis" : 0 64 }, 65 "start" : { 66 "check_index_time" : 0, 67 "total_time_in_millis" : 0 68 } 69 } ] 70 } 71 } 72 73 type 待恢复的snapshot 74 source 待恢复的snapshot的详细信息 75 percent 恢复进度 76 77 3、取消恢复 78 79 DELETE /restored_index_3