Elasticsearchバックアップデータのリカバリ
13807 ワード
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