You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/snapshot-restore/apis/restore-snapshot-api.asciidoc
+30-44Lines changed: 30 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,29 +64,26 @@ POST /_snapshot/my_repository/my_snapshot/_restore
64
64
[[restore-snapshot-api-prereqs]]
65
65
==== {api-prereq-title}
66
66
67
-
* If the {es} {security-features} are enabled, you must have the `manage`
68
-
<<privileges-list-cluster,cluster privilege>> to use this API.
67
+
// tag::restore-prereqs[]
68
+
* If you use the {es} security features, you must have the `manage` or
69
+
`cluster:admin/snapshot/*` cluster privilege to restore a snapshot.
69
70
70
-
[[restore-snapshot-api-desc]]
71
-
==== {api-description-title}
71
+
* You can only restore a snapshot to a running cluster with an elected
72
+
<<master-node,master node>>. The snapshot's repository must be
73
+
<<snapshots-register-repository,registered>> and available to the cluster.
72
74
73
-
Use the restore snapshot API to restore a snapshot of a cluster, including all data streams and indices in the snapshot. If you do not want to restore the entire snapshot, you can select specific data streams or indices to restore.
75
+
* The snapshot and cluster versions must be compatible. See
76
+
<<snapshot-restore-version-compatibility>>.
74
77
75
-
You can run the restore operation on a cluster that contains an elected
76
-
<<master-node,master node>> and has data nodes with enough capacity to accommodate the snapshot
77
-
you are restoring. Existing indices can only be restored if they are
78
-
<<indices-close,closed>> and have the same number of shards as the indices in
79
-
the snapshot. The restore operation automatically opens restored indices if
80
-
they were closed and creates new indices if they do not exist in the cluster.
78
+
* If you restore a data stream, ensure the cluster contains a
79
+
<<create-index-template,matching index template>> with data stream enabled.
80
+
Without a matching index template, a data stream can't roll over or create
81
+
backing indices.
81
82
82
-
If a data stream is restored, its aliases and backing indices are also restored.
83
-
Alternatively, you can restore individual backing indices without restoring an
84
-
entire data stream. If you restore individual backing indices, they are not
85
-
automatically added to any existing data stream. For example, if only the
86
-
`.ds-logs-2099.03.08-00003` backing index is restored from a snapshot, it is not
87
-
automatically added to the existing `logs` data stream.
(Optional, Boolean) If `true`, the request returns a response when the restore
109
106
operation completes. The operation is complete when it finishes all attempts to
110
-
<<_monitoring_restore_operations,recover primary shards>> for restored indices.
107
+
<<monitor-restore,recover primary shards>> for restored indices.
111
108
This applies even if one or more of the recovery attempts fail.
112
109
+
113
110
If `false`, the request returns a response when the restore
@@ -118,14 +115,15 @@ operation initializes. Defaults to `false`.
118
115
==== {api-request-body-title}
119
116
120
117
`ignore_unavailable`::
121
-
(Optional, Boolean)
122
-
If `false`, the request returns an error for any data stream or index that is missing or closed. Defaults to `false`.
123
-
+
124
-
If `true`, the request ignores data streams and indices in `indices` that are missing or closed.
118
+
(Optional, Boolean) If `true`, the request ignores any index or data stream in
119
+
`indices` that's missing from the snapshot. If `false`, the request returns an
120
+
error for any missing index or data stream. Defaults to `false`.
125
121
126
122
`ignore_index_settings`::
127
-
(Optional, string)
128
-
A comma-separated list of index settings that should not be restored from a snapshot.
123
+
(Optional, string or array of strings) Index settings to not restore from the snapshot. You can't use this option to ignore <<index-number-of-shards,`index.number_of_shards`>>.
124
+
+
125
+
For data streams, this option only applies to restored backing indices. New
126
+
backing indices are configured using the data stream's matching index template.
129
127
130
128
`include_aliases`::
131
129
(Optional, Boolean)
@@ -171,23 +169,15 @@ By default, all available feature states will be restored if `include_global_sta
171
169
172
170
[[restore-snapshot-api-index-settings]]
173
171
`index_settings`::
174
-
(Optional, string)
175
-
A comma-separated list of settings to add or change in all restored indices. Use this parameter to override index settings when restoring snapshots.
172
+
(Optional, object) Index settings to add or change in restored indices,
173
+
including backing indices. You can't use this option to change
For data streams, these index settings are applied to the restored backing
178
-
indices.
179
-
+
180
-
For more information regarding all the different index-level settings
181
-
that you can specify, see
182
-
<<index-modules,index modules>>.
176
+
For data streams, this option only applies to restored backing indices. New
177
+
backing indices are configured using the data stream's matching index template.
183
178
184
179
`indices`::
185
-
(Optional, string)
186
-
A comma-separated list of data streams and indices to restore from the snapshot.
187
-
<<multi-index,Multi-index syntax>> is supported.
188
-
+
189
-
By default, a restore operation includes all data streams and indices in the snapshot. If this
190
-
argument is provided, the restore operation only includes the specified data streams and indices.
180
+
(Optional, string or array of strings) Comma-separated list of indices and data streams to restore. Supports <<api-multi-index,multi-target syntax>>. Defaults to all indices and data streams in the snapshot, including system indices.
191
181
192
182
[[restore-snapshot-api-partial]]
193
183
`partial`::
@@ -205,10 +195,6 @@ Defines a rename pattern to apply to restored data streams and indices. Data str
205
195
+
206
196
The rename pattern is applied as defined by the regular expression that
207
197
supports referencing the original text, according to the https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#appendReplacement-java.lang.StringBuffer-java.lang.String-[`appendReplacement`] logic.
208
-
+
209
-
The request will fail if two or more data streams or indices will be renamed into the same name.
0 commit comments