mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
[DOCS] Overhaul snapshot and restore docs (#79081)
Makes several changes to consolidate snapshot and backup-related docs. Highlights: * Adds info about supported ESS snapshot repository types * Adds docs for Kibana's Snapshot and Restore feature * Combines tutorial pages related to taking and managing snapshots * Consolidates explanations of the snapshot process * Incorporates SLM into the snapshot tutorial * Removes duplicate "back up a cluster" pages
This commit is contained in:
parent
987010db47
commit
659e0d3fd3
37 changed files with 1195 additions and 1449 deletions
|
@ -3,8 +3,9 @@
|
|||
== {slm-cap} APIs
|
||||
|
||||
You use the following APIs to set up policies to automatically take snapshots and
|
||||
control how long they are retained.
|
||||
For more information about {slm} ({slm-init}), see <<snapshot-lifecycle-management>>.
|
||||
control how long they are retained.
|
||||
|
||||
For more information about {slm} ({slm-init}), see <<automate-snapshots-slm>>.
|
||||
|
||||
[discrete]
|
||||
[[slm-api-policy-endpoint]]
|
||||
|
|
|
@ -58,7 +58,7 @@ If successful, this request returns the generated snapshot name:
|
|||
|
||||
The snapshot is taken in the background. You can use the
|
||||
<<snapshot-lifecycle-management-api,snapshot APIs>> to
|
||||
<<snapshots-monitor-snapshot-restore,monitor the status of the snapshot>>.
|
||||
<<monitor-snapshot,monitor the status of the snapshot>>.
|
||||
|
||||
To see the status of a policy's most recent snapshot, you can use the
|
||||
<<slm-api-get-policy,get snapshot lifecycle policy API>>.
|
||||
|
|
|
@ -11,9 +11,9 @@ information about the latest snapshot attempts.
|
|||
[[slm-api-get-request]]
|
||||
==== {api-request-title}
|
||||
|
||||
`GET /_slm/policy/<policy-id>`
|
||||
`GET _slm/policy/<policy-id>`
|
||||
|
||||
`GET /_slm/policy`
|
||||
`GET _slm/policy`
|
||||
|
||||
[[slm-api-get-lifecycle-prereqs]]
|
||||
==== {api-prereq-title}
|
||||
|
@ -44,44 +44,44 @@ Comma-separated list of snapshot lifecycle policy IDs.
|
|||
|
||||
////
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
PUT /_slm/policy/daily-snapshots
|
||||
----
|
||||
PUT _slm/policy/daily-snapshots
|
||||
{
|
||||
"schedule": "0 30 1 * * ?", <1>
|
||||
"name": "<daily-snap-{now/d}>", <2>
|
||||
"repository": "my_repository", <3>
|
||||
"config": { <4>
|
||||
"indices": ["data-*", "important"], <5>
|
||||
"schedule": "0 30 1 * * ?",
|
||||
"name": "<daily-snap-{now/d}>",
|
||||
"repository": "my_repository",
|
||||
"config": {
|
||||
"indices": ["data-*", "important"],
|
||||
"ignore_unavailable": false,
|
||||
"include_global_state": false
|
||||
},
|
||||
"retention": { <6>
|
||||
"expire_after": "30d", <7>
|
||||
"min_count": 5, <8>
|
||||
"max_count": 50 <9>
|
||||
"retention": {
|
||||
"expire_after": "30d",
|
||||
"min_count": 5,
|
||||
"max_count": 50
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
----
|
||||
// TEST[setup:setup-repository]
|
||||
////
|
||||
|
||||
Get the `daily-snapshots` policy:
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
GET /_slm/policy/daily-snapshots?human
|
||||
--------------------------------------------------
|
||||
----
|
||||
GET _slm/policy/daily-snapshots?human
|
||||
----
|
||||
// TEST[continued]
|
||||
|
||||
This request returns the following response:
|
||||
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
----
|
||||
{
|
||||
"daily-snapshots" : {
|
||||
"version": 1, <1>
|
||||
"modified_date": "2019-04-23T01:30:00.000Z", <2>
|
||||
"modified_date_millis": 1556048137314,
|
||||
"daily-snapshots": {
|
||||
"version": 1, <1>
|
||||
"modified_date": "2099-05-06T01:30:00.000Z", <2>
|
||||
"modified_date_millis": 4081757400000,
|
||||
"policy" : {
|
||||
"schedule": "0 30 1 * * ?",
|
||||
"name": "<daily-snap-{now/d}>",
|
||||
|
@ -104,12 +104,16 @@ This request returns the following response:
|
|||
"snapshots_deleted": 0,
|
||||
"snapshot_deletion_failures": 0
|
||||
},
|
||||
"next_execution": "2019-04-24T01:30:00.000Z", <3>
|
||||
"next_execution_millis": 1556048160000
|
||||
"next_execution": "2099-05-07T01:30:00.000Z", <3>
|
||||
"next_execution_millis": 4081843800000
|
||||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// TESTRESPONSE[s/"modified_date": "2019-04-23T01:30:00.000Z"/"modified_date": $body.daily-snapshots.modified_date/ s/"modified_date_millis": 1556048137314/"modified_date_millis": $body.daily-snapshots.modified_date_millis/ s/"next_execution": "2019-04-24T01:30:00.000Z"/"next_execution": $body.daily-snapshots.next_execution/ s/"next_execution_millis": 1556048160000/"next_execution_millis": $body.daily-snapshots.next_execution_millis/]
|
||||
----
|
||||
// TESTRESPONSE[s/"version": 1/"version": $body.daily-snapshots.version/]
|
||||
// TESTRESPONSE[s/"modified_date": "2099-05-06T01:30:00.000Z"/"modified_date": $body.daily-snapshots.modified_date/]
|
||||
// TESTRESPONSE[s/"modified_date_millis": 4081757400000/"modified_date_millis": $body.daily-snapshots.modified_date_millis/]
|
||||
// TESTRESPONSE[s/"next_execution": "2099-05-07T01:30:00.000Z"/"next_execution": $body.daily-snapshots.next_execution/]
|
||||
// TESTRESPONSE[s/"next_execution_millis": 4081843800000/"next_execution_millis": $body.daily-snapshots.next_execution_millis/]
|
||||
<1> The version of the snapshot policy, only the latest version is stored and incremented when the policy is updated
|
||||
<2> The last time this policy was modified.
|
||||
<3> The next time this policy will be executed.
|
||||
|
@ -119,7 +123,7 @@ This request returns the following response:
|
|||
===== Get all policies
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
GET /_slm/policy
|
||||
--------------------------------------------------
|
||||
----
|
||||
GET _slm/policy
|
||||
----
|
||||
// TEST[continued]
|
||||
|
|
|
@ -15,9 +15,9 @@ Creates or updates a snapshot lifecycle policy.
|
|||
[[slm-api-put-prereqs]]
|
||||
==== {api-prereq-title}
|
||||
|
||||
If the {es} {security-features} are enabled, you must have the
|
||||
If the {es} {security-features} are enabled, you must have the
|
||||
`manage_slm` cluster privilege and the `manage` index privilege
|
||||
for any included indices to use this API.
|
||||
for any included indices to use this API.
|
||||
For more information, see <<security-privileges>>.
|
||||
|
||||
[[slm-api-put-desc]]
|
||||
|
@ -63,13 +63,13 @@ include::{es-repo-dir}/snapshot-restore/apis/create-snapshot-api.asciidoc[tag=sn
|
|||
(Required, string)
|
||||
Name automatically assigned to each snapshot created by the policy.
|
||||
<<date-math-index-names,Date math>> is supported.
|
||||
To prevent conflicting snapshot names, a UUID is automatically appended to each
|
||||
To prevent conflicting snapshot names, a UUID is automatically appended to each
|
||||
snapshot name.
|
||||
|
||||
`repository`::
|
||||
(Required, string)
|
||||
Repository used to store snapshots created by this policy. This repository must
|
||||
exist prior to the policy's creation. You can create a repository using the
|
||||
Repository used to store snapshots created by this policy. This repository must
|
||||
exist prior to the policy's creation. You can create a repository using the
|
||||
<<modules-snapshots,snapshot repository API>>.
|
||||
|
||||
[[slm-api-put-retention]]
|
||||
|
@ -86,6 +86,7 @@ Time period after which a snapshot is considered expired and eligible for
|
|||
deletion. {slm-init} deletes expired snapshots based on the
|
||||
<<slm-retention-schedule,`slm.retention_schedule`>>.
|
||||
|
||||
// To update {max-snapshot-count}, see docs/Version.asciidoc
|
||||
`max_count`::
|
||||
(Optional, integer)
|
||||
Maximum number of snapshots to retain, even if the snapshots have not yet
|
||||
|
@ -94,9 +95,8 @@ policy retains the most recent snapshots and deletes older snapshots. This limit
|
|||
only includes snapshots with a <<get-snapshot-api-response-state,`state`>> of
|
||||
`SUCCESS`.
|
||||
+
|
||||
NOTE: The maximum number of snapshots in a repository should not exceed `200`. This ensures that the snapshot repository metadata does not
|
||||
grow to a size which might destabilize the master node. If the `max_count` setting is not set, this limit should be enforced by configuring
|
||||
other retention rules such that the repository size does not exceed `200` snapshots.
|
||||
NOTE: This value should not exceed {max-snapshot-count}. See
|
||||
<<snapshot-retention-limits>>.
|
||||
|
||||
`min_count`::
|
||||
(Optional, integer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue