Skip to content

Commit 55204bd

Browse files
Add snapshot and restore examples (#3463) (#3473)
(cherry picked from commit 3a4d257) Co-authored-by: Lisa Cawley <[email protected]>
1 parent ce870d4 commit 55204bd

29 files changed

+279
-22
lines changed

output/schema/schema.json

Lines changed: 32 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ ccr-put-follow,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/
6464
ccr-resume-auto-follow-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ccr-resume-auto-follow-pattern.html
6565
ccs-network-delays,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/modules-cross-cluster-search.html#ccs-network-delays
6666
clean-up-snapshot-repo,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/snapshots-register-repository.html#snapshots-repository-cleanup
67-
clean-up-snapshot-repo-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clean-up-snapshot-repo-api.html
6867
clear-repositories-metering-archive-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clear-repositories-metering-archive-api.html
6968
clear-scroll-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clear-scroll-api.html
7069
clear-sql-cursor-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clear-sql-cursor-api.html
@@ -654,7 +653,18 @@ slm-api-get-status,https://www.elastic.co/guide/en/elasticsearch/reference/{bran
654653
slm-api-put-policy,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/slm-api-put-policy.html
655654
slm-api-start,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/slm-api-start.html
656655
slm-api-stop,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/slm-api-stop.html
656+
snapshot-clone,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clone-snapshot-api.html
657657
snapshot-create,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/snapshots-take-snapshot.html
658+
snapshot-create-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-snapshot-api.html
659+
snapshot-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-snapshot-api.html
660+
snapshot-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-snapshot-api.html
661+
snapshot-restore-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/restore-snapshot-api.html
662+
snapshot-status,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-snapshot-status-api.html
663+
snapshot-repo-cleanup,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clean-up-snapshot-repo-api.html
664+
snapshot-repo-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-snapshot-repo-api.html
665+
snapshot-repo-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-snapshot-repo-api.html
666+
snapshot-repo-verify,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/verify-snapshot-repo-api.html
667+
snapshot-repo-verify-integrity,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/verify-repo-integrity-api.html
658668
sort-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/sort-processor.html
659669
sort-search-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/sort-search-results.html
660670
sort-tiebreaker,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/eql.html#eql-search-specify-a-sort-tiebreaker

specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { Duration } from '@_types/Time'
2828
* @availability stack since=7.4.0 stability=stable
2929
* @availability serverless stability=stable visibility=private
3030
* @cluster_privileges manage
31+
* @doc_id snapshot-repo-cleanup
3132
* @ext_doc_id clean-up-snapshot-repo
3233
*/
3334
export interface Request extends RequestBase {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# summary:
2+
description: A successful response from `POST /_snapshot/my_repository/_cleanup`.
3+
# type: response
4+
# response_code: ''
5+
value:
6+
"{\n \"results\": {\n \"deleted_bytes\": 20,\n \"deleted_blobs\": 5\n\
7+
\ }\n}"

specification/snapshot/clone/SnapshotCloneRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { Duration } from '@_types/Time'
2828
* @availability stack since=7.10.0 stability=stable
2929
* @availability serverless stability=stable visibility=private
3030
* @cluster_privileges manage
31+
* @doc_id snapshot-clone
3132
*/
3233
export interface Request extends RequestBase {
3334
path_parts: {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# summary:
2+
# method_request: PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot
3+
description: Run `PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot` to clone the `source_snapshot` into a new `target_snapshot`.
4+
# type: request
5+
value: "{\n \"indices\": \"index_a,index_b\"\n}"

specification/snapshot/create/SnapshotCreateRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { Duration } from '@_types/Time'
2828
* @availability stack since=0.0.0 stability=stable
2929
* @availability serverless stability=stable visibility=private
3030
* @cluster_privileges create_snapshot
31+
* @doc_id snapshot-create-api
3132
* @ext_doc_id snapshot-create
3233
*/
3334
export interface Request extends RequestBase {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# summary:
2+
# method_request: PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true
3+
description: Run `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true` to take a snapshot of `index_1` and `index_2`.
4+
# type: request
5+
value:
6+
"{\n \"indices\": \"index_1,index_2\",\n \"ignore_unavailable\": true,\n\
7+
\ \"include_global_state\": false,\n \"metadata\": {\n \"taken_by\": \"user123\"\
8+
,\n \"taken_because\": \"backup before upgrading\"\n }\n}"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# summary:
2+
description: A successful response from `PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true`.
3+
# type: response
4+
# response_code: ''
5+
value:
6+
"{\n \"snapshot\": {\n \"snapshot\": \"snapshot_2\",\n \"uuid\": \"\
7+
vdRctLCxSketdKb54xw67g\",\n \"repository\": \"my_repository\",\n \"version_id\"\
8+
: <version_id>,\n \"version\": <version>,\n \"indices\": [],\n \"data_streams\"\
9+
: [],\n \"feature_states\": [],\n \"include_global_state\": false,\n \"\
10+
metadata\": {\n \"taken_by\": \"user123\",\n \"taken_because\": \"backup\
11+
\ before upgrading\"\n },\n \"state\": \"SUCCESS\",\n \"start_time\": \"\
12+
2020-06-25T14:00:28.850Z\",\n \"start_time_in_millis\": 1593093628850,\n \"\
13+
end_time\": \"2020-06-25T14:00:28.850Z\",\n \"end_time_in_millis\": 1593094752018,\n\
14+
\ \"duration_in_millis\": 0,\n \"failures\": [],\n \"shards\": {\n \
15+
\ \"total\": 0,\n \"failed\": 0,\n \"successful\": 0\n }\n }\n}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
summary: A shared file system repository
2+
# method_request: PUT /_snapshot/my_repository
3+
description: Run `PUT /_snapshot/my_repository` to create or update a shared file system snapshot repository.
4+
# type: request
5+
value:
6+
"{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\
7+
\n }\n}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
summary: An Azure repository
2+
# method_request: PUT _snapshot/my_backup
3+
description: Run `PUT /_snapshot/my_repository` to create or update an Azure snapshot repository.
4+
# type: request
5+
value:
6+
"{\n \"type\": \"azure\",\n \"settings\": {\n \"client\": \"secondary\"\
7+
\n }\n}"

0 commit comments

Comments
 (0)