Commit graph

24 commits

Author SHA1 Message Date
Iraklis Psaroudakis
759e3f6c35
[7.17] Reference stored scripts in snapshot restore (#102966) (#103046)
Backports the following commits to 7.17:

Reference stored scripts in snapshot restore (Reference stored scripts
in snapshot restore #102966)
2023-12-20 07:34:33 -05:00
Gordon Brown
5672e993dd
Correct documentation regarding how to restore no feature_states (#83814) (#84072)
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:16:35 -05:00
James Rodewig
b891026ef4
[DOCS] Update xrefs for snapshot restore docs (#81023) (#81112)
Changes:

* Removes a leading slash from the restore snapshot API's prerequisites.
* Updates several xrefs that point to redirected pages.
2021-11-29 12:03:21 -05:00
James Rodewig
c13cd213bc
[DOCS] Overhaul snapshot and restore docs (#79081) (#80733)
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 13:23:48 -05:00
James Rodewig
170cc7b840
[DOCS] Add docs for restoring to new cluster (#79683) (#79875)
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:38:45 -04:00
James Rodewig
b85e6a8ef4
[7.16] [DOCS] Fix create snapshot API parameters (#79209) (#79625)
* [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

* Update `expand_wildcards` default

* Fix xref

* Fix xref
2021-10-21 09:33:26 -04:00
James Rodewig
11b429d4fb
[DOCS] Convert 'Restore a snapshot' to tutorial (#76929) (#78021)
Updates the 'Restore a snapshot' guide to be more tutorial-focused.
Adds a tutorial for restoring an entire cluster.

Closes #72497.
2021-09-21 16:16:40 -04:00
James Rodewig
1f2d997d9b
[DOCS] Clarify criteria for restore completion (#74094) (#74123)
A restore operation is complete when all attempts to recover primary shards have finished, even if unsuccessful.

Closes #70854
2021-06-15 08:40:56 -04:00
James Rodewig
770ddaf2a0
[DOCS] Note include_aliases supports data stream aliases (#73687) (#73717)
With #73595, data stream aliases now support the restore snapshot API's
`include_aliases` option.
2021-06-03 08:53:03 -04:00
James Rodewig
aac6011208
[DOCS] Update snapshot/restore for data stream aliases (#73438) (#73480)
In 7.14+, you can now create data stream aliases. This updates the related
snapshot/restore documentation.
2021-05-27 11:14:42 -04:00
James Rodewig
ae48ae11c7
[DOCS] Fix query parameters for restore API (#73015) (#73271) 2021-05-20 08:50:05 -04:00
David Turner
dfba61c0bc 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:17:04 +01:00
Martijn van Groningen
e1faf860b6
Allow closing a write index of a data stream. (#71030)
Backport of #70908 to 7.x branch.

Prior to this commit when attempting to close a data stream a validation error is returned indicating that it is forbidden to close a write index of a data stream. The idea behind that is to ensure that a data stream always can accept writes. For the same reason deleting a write index is not allowed (the write index can only be deleted when deleting the entire data stream).

However closing an index isn't as destructive as deleting an index (an open index request makes the write index available again) and there are other cases where a data stream can't accept writes. For example when primary shards of the write index are not available. So the original reasoning for not allowing to close a write index isn't that strong.

On top of this is that this also avoids certain administrative operations from being performed. For example restoring a snapshot containing data streams that already exist in the cluster (in place restore).

Closes #70903 #70861

* Update docs that closing a data stream's write index is allowed
See #70908

* iter

* iter
2021-03-30 13:45:00 +02:00
James Rodewig
3461dcd2f8
[DOCS] Fix collapsible properties role (#70756) (#70762)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-23 13:43:57 -04:00
Gordon Brown
2fde28e318
[7.x] 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 15:34:09 -07:00
James Rodewig
10df154ac8
[DOCS] Add security privileges to snapshot/restore API docs (#67955) (#68383) 2021-02-02 09:50:13 -05:00
David Turner
64de0ab753
Warn of change of default of wait_for_active_shards (#67527)
In 7.x the close indices API defaults to `?wait_for_active_shards=0` but
from 8.0 it will default to respecting the index settings instead. This
commit introduces the `index-setting` value for this parameter on this
API allowing users to opt-in to the future behaviour today, and starts
to emit a deprecation warning for users that use the default.

Relates #67158
Retry of #67246 now that #67498 is merged to `master`
Closes #66419
2021-01-14 17:10:35 +00:00
David Turner
11381c3f13 Revert "Warn of change of default of wait_for_active_shards (#67246)"
This reverts commit 8660e8d0fe.
2021-01-13 16:28:48 +00:00
David Turner
8660e8d0fe
Warn of change of default of wait_for_active_shards (#67246)
In 7.x the close indices API defaults to `?wait_for_active_shards=0` but
from 8.0 it will default to respecting the index settings instead. This
commit introduces the `index-setting` value for this parameter on this
API allowing users to opt-in to the future behaviour today, and starts
to emit a deprecation warning for users that use the default.

Relates #67158
Closes #66419
2021-01-13 14:34:48 +00:00
Dan Hermann
39c09f9326
[7.x] Include date in data stream backing index names (#66307) 2020-12-14 19:36:59 -06:00
James Rodewig
4ec9acd691
[DOCS] Correct restore snapshot API request example (#65525) (#65627)
Co-authored-by: bellengao <gbl_long@163.com>
2020-11-30 14:21:28 -05:00
James Rodewig
aea83909d9
[DOCS] Fix case for 'Boolean' (#64299) (#64341) 2020-10-29 10:04:20 -04:00
Adam Locke
751cee0042
Adding ignore_unavailable param. (#61368) (#61370) 2020-08-20 10:10:16 -04:00
Adam Locke
0a73225cd8
[DOCS] Adding new page for restore snapshot API (#59937) (#60055)
* 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 12:08:55 -04:00