Create or update a snapshot repository
Added in 0.0.0
IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
To register a snapshot repository, the cluster's global metadata must be writeable.
Ensure there are no cluster blocks (for example, cluster.blocks.read_only
and clsuter.blocks.read_only_allow_delete
settings) that prevent write access.
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.
Path parameters
-
repository
string Required The name of the snapshot repository to register or update.
Query parameters
-
master_timeout
string The period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to
-1
. -
timeout
string The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. To indicate that the request should never timeout, set it to
-1
. -
verify
boolean If
true
, the request verifies the repository is functional on all master and data nodes in the cluster. Iffalse
, this verification is skipped. You can also perform this verification with the verify snapshot repository API.
Body
object
Required
-
uuid
string -
type
string Required Discriminator The Azure repository type.
Value is
azure
.
curl \
--request PUT 'http://api.example.com/_snapshot/{repository}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"type\": \"fs\",\n \"settings\": {\n \"location\": \"my_backup_location\"\n }\n}"'
{
"type": "fs",
"settings": {
"location": "my_backup_location"
}
}
{
"type": "azure",
"settings": {
"client": "secondary"
}
}
{
"type": "gcs",
"settings": {
"bucket": "my_other_bucket",
"base_path": "dev"
}
}
{
"type": "s3",
"settings": {
"bucket": "my-bucket"
}
}
{
"type": "source",
"settings": {
"delegate_type": "fs",
"location": "my_backup_repository"
}
}
{
"type": "url",
"settings": {
"url": "file:/mount/backups/my_fs_backup_location"
}
}
{
"acknowledged": true
}