Create or update a snapshot repository Added in 0.0.0

PUT /_snapshot/{repository}

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.

External documentation

Path parameters

Query parameters

  • Explicit operation timeout for connection to master node

  • timeout string

    Explicit operation timeout

  • verify boolean

    Whether to verify the repository after creation

application/json

Body object Required

One of:

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

PUT /_snapshot/{repository}
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}"'
Run `PUT /_snapshot/my_repository` to create or update a shared file system snapshot repository.
{
  "type": "fs",
  "settings": {
    "location": "my_backup_location"
  }
}
Run `PUT /_snapshot/my_repository` to create or update an Azure snapshot repository.
{
  "type": "azure",
  "settings": {
    "client": "secondary"
  }
}
Run `PUT /_snapshot/my_gcs_repository` to create or update a Google Cloud Storage snapshot repository.
{
  "type": "gcs",
  "settings": {
    "bucket": "my_other_bucket",
    "base_path": "dev"
  }
}
Run `PUT /_snapshot/my_s3_repository` to create or update an AWS S3 snapshot repository.
{
  "type": "s3",
  "settings": {
    "bucket": "my-bucket"
  }
}
Run `PUT _snapshot/my_src_only_repository` to create or update a source-only snapshot repository.
{
  "type": "source",
  "settings": {
    "delegate_type": "fs",
    "location": "my_backup_repository"
  }
}
Run `PUT _snapshot/my_read_only_url_repository` to create or update a read-only URL snapshot repository.
{
  "type": "url",
  "settings": {
    "url": "file:/mount/backups/my_fs_backup_location"
  }
}
Response examples (200)
{
  "acknowledged": true
}