· 6 years ago · Feb 08, 2019, 10:54 PM
1## Installation
2
3Step 1: Install Plugin
4
5```bash
6sudo bin/elasticsearch-plugin install repository-s3
7```
8
9## Configuration
10
11Example settings
12
13```yaml
14cloud:
15 aws:
16 access_key: AAAABBBB1234CCCC5678
17 secret_key: Ahfk380HqZR7sUYdeH2Xw*ZxyY8fwlF5QVQoxiJ$
18 s3.region: eu-central
19
20```
21
22Or use `elasticsearch.keystore` with above settings.
23
24Restart Elasticsearch nodes
25
26## Repository Management
27
28- create
29- verify
30
31### Create Repository
32```
33PUT _snapshot/s3
34{
35 "type" : "s3",
36 "settings" : {
37 "bucket" : "your-bucket-name",
38 "base_path" : "elasticsearch",
39 "region" : "eu-central-1",
40 "compress" : "true"
41 }
42}
43```
44
45### Verify Repository
46
47Verify snaphost repository
48```
49POST /_snapshot/s3/_verify
50```
51
52
53## Snapshots
54
55- check
56- create
57- restore
58
59### Check snapshots
60
61```
62GET _snapshot/s3/_all
63```
64
65### Create snapshots
66
67
68```
69PUT /_snapshot/s3/bike-rental
70{
71 "indices": "bike-rental-*,rental-stations",
72 "ignore_unavailable": false,
73 "include_global_state": false
74}
75```
76
77### Restore snapshots
78
79```
80POST /_snapshot/s3/bike-rental/_restore
81```