Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS][7.4] Adds permissions to snapshot docs #59492

Merged
merged 1 commit into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 54 additions & 46 deletions docs/management/snapshot-restore/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
[[snapshot-repositories]]
== Snapshot and Restore

*Snapshot and Restore* enables you to backup your {es}
indices and clusters using data and state snapshots.
Snapshots are important because they provide a copy of your data in case
*Snapshot and Restore* enables you to backup your {es}
indices and clusters using data and state snapshots.
Snapshots are important because they provide a copy of your data in case
something goes wrong. If you need to roll back to an older version of your data,
you can restore a snapshot from the repository.

You’ll find *Snapshot and Restore* under *Management > Elasticsearch*.
You’ll find *Snapshot and Restore* under *Management > Elasticsearch*.
With this UI, you can:

* <<kib-snapshot-register-repository, Register a repository for storing your snapshots>>
Expand All @@ -20,66 +20,79 @@ With this UI, you can:
[role="screenshot"]
image:management/snapshot-restore/images/snapshot_list.png["Snapshot list"]

Before using this feature, you should be familiar with how snapshots work.
{ref}/modules-snapshots.html[Snapshot and Restore] is a good source for
Before using this feature, you should be familiar with how snapshots work.
{ref}/modules-snapshots.html[Snapshot and Restore] is a good source for
more detailed information.

[float]
[[snapshot-permissions]]
=== Required permissions
The minimum required permissions to access *Snapshot and Restore* include:

* Cluster privileges: `monitor`, `manage_slm`, `cluster:admin/snapshot`, and `cluster:admin/repository`
* Index privileges: `all` on the `monitor` index if you want to access content in the *Restore Status* tab

You can add these privileges in *Management > Security > Roles*.

[role="screenshot"]
image:management/snapshot-restore/images/snapshot_permissions.png["Edit Role"]

[float]
[[kib-snapshot-register-repository]]
=== Register a repository

The *Repositories* view provides an overview of your repositories.
The *Repositories* view provides an overview of your repositories.
Click a repository name to view its type, number of snapshots, and settings, and also to verify status.

[role="screenshot"]
image:management/snapshot-restore/images/repository_list.png["Repository list"]

If you don't have a repository, you're prompted to register one.
If you don't have a repository, you're prompted to register one.
{es} supports three repository types
out of the box: shared file system, read-only URL, and source-only.
For more information on these repositories and their settings,
see {ref}/modules-snapshots.html#snapshots-repositories[Repositories]. For an example,
out of the box: shared file system, read-only URL, and source-only.
For more information on these repositories and their settings,
see {ref}/modules-snapshots.html#snapshots-repositories[Repositories]. For an example,
see <<snapshot-repositories-example, registering a shared file system repository>>.

To use other repositories, such as S3, you can install plugins. See
To use other repositories, such as S3, you can install plugins. See
{ref}/modules-snapshots.html#_repository_plugins[Repository plugins].

[float]
[[kib-view-snapshot]]
=== View your snapshots

The *Snapshots* view gives an overview of your snapshots. You can drill down
The *Snapshots* view gives an overview of your snapshots. You can drill down
into each snapshot for further investigation.

[role="screenshot"]
image:management/snapshot-restore/images/snapshot_details.png["Snapshot details"]

If you don’t have any snapshots, you can create them from the {kib} <<console-kibana, Console>>. The
If you don’t have any snapshots, you can create them from the {kib} <<console-kibana, Console>>. The
{ref}//modules-snapshots.html#snapshots-take-snapshot[snapshot API]
takes the current state and data in your index or cluster, and then saves it to a
shared repository.
takes the current state and data in your index or cluster, and then saves it to a
shared repository.

The snapshot process is "smart." Your first snapshot is a complete copy of
The snapshot process is "smart." Your first snapshot is a complete copy of
the data in your index or cluster.
All subsequent snapshots save the changes between the existing snapshots and
All subsequent snapshots save the changes between the existing snapshots and
the new data.

[float]
[[kib-restore-snapshot]]
=== Restore a snapshot

The *Restore* wizard walks you through the process of restoring a snapshot
into a running cluster. To get started, go to the *Snapshots* view, find the
snapshot, and click the restore icon in the *Actions* column.
The *Restore* wizard walks you through the process of restoring a snapshot
into a running cluster. To get started, go to the *Snapshots* view, find the
snapshot, and click the restore icon in the *Actions* column.

