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: deploy-manage/tools/snapshot-and-restore.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,15 +105,26 @@ Snapshots don’t contain or back up:
105
105
106
106
### Feature states [feature-state]
107
107
108
-
A **feature state** contains the indices and data streams used to store configurations, history, and other data for an Elastic feature, such as **{{es}} security** or **Kibana**.
108
+
A **feature state** contains the indices and data streams used to store configurations, history, and other data for an Elastic feature, such as **{{es}} security** or **Kibana**. To retrieve a list of feature states, use the [Features API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-get-features).
109
109
110
-
::::{note}
111
-
To retrieve a list of feature states, use the [Features API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-get-features).
112
-
::::
110
+
```console
111
+
GET /_features
112
+
```
113
113
114
114
A feature state typically includes one or more [system indices or system data streams](elasticsearch://reference/elasticsearch/rest-apis/api-conventions.md#system-indices). It may also include regular indices and data streams used by the feature. For example, a feature state may include a regular index that contains the feature’s execution history. Storing this history in a regular index lets you more easily search it.
115
115
116
-
In {{es}} 8.0 and later versions, feature states are the only way to back up and restore system indices and system data streams.
116
+
Starting with {{es}} 8.0 and later versions, feature states are the only way to back up and restore system indices and system data streams. Attempting to restore a system index or data stream outside its feature state is not permitted and will result in the following error:
117
+
118
+
```
119
+
requested system indices [.example], but system indices can only be restored as part of a feature state
120
+
```
121
+
122
+
Restoring system indices and data streams will require temporary elevated permissions to edit restricted indices. For more information, refer to [File-based access recovery](/troubleshoot/elasticsearch/file-based-recovery.md). Attempting to restore a system index or data stream without the required temporary elevated permissions will result in the following error:
123
+
124
+
```
125
+
Indices [.example] use and access is reserved for system operations
Copy file name to clipboardExpand all lines: deploy-manage/tools/snapshot-and-restore/restore-snapshot.md
+59-17Lines changed: 59 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,25 +165,75 @@ You can restore a [feature state](../../../deploy-manage/tools/snapshot-and-rest
165
165
166
166
If you restore a snapshot’s cluster state, the operation restores all feature states in the snapshot by default. Similarly, if you don’t restore a snapshot’s cluster state, the operation doesn’t restore any feature states by default. You can also choose to restore only specific feature states from a snapshot, regardless of the cluster state.
167
167
168
-
To view a snapshot’s feature states, use the getsnapshot API.
168
+
Feature backing indices are version dependent. To see which indices are included within a snapshot's feature state, [list an applicable snapshot](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get). For example, on {{ech}} you might poll its latest snapshot on its built-in `cloud-snapshot-policy` SLM policy:
169
169
170
170
```console
171
-
GET _snapshot/my_repository/my_snapshot_2099.05.06
171
+
GET /_snapshot/_all/_all?filter_path=snapshots.feature_states&index_names=false&sort=start_time&size=1&order=desc&slm_policy_filter=cloud-snapshot-policy
172
172
```
173
173
174
-
The response’s `feature_states` property contains a list of features in the snapshot as well as each feature’s indices.
174
+
The response’s `feature_states` property contains a list of features in the snapshot as well as each feature’s indices. The following is an example of the output that might display for a cluster:
175
175
176
-
To restore a specific feature state from the snapshot, specify the `feature_name` from the response in the restore snapshot API’s [`feature_states`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore) parameter.
When you restore a feature state, {{es}} closes and overwrites the feature’s existing indices.
180
-
::::
228
+
To restore a specific feature state from the snapshot, specify the `feature_name` from the response in the [restore snapshot API’s](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore)`feature_states` parameter.
181
229
230
+
Note that feature state names may match {{kib}} UI sections, but restoring a single feature state may not fully reset that UI. For example, the {{fleet}} UI depends on the `fleet` feature state as well as `kibana` and `security`. When restoring, it's important to include all required feature states in the `feature_states` parameter to achieve the desired reset behavior.
182
231
183
232
::::{warning}
184
-
Restoring the `security` feature state overwrites system indices used for authentication. If you use {{ech}}, ensure you have access to the {{ech}} Console before restoring the `security` feature state. If you run {{es}} on your own hardware, [create a superuser in the file realm](../../../deploy-manage/tools/snapshot-and-restore/restore-snapshot.md#restore-create-file-realm-user) to ensure you’ll still be able to access your cluster.
233
+
Restoring the `security` feature state overwrites system indices used for authentication. If you use {{ech}} or {{ece}}, ensure you have access to the [{{es}} API console](cloud://reference/cloud-hosted/ec-api-console.md)before restoring the `security` feature state. If you run {{es}} on your own hardware or in {{eck}}, [create a temporary user with elevated permissions to edit restricted indices in the file realm](/troubleshoot/elasticsearch/file-based-recovery.md) to ensure you’ll still be able to access your cluster.
185
234
::::
186
235
236
+
When you restore a feature state, {{es}} closes and overwrites the feature’s existing indices and data streams. For example, to [snapshot restore](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore) the `geoip` feature state, you might use:
187
237
188
238
```console
189
239
POST _snapshot/my_repository/my_snapshot_2099.05.06/_restore
@@ -282,15 +332,7 @@ If you’re restoring to a different cluster, see [Restore to a different cluste
282
332
}
283
333
```
284
334
285
-
3. $$$restore-create-file-realm-user$$$If you use {{es}} security features, log in to a node host, navigate to the {{es}} installation directory, and add a user with the `superuser` role to the file realm using the [`elasticsearch-users`](elasticsearch://reference/elasticsearch/command-line-tools/users-command.md) tool.
286
-
287
-
For example, the following command creates a user named `restore_user`.
Use this file realm user to authenticate requests until the restore operation is complete.
335
+
3. $$$restore-create-file-realm-user$$$If you use {{es}} security features, follow [File-based access recovery](/troubleshoot/elasticsearch/file-based-recovery.md) to temporarily create a user with temporary elevated permissions to edit restricted indices. Use this file realm user to authenticate requests until the restore operation is complete.
294
336
295
337
4. Use the [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) to set [`action.destructive_requires_name`](elasticsearch://reference/elasticsearch/configuration-reference/index-management-settings.md#action-destructive-requires-name) to `false`. This lets you delete data streams and indices using wildcards.
Copy file name to clipboardExpand all lines: troubleshoot/elasticsearch/file-based-recovery.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,4 +236,4 @@ You can confirm that the desired `superduperuser` role is applied to your `admin
236
236
curl -X GET -sk -u "admin:changeme" "https://localhost:9200/_security/_authenticate?pretty=true"
237
237
```
238
238
239
-
Now that you have regained recovery access to the cluster, you can investigate and recover the {{stack}} {{security-features}} as needed.
239
+
Now that you have regained recovery access to the cluster, you can investigate and recover the {{stack}} {{security-features}} as needed. For more information, refer to [Restore a feature state](/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md#restore-feature-state).
0 commit comments