Skip to content

Commit 3856d5a

Browse files
committed
Restore global state does not merge (#73226)
Today the docs indicate that restoring a snapshot with `include_global_state` set will merge the ingest pipelines, ILM policies, settings etc in the snapshot with those already in the cluster. This isn't the case, we simply replace all the things. This commit corrects the docs.
1 parent 21a0a64 commit 3856d5a

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

docs/reference/snapshot-restore/apis/restore-snapshot-api.asciidoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,14 @@ The global state includes:
138138
* Ingest pipelines
139139
* {ilm-init} lifecycle policies
140140
* 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`)
141+
142+
If `include_global_state` is `true` then the restore operation merges the
143+
legacy index templates in your cluster with the templates contained in the
144+
snapshot, replacing any existing ones whose name matches one in the snapshot.
145+
It completely removes all persistent settings, non-legacy index templates,
146+
ingest pipelines and {ilm-init} lifecycle policies that exist in your cluster
147+
and replaces them with the corresponding items from the snapshot.
141148
--
142-
+
143-
IMPORTANT: By default, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. You can change this behavior by setting <<restore-snapshot-api-partial,`partial`>> to `true`.
144149

145150
[[restore-snapshot-api-feature-states]]
146151
`feature_states`::

docs/reference/snapshot-restore/restore-snapshot.asciidoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ POST /_snapshot/my_backup/snapshot_1/_restore
9393
<1> By default, `include_global_state` is `false`, meaning the snapshot's
9494
cluster state and feature states are not restored.
9595
+
96-
If `true`, the snapshot's persistent settings, index templates, ingest
97-
pipelines, and {ilm-init} policies are restored into the current cluster. This
98-
overwrites any existing cluster settings, templates, pipelines and {ilm-init}
99-
policies whose names match those in the snapshot.
96+
If `true` then the restore operation merges the legacy index templates in your
97+
cluster with the templates contained in the snapshot, replacing any existing
98+
ones whose name matches one in the snapshot. It completely removes all
99+
persistent settings, non-legacy index templates, ingest pipelines and
100+
{ilm-init} lifecycle policies that exist in your cluster and replaces them with
101+
the corresponding items from the snapshot.
100102

101103
The restore operation must be performed on a functioning cluster. However, an
102104
existing index can be only restored if it's <<indices-close,closed>> and

0 commit comments

Comments
 (0)