Skip to content

[DOCS] Fix create snapshot API parameters #79209

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

Merged
merged 3 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 47 additions & 29 deletions docs/reference/snapshot-restore/apis/create-snapshot-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ Besides creating a copy of each data stream and index, the snapshot process can

`<repository>`::
(Required, string)
Name of the repository to create a snapshot in.
Name of the snapshot repository.

`<snapshot>`::
(Required, string)
Name of the snapshot to create. This name must be unique in the snapshot repository.
Name of the snapshot. Supports <<api-date-math-index-names,date math>>. Must be
unique within the snapshot repository.

[[create-snapshot-api-query-params]]
==== {api-query-parms-title}
Expand All @@ -96,50 +97,67 @@ initializes. Defaults to `false`.
// Set an attribute so we can reuse these params with anchors
:page-id: create-snapshot-api
// tag::snapshot-config[]
`expand_wildcards`::
+
--
(Optional, string) Determines how wildcard patterns in the `indices` parameter
match data streams and indices. Supports comma-separated values, such as
`open,hidden`. Defaults to `all`. Valid values are:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defaults to all.

I'll change this to open,hidden on 7.x backports.


`all`:::
Match any data stream or index, including <<hidden,hidden>> ones.

`open`:::
Match open indices and data streams.

`closed`:::
Match closed indices and data streams.

`hidden`:::
Match hidden data streams and indices. Must be combined with `open`, `closed`,
or both.

`none`:::
Don't expand wildcard patterns.
--

`ignore_unavailable`::
(Optional, Boolean)
If `false`, the snapshot fails if any data stream or index in `indices` is
missing or closed. If `true`, the snapshot ignores missing or closed data
streams and indices. Defaults to `false`.

`indices`::
(Optional, string)
A comma-separated list of data streams and indices to include in the snapshot.
<<multi-index,Multi-index syntax>> is supported.
+
By default, a snapshot includes all data streams and indices in the cluster. If this
argument is provided, the snapshot only includes the specified data streams and clusters.

`include_global_state`::
+
--
(Optional, Boolean)
If `true`, the current global state is included in the snapshot.
Defaults to `true`.

The global state includes:
If `true`, include the cluster state in the snapshot. Defaults to `true`.
The cluster state includes:

* Persistent cluster settings
* Index templates
* Legacy index templates
* Ingest pipelines
* {ilm-init} lifecycle policies
* Data stored in system indices, such as Watches and task records (configurable via `feature_states`)
include::restore-snapshot-api.asciidoc[tag=cluster-state-contents]
--

`indices`::
(Optional, string or array of strings)
Comma-separated list of data streams and indices to include in the snapshot.
Supports <<api-multi-index,multi-index syntax>>. Defaults to an empty array
(`[]`), which includes all data streams and indices, including system indices.
+
To exclude all data streams and indices, use `-*` or `none`.

[id="{page-id}-feature-states"]
`feature_states`::
(Optional, array of strings)
A list of feature states to be included in this snapshot. A list of features
available for inclusion in the snapshot and their descriptions be can be
retrieved using the <<get-features-api,get features API>>.
Each feature state includes one or more system indices containing data necessary
for the function of that feature. Providing an empty array will include no feature
states in the snapshot, regardless of the value of `include_global_state`.
Feature states to include in the snapshot. To get a list of possible feature
state values and their descriptions, use the <<get-features-api,get features
API>>. Each feature state includes one or more system indices.
+
If `include_global_state` is `true`, the snapshot includes all feature states by
default. If `include_global_state` is `false`, the snapshot includes no feature
states by default.
+
By default, all available feature states will be included in the snapshot if
`include_global_state` is `true`, or no feature states if `include_global_state`
is `false`.
To exclude all feature states, regardless of the `include_global_state` value,
specify an empty array (`[]`) or `none`.

`metadata`::
(Optional, object)
Expand Down
24 changes: 14 additions & 10 deletions docs/reference/snapshot-restore/apis/restore-snapshot-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -135,25 +135,29 @@ indices. If `false`, the request doesn't restore aliases. Defaults to `true`.
+
--
(Optional, Boolean)
If `false`, the global state is not restored. Defaults to `false`.
If `true`, restore the cluster state. Defaults to `false`.

If `true`, the current global state is included in the restore operation.
The cluster state includes:

The global state includes:

* Persistent cluster settings
* Index templates
* Legacy index templates
* Ingest pipelines
* {ilm-init} lifecycle policies
* For snapshots taken after 7.12.0, data stored in system indices, such as Watches and task records, replacing any existing configuration (configurable via `feature_states`)
// tag::cluster-state-contents[]
* <<cluster-setting-types,Persistent cluster settings>>
* <<index-templates,Index templates>>
* <<indices-templates-v1,Legacy index templates>>
* <<ingest,Ingest pipelines>>
* <<index-lifecycle-management,{ilm-init} policies>>
* For snapshots taken after 7.12.0, data stored in system indices, such as
Watches and task records.
// end::cluster-state-contents[]

If `include_global_state` is `true` then the restore operation merges the
legacy index templates in your cluster with the templates contained in the
snapshot, replacing any existing ones whose name matches one in the snapshot.
It completely removes all persistent settings, non-legacy index templates,
ingest pipelines and {ilm-init} lifecycle policies that exist in your cluster
and replaces them with the corresponding items from the snapshot.

You can use the `feature_states` parameter to configure how system indices
are restored from the cluster state.
--

[[restore-snapshot-api-feature-states]]
Expand Down