-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[DOCS] Adding get snapshot status API docs #59355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
09f8a85
3884c0d
f633204
a72f137
7f245a5
62bdd12
1988ebf
7de5b12
c26d39b
6a50d96
39b86a6
db21692
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,228 @@ | ||||||||||||||||||||||||||||||
| [[get-snapshot-status-api]] | ||||||||||||||||||||||||||||||
| === Get snapshot status API | ||||||||||||||||||||||||||||||
| ++++ | ||||||||||||||||||||||||||||||
| <titleabbrev>Get snapshot status</titleabbrev> | ||||||||||||||||||||||||||||||
| ++++ | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Retrieves a complete breakdown of the current state for each shard participating in the snapshot. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| //// | ||||||||||||||||||||||||||||||
| [source,console] | ||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||
| PUT /_snapshot/my_repository | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| "type": "fs", | ||||||||||||||||||||||||||||||
| "settings": { | ||||||||||||||||||||||||||||||
| "location": "my_backup_location" | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| PUT /_snapshot/my_repository/my_snapshot?wait_for_completion=true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true | ||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||
| // TESTSETUP | ||||||||||||||||||||||||||||||
| //// | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [source,console] | ||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||
| GET /_snapshot/my_repository/my_snapshot/_status | ||||||||||||||||||||||||||||||
| ---- | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [[get-snapshot-status-api-request]] | ||||||||||||||||||||||||||||||
| ==== {api-request-title} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `GET /_snapshot/<repository>/<snapshot>/_status` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [[get-snapshot-status-api-desc]] | ||||||||||||||||||||||||||||||
| ==== {api-description-title} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Use the get snapshot status API to retrieve detailed information about snapshots currently running in the cluster. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| If you specify both the repository name and snapshot, the request retrieves detailed status information for the given snapshot, even if not currently running. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [[get-snapshot-status-api-path-params]] | ||||||||||||||||||||||||||||||
| ==== {api-path-parms-title} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `<repository>`:: | ||||||||||||||||||||||||||||||
| (Required, string) | ||||||||||||||||||||||||||||||
| Snapshot repository name used to limit the request. | ||||||||||||||||||||||||||||||
| + | ||||||||||||||||||||||||||||||
| Omitting a repository name retrieves a list of all snapshots currently running in the cluster. | ||||||||||||||||||||||||||||||
lockewritesdocs marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `<snapshot>`:: | ||||||||||||||||||||||||||||||
| (Required, string) | ||||||||||||||||||||||||||||||
lockewritesdocs marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
| Comma-separated list of snapshot names to retrieve status for. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [role="child_attributes"] | ||||||||||||||||||||||||||||||
| [[get-snapshot-status-api-request-body]] | ||||||||||||||||||||||||||||||
| ==== {api-request-body-title} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `ignore_unavailable`:: | ||||||||||||||||||||||||||||||
| (Optional, boolean) | ||||||||||||||||||||||||||||||
| If `false`, the request returns an error for any snapshots that are unavailable. Defaults to `false`. | ||||||||||||||||||||||||||||||
| + | ||||||||||||||||||||||||||||||
| If `true`, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [role="child_attributes"] | ||||||||||||||||||||||||||||||
| [[get-snapshot-status-api-response-body]] | ||||||||||||||||||||||||||||||
| ==== {api-response-body-title} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `snapshot`:: | ||||||||||||||||||||||||||||||
| (string) | ||||||||||||||||||||||||||||||
| Name of the snapshot. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
lockewritesdocs marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||
| `uuid`:: | ||||||||||||||||||||||||||||||
| (string) | ||||||||||||||||||||||||||||||
| Universally unique identifier (UUID) of the snapshot. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `state`:: | ||||||||||||||||||||||||||||||
| + | ||||||||||||||||||||||||||||||
| -- | ||||||||||||||||||||||||||||||
| (string) | ||||||||||||||||||||||||||||||
| The snapshot `state` can be one of the following values: | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .Values for `state` | ||||||||||||||||||||||||||||||
| [%collapsible%open] | ||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||
| `IN_PROGRESS`:: | ||||||||||||||||||||||||||||||
| The snapshot is currently running. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `SUCCESS`:: | ||||||||||||||||||||||||||||||
| The snapshot finished and all shards were stored successfully. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `FAILED`:: | ||||||||||||||||||||||||||||||
| The snapshot finished with an error and failed to store any data. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `PARTIAL`:: | ||||||||||||||||||||||||||||||
| The global cluster state was stored, but data of at least one shard was not stored successfully. | ||||||||||||||||||||||||||||||
| The <<get-snapshot-api-response-failures,`failures`>> section of the response contains more detailed information about shards | ||||||||||||||||||||||||||||||
| that were not processed correctly. | ||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||
| -- | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `include_global_state`:: | ||||||||||||||||||||||||||||||
| (boolean) | ||||||||||||||||||||||||||||||
| Indicates whether the current cluster state is included in the snapshot. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `shards_stats`:: | ||||||||||||||||||||||||||||||
| (object) | ||||||||||||||||||||||||||||||
| Contains a count of shards in the snapshot. | ||||||||||||||||||||||||||||||
| + | ||||||||||||||||||||||||||||||
| .Properties of `shards` | ||||||||||||||||||||||||||||||
| [%collapsible%open] | ||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||
| `initializing`:: | ||||||||||||||||||||||||||||||
| (integer) | ||||||||||||||||||||||||||||||
| Number of shards that are still initializing. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `started`:: | ||||||||||||||||||||||||||||||
| (integer) | ||||||||||||||||||||||||||||||
| Number of shards that have started but not are not finalized. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `finalizing`:: | ||||||||||||||||||||||||||||||
| (integer) | ||||||||||||||||||||||||||||||
| Number of shards that are finalizing but are not done. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `done`:: | ||||||||||||||||||||||||||||||
| (integer) | ||||||||||||||||||||||||||||||
| Number of shards that initialized, started, and finalized successfully. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `failed`:: | ||||||||||||||||||||||||||||||
| (integer) | ||||||||||||||||||||||||||||||
| Number of shards that failed to be included in the snapshot. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `total`:: | ||||||||||||||||||||||||||||||
| (integer) | ||||||||||||||||||||||||||||||
| Total number of shards included in the snapshot. | ||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `stats`:: | ||||||||||||||||||||||||||||||
| (object) | ||||||||||||||||||||||||||||||
| Provides details on the number (`file_count`) and size (`size_in_bytes`) of files included in the snapshot. | ||||||||||||||||||||||||||||||
| + | ||||||||||||||||||||||||||||||
| .Properties of `stats` | ||||||||||||||||||||||||||||||
| [%collapsible%open] | ||||||||||||||||||||||||||||||
| ==== | ||||||||||||||||||||||||||||||
| `incremental`:: | ||||||||||||||||||||||||||||||
| (object) | ||||||||||||||||||||||||||||||
| Number and size of files that are not already in the repository and need to be copied as part of the incremental snapshot. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `processed`:: | ||||||||||||||||||||||||||||||
| (object) | ||||||||||||||||||||||||||||||
| Number and size of files that are still being copied. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `total`:: | ||||||||||||||||||||||||||||||
| (object) | ||||||||||||||||||||||||||||||
| Total number and size of files that are referenced by the snapshot. | ||||||||||||||||||||||||||||||
|
Comment on lines
+219
to
+221
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same about documenting the nested properties. |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `start_time_in_millis`:: | ||||||||||||||||||||||||||||||
| (long) | ||||||||||||||||||||||||||||||
| The time, in milliseconds, when the snapshot creation process started. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| `time_in_millis`:: | ||||||||||||||||||||||||||||||
| (long) | ||||||||||||||||||||||||||||||
| The total time, in milliseconds, that | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| `start_time_in_millis`:: | |
| (long) | |
| The time, in milliseconds, when the snapshot creation process started. | |
| `time_in_millis`:: | |
| (long) | |
| The total time, in milliseconds, that | |
| `start_time_in_millis`:: | |
| (integer) | |
| The time, in milliseconds, when the snapshot creation process started. | |
| `time_in_millis`:: | |
| (integer) | |
| The total time, in milliseconds, that |
Uh oh!
There was an error while loading. Please reload this page.