Commit graph

25 commits

Author SHA1 Message Date
Liam Thompson
33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* Remove `es-test-dir` book-scoped variable

* Remove `plugins-examples-dir` book-scoped variable

* Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables

- In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed.
- In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path
- In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem

* Replace `es-repo-dir` with `es-ref-dir`

* Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
2024-04-17 14:37:07 +02:00
Iraklis Psaroudakis
ed2f02c963
Reference stored scripts in snapshot restore (#102966)
Closes #102903
2023-12-06 12:59:42 +02:00
Stef Nestor
9573f6f1f4
[DOC+] snapshot-restore single index example (#99065)
* [DOC+] snapshot-restore single index example

👋🏼 howdy, team! I'd like to append an example to snapshot-restore a single index. Support usually points users to [this page](https://www.elastic.co/guide/en/elasticsearch/reference/master/restore-snapshot-api.html) but then users attempt the `rename_pattern` example (which makes sense!). I'd like to point them to a more literal "close index > restore on that index" example in the future.

* Fix test failure and reword

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-31 16:23:50 +02:00
Gordon Brown
7d094c3e5a
Correct documentation regarding how to restore no feature_states (#83814)
This commit corrects the snapshot creation and restoration docs to
describe the usage of `"none"` to restore no feature states. Previously,
they incorrectly stated that using an empty array would accomplish this,
but specifying an empty array results in the default behavior (rather
than preventing feature state snapshot/restoration).
2022-02-16 20:04:00 -05:00
Ievgen Degtiarenko
e7d89910c2
validate snapshot has global state before restoring it (#82037)
It is possible to restore from a snapshot with a global
state even if it does not have one. This pr adds validation
to prevent this from happening.
2022-01-17 15:33:19 +01:00
James Rodewig
1519bb6ecb
[DOCS] Update snapshot defaults for system indices (#81226)
Updates the snapshot and restore docs for https://github.com/elastic/elasticsearch/pull/79670.

Closes https://github.com/elastic/elasticsearch/issues/81183
2021-12-08 10:15:14 -05:00
James Rodewig
4d19702221
[DOCS] Update xrefs for snapshot restore docs (#81023)
Changes:

* Removes a leading slash from the restore snapshot API's prerequisites.
* Updates several xrefs that point to redirected pages.
2021-11-29 11:52:02 -05:00
James Rodewig
659e0d3fd3
[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
2021-11-15 12:45:07 -05:00
James Rodewig
3ab614409d
[DOCS] Add docs for restoring to new cluster (#79683)
When restoring a snapshot to a new cluster, users may expect the cluster
to not contain any conflicting indices or data streams. However, some
features, such as the GeoIP processor, automatically create indices at
startup.

This adds and updates related procedures in the restore a snapshot tutorial.
I plan to improve other documentation related to feature states in snapshots
in a separate PR(s).

This PR also updates the restore snapshot API's example to include
the `indices` and `feature_states` parameters.

Relates to #79675
2021-10-26 17:27:11 -04:00
James Rodewig
12474b1b36
[DOCS] Fix create snapshot API parameters (#79209)
Changes:

- Notes snapshot names support date math
- Sorts request body parameters alphabetically
- Adds the `expand_wildcards` request body parameter
- Reuses cluster state contents list from the restore snapshot API
- Notes the `indices` and `feature_states` parameters support a special `none` value

Relates to #79081
2021-10-21 09:03:12 -04:00
James Rodewig
2fc3d40a13
[DOCS] Convert 'Restore a snapshot' to tutorial (#76929)
Updates the 'Restore a snapshot' guide to be more tutorial-focused.
Adds a tutorial for restoring an entire cluster.

Closes #72497.
2021-09-20 13:17:24 -04:00
James Rodewig
51ec860b48
[DOCS] Clarify criteria for restore completion (#74094)
A restore operation is complete when all attempts to recover primary shards have finished, even if unsuccessful.

Closes #70854
2021-06-15 08:30:51 -04:00
James Rodewig
68bb763343
[DOCS] Note include_aliases supports data stream aliases (#73687)
With #73595, data stream aliases now support the restore snapshot API's
`include_aliases` option.
2021-06-03 08:43:14 -04:00
James Rodewig
2fca666b47
[DOCS] Update snapshot/restore for data stream aliases (#73438)
In 7.14+, you can now create data stream aliases. This updates the related
snapshot/restore documentation.
2021-05-27 10:57:06 -04:00
James Rodewig
81de369635
[DOCS] Fix query parameters for restore API (#73015) 2021-05-20 08:38:37 -04:00
David Turner
8170376bf0
Restore global state does not merge (#73226)
Today the docs indicate that restoring a snapshot with
`include_global_state` set will merge the ingest pipelines, ILM
policies, settings etc in the snapshot with those already in the
cluster. This isn't the case, we simply replace all the things. This
commit corrects the docs.
2021-05-19 16:16:41 +01:00
Martijn van Groningen
9089e45173
Update docs that closing a data stream's write index is allowed (#71039)
This was forgotten as part of #70908
2021-03-30 11:49:09 +02:00
James Rodewig
7bddd7db5c
[DOCS] Fix collapsible properties role (#70756) 2021-03-23 11:14:46 -04:00
Gordon Brown
3f6472de74
Introduce "Feature States" for managing snapshots of system indices (#63513)
This PR expands the meaning of `include_global_state` for snapshots to include system indices. If `include_global_state` is `true` on creation, system indices will be included in the snapshot regardless of the contents of the `indices` field. If `include_global_state` is `true` on restoration, system indices will be restored (if included in the snapshot), regardless of the contents of the `indices` field. Index renaming is not applied to system indices, as system indices rely on their names matching certain patterns. If restored system indices are already present, they are automatically deleted prior to restoration from the snapshot to avoid conflicts.

This behavior can be overridden to an extent by including a new field in the snapshot creation or restoration call, `feature_states`, which contains an array of strings indicating the "feature" for which system indices should be snapshotted or restored. For example, this call will only restore the `watcher` and `security` system indices (in addition to `index_1`):

```
POST /_snapshot/my_repository/snapshot_2/_restore
{
  "indices": "index_1",
  "include_global_state": true,
  "feature_states": ["watcher", "security"]
}
```

If `feature_states` is present, the system indices associated with those features will be snapshotted or restored regardless of the value of `include_global_state`. All system indices can be omitted by providing a special value of `none` (`"feature_states": ["none"]`), or included by omitting the field or explicitly providing an empty array (`"feature_states": []`), similar to the `indices` field.

The list of currently available features can be retrieved via a new "Get Snapshottable Features" API:
```
GET /_snapshottable_features
```

which returns a response of the form:
```
{
    "features": [
        {
            "name": "tasks",
            "description": "Manages task results"
        },
        {
            "name": "kibana",
            "description": "Manages Kibana configuration and reports"
        }
    ]
}
```

Features currently map one-to-one with `SystemIndexPlugin`s, but this should be considered an implementation detail. The Get Snapshottable Features API and snapshot creation rely upon all relevant plugins being installed on the master node.

Further, the list of feature states included in a given snapshot is exposed by the Get Snapshot API, which now includes a new field, `feature_states`, which contains a list of the feature states and their associated system indices which are included in the snapshot. All system indices in feature states are also included in the `indices` array for backwards compatibility, although explicitly requesting system indices included in a feature state is deprecated. For example, an excerpt from the Get Snapshot API showing `feature_states`:
```
"feature_states": [
    {
        "feature_name": "tasks",
        "indices": [
            ".tasks"
        ]
    }
],
"indices": [
    ".tasks",
    "test1",
    "test2"
]
```

Co-authored-by: William Brafford <william.brafford@elastic.co>
2021-02-11 11:55:14 -07:00
James Rodewig
b49576fabf
[DOCS] Add security privileges to snapshot/restore API docs (#67955) 2021-02-02 09:34:35 -05:00
Dan Hermann
83a5256dc2
Include date in data stream backing index names (#65205) 2020-12-14 16:46:54 -06:00
bellengao
80df5fe2f3
[DOCS] Correct restore snapshot API request example (#65525) 2020-11-30 13:55:37 -05:00
James Rodewig
1ea83359bb
[DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00
Adam Locke
186feaa437
Adding ignore_unavailable param. (#61368) 2020-08-20 09:39:25 -04:00
Adam Locke
396dcffe39
[DOCS] Adding new page for restore snapshot API (#59937)
* Adding new page for restore snapshot API.

* Improving test cases, lots of edits, and streamlining content.

* Incorporating review suggestions and feedback.

* Specify `index alias` vs `alias`

* Change parameter order

* Provide clarity around regular expression

* Add link to SLM parameters

* Split sentences in example

* Adding link to master node page.
2020-07-22 11:42:17 -04:00