Path parameters
-
The name of the snapshot repository that both source and target snapshot belong to.
-
The source snapshot name.
-
The target snapshot name.
Query parameters
-
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.Default value is
30s.
PUT
/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}
Console
PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot
{
"indices": "index_a,index_b"
}
resp = client.snapshot.clone(
repository="my_repository",
snapshot="source_snapshot",
target_snapshot="target_snapshot",
indices="index_a,index_b",
)
const response = await client.snapshot.clone({
repository: "my_repository",
snapshot: "source_snapshot",
target_snapshot: "target_snapshot",
indices: "index_a,index_b",
});
response = client.snapshot.clone(
repository: "my_repository",
snapshot: "source_snapshot",
target_snapshot: "target_snapshot",
body: {
"indices": "index_a,index_b"
}
)
$resp = $client->snapshot()->clone([
"repository" => "my_repository",
"snapshot" => "source_snapshot",
"target_snapshot" => "target_snapshot",
"body" => [
"indices" => "index_a,index_b",
],
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"indices":"index_a,index_b"}' "$ELASTICSEARCH_URL/_snapshot/my_repository/source_snapshot/_clone/target_snapshot"
var response = await client.Snapshot
.CloneAsync(repository: "my_repository", snapshot: "source_snapshot", targetSnapshot: "target_snapshot", d1 => d1
.Indices("index_a,index_b")
);
client.snapshot().clone(c -> c
.indices("index_a,index_b")
.repository("my_repository")
.snapshot("source_snapshot")
.targetSnapshot("target_snapshot")
);
Request example
Run `PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot` to clone the `source_snapshot` into a new `target_snapshot`.
{
"indices": "index_a,index_b"
}