Commit graph

18 commits

Author SHA1 Message Date
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
89de0f1c12
[DOCS] Update multi-target syntax refs (#83703) (#83747)
(cherry picked from commit 6522e6eea2)

# Conflicts:
#	docs/reference/snapshot-restore/apis/create-snapshot-api.asciidoc
2022-02-09 13:44:37 -05:00
Joe Gallo
7749d6a4c5 Fix get-snapshot-api :docs:integTest (#83273) 2022-01-28 12:33:42 -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
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
89d0caca0f [DOCS] Fix whitespace to hide attribute 2021-08-22 21:19:19 -04:00
James Rodewig
fd7904fc9b
[DOCS] Reuse snapshot config in put SLM policy API docs (#76712) (#76750)
Updates the put SLM policy API's `config` parameter to reuse the create snapshot API's request body parameters.
Previously, the `config` parameter was missing the `feature_states` parameter. This change should keep the two docs in sync.
2021-08-20 08:40:04 -04:00
James Rodewig
d3b853d719
[DOCS] Fix data type for create snapshot API's metadata param (#76465) (#76471) 2021-08-12 16:51:00 -04:00
James Rodewig
d84b48f5c7
[DOCS] Fix query params for create snapshot API (#76436) (#76442)
Moves the `master_timeout` and `wait_for_completion` parameters to a query parameters section.
2021-08-12 13:32:44 -04:00
Armin Braun
d64a72c127
Snapshot Pagination and Scalability Improvements Backport to 7.x (#74676)
Backport of the recently introduced snapshot pagination and scalability improvements listed below.
Merged as a single backport because the `7.x` and master snapshot status API logic had massively diverged between master and 7.x. With the work in the below PRs, the logic in master and 7.x once again has been aligned very closely again.

#72842
#73172
#73199
#73570 
#73952
#74236 
#74451 (this one is only partly applicable as it was mainly a change to master to align `master` and `7.x` branches)
2021-06-29 15:16:26 +02:00
James Rodewig
c757f9e4e7
[DOCS] Fix double spaces (#71082) (#71120) 2021-03-31 11:43:34 -04:00
James Rodewig
302341a526
[DOCS] Replace put with create or update in API names (#70330) (#70421)
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-15 17:16:13 -04:00
Gordon Brown
2657496dc7
Change Get Snapshottable Features endpoint to _features (#69755)
The endpoint `_snapshottable_features` is long and implies incorrect
things about this API - it is used not just for snapshots, but also for
the upcoming reset API. Following discussions on the team, this commit
changes the endpoint to `_features` and removes the connection between
this API and snapshots, as snapshots are not the only use for the output
of this API.
2021-03-02 15:33:40 -07: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
James Rodewig
aea83909d9
[DOCS] Fix case for 'Boolean' (#64299) (#64341) 2020-10-29 10:04:20 -04:00
Armin Braun
ecf97e9415
Remove Outdated Documentation On Snapshots (#59358) (#59585)
* We now have concurrent repository operations so the one at a time limit does not apply any longer
* Initialization was never slow solely due to loading information about all existing snaphots (though this contributed)
but also because two cluster state updates and a few writes to the repository had to happen before initialization could return
   * Repo data necessary for a snapshot create operation is now cached on heap so loading it is effectively instant
   * Snapshot initialization is just a single CS update now
   * Initialization does no writes to the repository whatsoever
* Fixed missing `repository`
2020-07-15 07:49:18 +02:00
Adam Locke
719f2fb135
[DOCS] [7.x] Adding create index snapshot API docs (#58519) (#58692)
* Adding create index snapshot API page.
* Condense API description.
* Remove parameter from query.
* Add POST method and remove `-name` from the snapshot variable.
* Expand description of `<snapshot>`.
* Add data streams to introduction and expand the overall description.
* Add support for data streams.
* Add support for data streams.
* Add data stream and reference for "point-in-time view".
* Add data streams.
* Change `my_backup` to `my_repository`.
* Add description of boolean options for `wait_for_completion` parameter.
* Change command --> response
* Clarify `indices` parameter description
* Update `ignore-unavailable` parameter description
* Reword example description
* Remove "index" from API name
* Incorporating review comments from James R.
* Adding a much better request + response
* Clarify `include_global_state` description
* Incorporating additional edits.
* Changing my_backup to my_repository in example.
* Update snippet test to avoid failures
* Update TESTRESPONSE snippets
* Remove errant space
* Removing the  parameter per reviewer comments
2020-06-29 16:13:53 -04:00