|
| 1 | +[[verify-snapshot-repo-api]] |
| 2 | +=== Verify snapshot repository API |
| 3 | +++++ |
| 4 | +<titleabbrev>Verify snapshot repository</titleabbrev> |
| 5 | +++++ |
| 6 | + |
| 7 | +Verifies that a snapshot repository is functional. |
| 8 | + |
| 9 | +//// |
| 10 | +[source,console] |
| 11 | +---- |
| 12 | +PUT /_snapshot/my_repository |
| 13 | +{ |
| 14 | + "type": "fs", |
| 15 | + "settings": { |
| 16 | + "location": "my_backup_location" |
| 17 | + } |
| 18 | +} |
| 19 | +---- |
| 20 | +// TESTSETUP |
| 21 | +//// |
| 22 | + |
| 23 | +[source,console] |
| 24 | +---- |
| 25 | +POST /_snapshot/my_repository/_verify |
| 26 | +---- |
| 27 | + |
| 28 | +[[verify-snapshot-repo-api-request]] |
| 29 | +==== {api-request-title} |
| 30 | + |
| 31 | +`POST /_snapshot/<repository>/_verify` |
| 32 | + |
| 33 | +[[verify-snapshot-repo-api-desc]] |
| 34 | +==== {api-description-title} |
| 35 | + |
| 36 | +By default, <<put-snapshot-repo-api,put snapshot repository API>> requests |
| 37 | +verify that a snapshot is functional on all master and data nodes in the |
| 38 | +cluster. |
| 39 | + |
| 40 | +You can skip this verification using the put snapshot repository API's `verify` |
| 41 | +parameter. You can then use the verify snapshot repository API to manually |
| 42 | +verify the repository. |
| 43 | + |
| 44 | +If verification is successful, the verify snapshot repository API returns a list |
| 45 | +of nodes connected to the snapshot repository. If verification failed, the API |
| 46 | +returns an error. |
| 47 | + |
| 48 | +[[verify-snapshot-repo-api-path-params]] |
| 49 | +==== {api-path-parms-title} |
| 50 | + |
| 51 | +`<repository>`:: |
| 52 | +(Required, string) |
| 53 | +Name of the snapshot repository to verify. |
| 54 | + |
| 55 | +[[verify-snapshot-repo-api-query-params]] |
| 56 | +==== {api-query-parms-title} |
| 57 | + |
| 58 | +`master_timeout`:: |
| 59 | +(Optional, <<time-units, time units>>) Specifies the period of time to wait for |
| 60 | +a connection to the master node. If no response is received before the timeout |
| 61 | +expires, the request fails and returns an error. Defaults to `30s`. |
| 62 | + |
| 63 | +`timeout`:: |
| 64 | +(Optional, <<time-units, time units>>) Specifies the period of time to wait for |
| 65 | +a response. If no response is received before the timeout expires, the request |
| 66 | +fails and returns an error. Defaults to `30s`. |
| 67 | + |
| 68 | +[role="child_attributes"] |
| 69 | +[[verify-snapshot-repo-api-response-body]] |
| 70 | +==== {api-response-body-title} |
| 71 | + |
| 72 | +`nodes`:: |
| 73 | +(object) |
| 74 | ++ |
| 75 | +.Properties of `nodes` objects |
| 76 | +[%collapsible%open] |
| 77 | +==== |
| 78 | +`<node_id>`:: |
| 79 | +(object) |
| 80 | +Contains information about a node connected to the snapshot repository. |
| 81 | ++ |
| 82 | +The key is the ID of the node. |
| 83 | ++ |
| 84 | +.Properties of `<node_id>` |
| 85 | +[%collapsible%open] |
| 86 | +===== |
| 87 | +`name`:: |
| 88 | +(string) |
| 89 | +Human-readable name for the node. |
| 90 | ++ |
| 91 | +You can set this name using the <<node.name,`node.name`>> property in |
| 92 | +`elasticsearch.yml`. Defaults to the machine's hostname. |
| 93 | +===== |
| 94 | +==== |
0 commit comments