Skip to content

Commit 3c69e66

Browse files
authored
Fix a backtick typo; increase shell syntax usage
1 parent 0f4cf9a commit 3c69e66

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Install [pre-commit](https://pre-commit.com/#install).
2121
Prior to commit, run:
2222

2323
```shell
24-
pre-commit run --all-files`
24+
pre-commit run --all-files
2525
```
2626

2727

@@ -81,7 +81,7 @@ Create a snapshot repository. This puts the files in the `elasticsearch/snapshot
8181
the elasticsearch.yml and docker-compose files create a mapping from that directory to
8282
`/usr/share/elasticsearch/snapshots` within the Elasticsearch container and grant permissions on using it.
8383

84-
```
84+
```shell
8585
curl -X "PUT" "http://localhost:9200/_snapshot/my_fs_backup" \
8686
-H 'Content-Type: application/json; charset=utf-8' \
8787
-d $'{
@@ -97,7 +97,7 @@ a snapshot named `my_snapshot_2` and waits for the action to be completed before
9797
asynchronously, and queried for status. The `indices` parameter determines which indices are snapshotted, and
9898
can include wildcards.
9999

100-
```
100+
```shell
101101
curl -X "PUT" "http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2?wait_for_completion=true" \
102102
-H 'Content-Type: application/json; charset=utf-8' \
103103
-d $'{
@@ -113,20 +113,20 @@ curl -X "PUT" "http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2?wait_f
113113

114114
To see the status of this snapshot:
115115

116-
```
116+
```shell
117117
curl http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2
118118
```
119119

120120
To see all the snapshots:
121121

122-
```
122+
```shell
123123
curl http://localhost:9200/_snapshot/my_fs_backup/_all
124124
```
125125

126126
To restore a snapshot, run something similar to the following. This specific command will restore any indices that
127127
match `items_*` and rename them so that the new index name will be suffixed with `-copy`.
128128

129-
```
129+
```shell
130130
curl -X "POST" "http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2/_restore?wait_for_completion=true" \
131131
-H 'Content-Type: application/json; charset=utf-8' \
132132
-d $'{
@@ -137,15 +137,14 @@ curl -X "POST" "http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2/_rest
137137
"indices": "items_*",
138138
"rename_pattern": "items_(.+)"
139139
}'
140-
141140
```
142141

143142
Now the item documents have been restored in to the new index (e.g., `my-collection-copy`), but the value of the
144143
`collection` field in those documents is still the original value of `my-collection`. To update these to match the
145144
new collection name, run the following Elasticsearch Update By Query command, substituting the old collection name
146145
into the term filter and the new collection name into the script parameter:
147146

148-
```
147+
```shell
149148
curl -X "POST" "http://localhost:9200/items_my-collection-copy/_update_by_query" \
150149
-H 'Content-Type: application/json; charset=utf-8' \
151150
-d $'{
@@ -164,7 +163,7 @@ curl -X "POST" "http://localhost:9200/items_my-collection-copy/_update_by_query"
164163

165164
Then, create a new collection through the api with the new name for each of the restored indices:
166165

167-
```
166+
```shell
168167
curl -X "POST" "http://localhost:8080/collections" \
169168
-H 'Content-Type: application/json' \
170169
-d $'{

0 commit comments

Comments
 (0)