From 7d1e2118c58fc6e484366d8e3a7992501e634629 Mon Sep 17 00:00:00 2001 From: Vlada Chirmicci Date: Wed, 22 Oct 2025 16:31:50 +0100 Subject: [PATCH] Fixing Kibana snapshot & restore prereqs for index privileges Fixes #2497 as per feedback on the issue. I've pulled the common prereqs (cluster and index + the one about writeable metadata & cluster blocks) on those pages into a snippet. --- .../_snippets/restore-snapshot-common-prerequisites.md | 6 ++++++ .../tools/snapshot-and-restore/elastic-cloud-hosted.md | 8 ++------ .../tools/snapshot-and-restore/restore-snapshot.md | 7 +++---- deploy-manage/tools/snapshot-and-restore/self-managed.md | 8 ++------ 4 files changed, 13 insertions(+), 16 deletions(-) create mode 100644 deploy-manage/tools/snapshot-and-restore/_snippets/restore-snapshot-common-prerequisites.md diff --git a/deploy-manage/tools/snapshot-and-restore/_snippets/restore-snapshot-common-prerequisites.md b/deploy-manage/tools/snapshot-and-restore/_snippets/restore-snapshot-common-prerequisites.md new file mode 100644 index 0000000000..204c853f8a --- /dev/null +++ b/deploy-manage/tools/snapshot-and-restore/_snippets/restore-snapshot-common-prerequisites.md @@ -0,0 +1,6 @@ +* To use {{kib}}'s **Snapshot and Restore** feature, you must have the following permissions: + + * [Cluster privileges](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-cluster): `monitor`, `manage_slm`, `cluster:admin/snapshot`, and `cluster:admin/repository` + * [Index privilege](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices): `monitor` privilege on all the indices + +* To register a snapshot repository or restore a snapshot, the cluster’s global metadata must be writeable. Ensure there aren’t any [cluster blocks](elasticsearch://reference/elasticsearch/configuration-reference/miscellaneous-cluster-settings.md#cluster-read-only) that prevent write access. The restore operation ignores index blocks. \ No newline at end of file diff --git a/deploy-manage/tools/snapshot-and-restore/elastic-cloud-hosted.md b/deploy-manage/tools/snapshot-and-restore/elastic-cloud-hosted.md index 8909bf21ef..8c95d333fd 100644 --- a/deploy-manage/tools/snapshot-and-restore/elastic-cloud-hosted.md +++ b/deploy-manage/tools/snapshot-and-restore/elastic-cloud-hosted.md @@ -26,12 +26,8 @@ From within {{ech}}, you can restore a snapshot from a different deployment in t ## Prerequisites for {{ech}} -To use Kibana's Snapshot and Restore feature, you must have the following permissions: - -- Cluster privileges: `monitor`, `manage_slm`, `cluster:admin/snapshot`, and `cluster:admin/repository` -- Index privilege: `all` on the monitor index - -To register a snapshot repository, the cluster’s global metadata must be writable. Ensure there aren’t any cluster blocks that prevent write access. +:::{include} _snippets/restore-snapshot-common-prerequisites.md +::: ## Considerations diff --git a/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md b/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md index c0e15ab7c9..5634b4c6fa 100644 --- a/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md +++ b/deploy-manage/tools/snapshot-and-restore/restore-snapshot.md @@ -27,12 +27,11 @@ In this guide, you’ll learn how to: This guide also provides tips for [restoring to another cluster](#restore-different-cluster) and [troubleshooting common restore errors](#troubleshoot-restore). ## Prerequisites -- To use Kibana’s Snapshot and Restore feature, you must have the following permissions: - - [Cluster privileges](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-cluster): `monitor`, `manage_slm`, `cluster:admin/snapshot`, and `cluster:admin/repository` - - [Index privilege](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices): `all` on the monitor index +:::{include} _snippets/restore-snapshot-common-prerequisites.md +::: + - You can only restore a snapshot to a running cluster with an elected [master node](/deploy-manage/distributed-architecture/clusters-nodes-shards/node-roles.md#master-node-role). The snapshot’s repository must be registered and available to the cluster. - The snapshot and cluster versions must be compatible. See [Snapshot compatibility](/deploy-manage/tools/snapshot-and-restore.md#snapshot-compatibility). -- To restore a snapshot, the cluster’s global metadata must be writable. Ensure there aren’t any cluster blocks that prevent writes. The restore operation ignores index blocks. - Before you restore a data stream, ensure the cluster contains a [matching index template](/manage-data/use-case-use-elasticsearch-to-manage-time-series-data.md#create-ts-index-template) with data stream enabled. To check, use [Kibana’s Index Management](/manage-data/data-store/index-basics.md#index-management-manage-index-templates) feature or the get index template API: ```console diff --git a/deploy-manage/tools/snapshot-and-restore/self-managed.md b/deploy-manage/tools/snapshot-and-restore/self-managed.md index 98676e0c81..4a25c84cc7 100644 --- a/deploy-manage/tools/snapshot-and-restore/self-managed.md +++ b/deploy-manage/tools/snapshot-and-restore/self-managed.md @@ -21,12 +21,8 @@ In this guide, you’ll learn how to: ## Prerequisites [snapshot-repo-prereqs] -* To use {{kib}}'s **Snapshot and Restore** feature, you must have the following permissions: - - * [Cluster privileges](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-cluster): `monitor`, `manage_slm`, `cluster:admin/snapshot`, and `cluster:admin/repository` - * [Index privilege](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices): `all` on the `monitor` index - -* To register a snapshot repository, the cluster’s global metadata must be writeable. Ensure there aren’t any [cluster blocks](elasticsearch://reference/elasticsearch/configuration-reference/miscellaneous-cluster-settings.md#cluster-read-only) that prevent write access. +:::{include} _snippets/restore-snapshot-common-prerequisites.md +::: ## Considerations [snapshot-repo-considerations]