You’re presented
options for the restore, including which
You’re presented
options for the restore, including which
indices to restore and whether to modify the index settings.
You can restore an existing index only if it’s closed and has the same
You can restore an existing index only if it’s closed and has the same
number of shards as the index in the snapshot.

Once you initiate the restore, you're navigated to the *Restore Status* view,
where you can track the progress.
where you can track the progress.

[role="screenshot"]
image:management/snapshot-restore/images/snapshot-restore.png["Snapshot details"]
Expand All @@ -89,14 +102,14 @@ image:management/snapshot-restore/images/snapshot-restore.png["Snapshot details"
[[kib-snapshot-policy]]
=== Create a snapshot lifecycle policy

You can create policies to schedule automatic snapshots of your cluster.
{ref}/snapshot-lifecycle-management-api.html[Snapshot lifecycle policies] are related
to {ref}/index-lifecycle-management.html[index lifecycle policies].
However, where an index lifecycle policy applies to a single index,
You can create policies to schedule automatic snapshots of your cluster.
{ref}/snapshot-lifecycle-management-api.html[Snapshot lifecycle policies] are related
to {ref}/index-lifecycle-management.html[index lifecycle policies].
However, where an index lifecycle policy applies to a single index,
a snapshot lifecycle policy can span multiple indices.

For an overview of your policies, open the *Policies* view.
You can drill down into each policy to examine its settings and last successful and failed run.
You can drill down into each policy to examine its settings and last successful and failed run.

If you don’t have any policies, use the *Create policy* wizard.
You’ll define the snapshots and repository, when to take snapshots, and
Expand All @@ -118,21 +131,21 @@ This action does not cancel any currently ongoing snapshots or remove any previo
=== Delete a snapshot

Delete snapshots to manage your repository storage space.
Find the snapshot in the *Snapshots* view and click the trash icon in the
*Actions* column. To delete snapshots in bulk, select their checkboxes,
Find the snapshot in the *Snapshots* view and click the trash icon in the
*Actions* column. To delete snapshots in bulk, select their checkboxes,
and then click *Delete snapshots*.

[[snapshot-repositories-example]]
[float]
=== Example: Register a shared file system repository

This example shows how to register a shared file system repository
This example shows how to register a shared file system repository
and store snapshots.

[float]
==== Register the repository location

You must register the location of the repository in the `path.repo` setting on
You must register the location of the repository in the `path.repo` setting on
your master and data nodes. You can do this in one of two ways:

* Edit your `elasticsearch.yml` to include the `path.repo` setting.
Expand All @@ -144,15 +157,15 @@ your master and data nodes. You can do this in one of two ways:
[float]
==== Register the repository

Use *Snapshot and Restore* to register the repository where your snapshots
will live.
Use *Snapshot and Restore* to register the repository where your snapshots
will live.

. Go to *Management > Elasticsearch > Snapshot and Restore*.
. Open the *Repositories* view.
. Click *Register a repository*.
. Enter a name for your repository, for example, `my_backup`.
. Set *Repository type* to Shared file system.
+
+
[role="screenshot"]
image:management/snapshot-restore/images/register_repo.png["Register repository"]

Expand All @@ -164,7 +177,7 @@ image:management/snapshot-restore/images/register_repo.png["Register repository"
+
Your new repository is listed on the *Repositories* view.
+
. Click the respository and inspect its details.
. Click the respository and inspect its details.
+
The repository currently doesn’t have any snapshots.

Expand All @@ -174,19 +187,14 @@ The repository currently doesn’t have any snapshots.
Use the {ref}//modules-snapshots.html#snapshots-take-snapshot[snapshot API] to create a snapshot.

. Go to *Dev Tools > Console*.
. Create the snapshot.
. Create the snapshot.
+
In this example, the snapshot name is `2019-04-25_snapshot`. You can also
In this example, the snapshot name is `2019-04-25_snapshot`. You can also
use {ref}//date-math-index-names.html[date math expression] for the snapshot name.
+
[role="screenshot"]
image:management/snapshot-restore/images/create_snapshot.png["Create snapshot"]
+
. Open *Snapshot and Restore*.
. Open *Snapshot and Restore*.
+
Your new snapshot is available in the *Snapshots* view.