Registers or updates a snapshot repository.
PUT /_snapshot/my_repository
{
"type": "fs",
"settings": {
"location": "my_backup_location"
}
}
-
If the Elasticsearch security features are enabled, you must have the
managecluster privilege to use this API.
- To register a snapshot repository, the cluster’s global metadata must be writeable. Ensure there aren’t any cluster blocks that prevent write access.
-
<repository> - (Required, string) Name of the snapshot repository to register or update.
Several options for this API can be specified using a query parameter or a request body parameter. If both parameters are specified, only the query parameter is used.
-
master_timeout -
(Optional, time units) Specifies the period of time 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. Defaults to
30s. -
timeout -
(Optional, time units) Specifies the period of time to wait for
a response. If no response is received before the timeout expires, the request
fails and returns an error. Defaults to
30s. -
verify -
(Optional, Boolean) If
true, the request verifies the repository is functional on all master and data nodes in the cluster. Iffalse, this verification is skipped. Defaults totrue.You can manually perform this verification using the verify snapshot repository API.
-
type -
(Required, string) Repository type.
Valid values for
typeOther repository types are available through official plugins:
-
settings -
(Required, object) Settings for the repository. Supported settings vary based on the repository type:
Other repository types are available through official plugins:
-
verify -
(Optional, Boolean) If
true, the request verifies the repository is functional on all master and data nodes in the cluster. Iffalse, this verification is skipped. Defaults totrue.You can manually perform this verification using the verify snapshot repository API.