Skip to content

Conversation

@stefnestor
Copy link
Contributor

👋 howdy, team!

This

  • adds in the two most common errors encountered when snapshot restoring feature states / system indices wrong
  • cross-links how to get the needed restricted permissions to restore system feature states (and removes outdated-since-v8.0 information which no longer works)
  • adds in an example API outline of reading the feature state to its snapshot appearance to determining which to restore

Related changed pages

@stefnestor
Copy link
Contributor Author

👋 may I have help on failing check

info ::e.d.i.atedBuildService:: Finished building and exporting exporters Html, LLMText, Configuration, DocumentationState, LinkMetadata, Redirects

	The following errors and warnings were found in the documentation

Error: 'reference/cloud/cloud-hosted/ec-api-console.md' is not a valid link in the 'cloud' cross link index: https://elastic-docs-link-index.s3.us-east-2.amazonaws.com/elastic/cloud/master/links.json
     ┌─[/github/workspace/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md]
     │
 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/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.
     ·                                                                                                                                                       ──────────────────────────────────────────────────────                                                                                                                                                                                                                                                                                                                                        
     ·                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
     │
     └─



	1 Errors / 0 Warnings / 0 Hints

related documentation doesn't say how to cross-link cloud reference section 🙏

@github-actions
Copy link

Copy link
Contributor

@yetanothertw yetanothertw left a comment

Choose a reason for hiding this comment

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

Hi @stefnestor -- thank you so much for your contributions! 🌻

I've fixed the link that was causing the check to fail, and the docs build fine now. I've also left a few suggestions for style and clarity for your consideration.

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.

In {{es}} 8.0 and later versions, feature states are the only way to back up and restore system indices and system data streams.
In {{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 will be blocked by an error. For example index `.example` this error would appear like
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor tweak for clarity and minimalism:

Suggested change
In {{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 will be blocked by an error. For example index `.example` this error would appear like
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:

requested system indices [.example], but system indices can only be restored as part of a feature state
```

Restoring system indices and data streams will require temporary elevated permissions to edit restricted indices. For more information see [File-based access recovery](/troubleshoot/elasticsearch/file-based-recovery.md). Attempting to restore a system index or data stream without these temporary elevated permissions will be blocked by an error. For example index `.example` this error would appear like
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Restoring system indices and data streams will require temporary elevated permissions to edit restricted indices. For more information see [File-based access recovery](/troubleshoot/elasticsearch/file-based-recovery.md). Attempting to restore a system index or data stream without these temporary elevated permissions will be blocked by an error. For example index `.example` this error would appear like
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:

```

Now that you have regained recovery access to the cluster, you can investigate and recover the {{stack}} {{security-features}} as needed.
Now that you have regained recovery access to the cluster, you can investigate and recover the {{stack}} {{security-features}} as needed. For more information, see [Restore a feature state](/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md#restore-feature-state).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Now that you have regained recovery access to the cluster, you can investigate and recover the {{stack}} {{security-features}} as needed. For more information, see [Restore a feature state](/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md#restore-feature-state).
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).

This is a tiny style guide-related nitpick. Using refer to instead of see is preferred as a more actionable alternative. I'm relatively newish to the docs team myself, so sharing my learnings as I go 😅

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.

To view a snapshots feature states, use the get snapshot API.
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 SLM policy `cloud-snapshot-policy`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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 SLM policy `cloud-snapshot-policy`.
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:

```

The response’s `feature_states` property contains a list of features in the snapshot as well as each feature’s indices.
The response’s `feature_states` property contains a list of features in the snapshot as well as each feature’s indices. For an example cluster, its output might appear:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The response’s `feature_states` property contains a list of features in the snapshot as well as each feature’s indices. For an example cluster, its output might appear:
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:

::::
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.

Feature state names may line-up to {{kib}} UI sections while not being encompassing to completely reset that UI. For example, the {{fleet}} UI backs against the `fleet` feature state as well as `kibana` and `security`. It is important to ensure you line up desired reset behavior with which backing feature states to include in the `feature_states` parameter when restoring.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Feature state names may line-up to {{kib}} UI sections while not being encompassing to completely reset that UI. For example, the {{fleet}} UI backs against the `fleet` feature state as well as `kibana` and `security`. It is important to ensure you line up desired reset behavior with which backing feature states to include in the `feature_states` parameter when restoring.
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.

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.
::::

When you restore a feature state, {{es}} closes and overwrites the feature’s existing indices and data streams. Therefore to [snapshot restore](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore) the `geoip` feature state for example will appear like:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
When you restore a feature state, {{es}} closes and overwrites the feature’s existing indices and data streams. Therefore to [snapshot restore](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore) the `geoip` feature state for example will appear like:
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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants