**同步结果摘要**: | 目录 | 同步前 | 同步后 | 官方 | |------|--------|--------|------| | aggregations | 40 | 65 | 64 | | analyzers | 8 | 141 | 140 | | api-reference | 97 | 186 | 174 | | benchmark | 34 | 67 | 53 | | clients | 17 | 18 | 18 | | dashboards | 38 | 149 | 131 | | data-prepper | 77 | 134 | 123 | | im-plugin | 22 | 37 | 37 | | ingest-pipelines | 27 | 52 | 51 | | install-and-configure | 37 | 57 | 53 | | ml-commons-plugin | 81 | 157 | 155 | | observing-your-data | 39 | 73 | 66 | | query-dsl | 40 | 77 | 75 | | search-plugins | 80 | 139 | 95 | | security-analytics | 22 | 47 | 46 | **说明**: - 本地文件数 > 官方:本地有一些官方已删除或重命名的文件 - 新增了约 **740 个英文文档文件** - 已有文件保持不变(未覆盖)
2.6 KiB
layout, title, parent, nav_order
| layout | title | parent | nav_order |
|---|---|---|---|
| default | Clone snapshot | Snapshot APIs | 100 |
Clone Snapshot API
Introduced 1.0 {: .label .label-purple }
Creates a clone of all or part of a snapshot in the same repository as the original.
Endpoints
PUT /_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}
Path parameters
The following table lists the available path parameters.
| Parameter | Required | Data type | Description |
|---|---|---|---|
repository |
Required | String | The name of repository which will contain the snapshots clone. |
snapshot |
Required | String | The name of the original snapshot. |
target_snapshot |
Required | String | The name of the cloned snapshot. |
Query parameters
The following table lists the available query parameters. All query parameters are optional.
| Parameter | Data type | Description |
|---|---|---|
cluster_manager_timeout |
String | The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters. |
Example request
The following request clones indexes index_a and index_b from my_snapshot, a snapshot located in the snapshot repository my-opensearch-repo, into a new snapshot in the same repository called my_new_snapshot:
{% capture step1_rest %} PUT /_snapshot/my-opensearch-repo/my_snapshot/_clone/my_new_snapshot { “indices” : “index_a,index_b” } {% endcapture %}
{% capture step1_python %}
response = client.snapshot.clone( repository = "my-opensearch-repo", snapshot = "my_snapshot", target_snapshot = "my_new_snapshot", body = ''' { “indices” : “index_a,index_b” } ''' )
{% endcapture %}
{% include code-block.html rest=step1_rest python=step1_python %}
Example response
The successful creation of a snapshot clone returns the following response:
{
"acknowledged" : true
}
Required permissions
If you use the Security plugin, make sure you have the appropriate permissions: cluster:admin/snapshot/clone.