stack es snapshot create cli command
elastic stack es snapshot create \
--repository <repository> \
--snapshot <snapshot> \
[options]
Create a snapshot.
Behaviour flags:
--dry-run — validate all inputs and exit without performing any action
--repositorystringrequired- The name of the repository for the snapshot.
--snapshotstringrequired- The name of the snapshot. It supportes date math. It must be unique in the repository.
--master-timeoutstring- The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
--wait-for-completion- If
true, the request returns a response when the snapshot is complete. Iffalse, the request returns a response when the snapshot initializes. --expand-wildcardsenum-
Determines how wildcard patterns in the
indicesparameter match data streams and indices. It supports comma-separated values such asopen,hidden.Values: all, open, closed, hidden, none
Repeatable: pass
--expand-wildcardsmultiple times to supply more than one value --feature-statesstring[]-
The feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If
include_global_stateistrue, all current feature states are included by default. Ifinclude_global_stateisfalse, no feature states are included by default. Note that specifying an empty array will result in the default behavior. To exclude all feature states, regardless of theinclude_global_statevalue, specify an array with only the valuenone(["none"]).Repeatable: pass
--feature-statesmultiple times to supply more than one value - If
true, the request ignores data streams and indices inindicesthat are missing or closed. Iffalse, the request returns an error for any data stream or index that is missing or closed. --include-global-state- If
true, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable viafeature_states). --indicesstring-
A comma-separated list of data streams and indices to include in the snapshot. It supports a multi-target syntax. The default is an empty array (
[]), which includes all regular data streams and regular indices. To exclude all data streams and indices, use-*. You can't use this parameter to include or exclude system indices or system data streams from a snapshot. Usefeature_statesinstead.Repeatable: pass
--indicesmultiple times to supply more than one value --metadatastring- Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. It can have any contents but it must be less than 1024 bytes. This information is not automatically generated by Elasticsearch.
--partial- If
true, allows the snapshot to proceed even if some of the target shards are unavailable. In this case, the resulting snapshot will not contain snapshots of the unavailable target shards, and will report its state asPARTIAL. Additionally, iftrue, allows index metadata operations such as deletions while the snapshot is in progress. This is almost always preferable to failing the snapshot completely when a single shard is unavailable, and blocking index metadata operations. Iffalse, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available, and index metadata operations such as deletions will be forbidden until the snapshot completes. --error-trace- When set to
trueElasticsearch will include the full stack trace of errors when they occur. --filter-pathstring-
Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.
Repeatable: pass
--filter-pathmultiple times to supply more than one value --human- When set to
truewill return statistics in a format suitable for humans. For example"exists_time": "1h"for humans and"exists_time_in_millis": 3600000for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. --pretty- If set to
truethe returned JSON will be "pretty-formatted". Only use this option for debugging only. --input-filestring- path to a JSON file to use as command input
--dry-run- validate all inputs and exit without performing any action (preview changes without applying them)
--json-
output as JSON