本地英文版地址: ../en/get-snapshot-repo-api.html
Get snapshot repository APIedit
Gets information about one or more registered snapshot repositories.
GET /_snapshot/my_repository
Path parametersedit
-
<repository>
-
(Required, string) Comma-separated list of snapshot repository names used to limit the request. Wildcard (
*
) expressions are supported.To get information about all snapshot repositories registered in the cluster, omit this parameter or use
*
or_all
.
Query parametersedit
-
local
-
(Optional, boolean) If
true
, the request gets information from the local node only. Iffalse
, the request gets information from the master node. Defaults tofalse
. -
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
.
Response bodyedit
-
<repository>
-
(object) Contains information about the snapshot repository. Key is the name of the snapshot repository.
Properties of
<repository>
-
type
-
(string) Repository type.
Values for
type
-
fs
- Shared file system repository. See Shared file system repository.
-
source
- Source-only repository. See Source only repository.
-
url
- URL repository. See Read-only URL repository.
More repository types are available through these official plugins:
- repository-s3 for S3 repository support
- repository-hdfs for HDFS repository support in Hadoop environments
- repository-azure for Azure storage repositories
- repository-gcs for Google Cloud Storage repositories
-
-
settings
-
(object) Contains settings for the repository. Valid properties for the
settings
object depend on the repository type, set using thetype
parameter.For properties, see the put snapshot repository API's
settings
parameter.
-
Examplesedit
GET /_snapshot/my_repository
The API returns the following response:
{ "my_repository" : { "type" : "fs", "settings" : { "location" : "my_backup_location" } } }