clone-snapshot-api.asciidoc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. [[clone-snapshot-api]]
  2. === Clone snapshot API
  3. ++++
  4. <titleabbrev>Clone snapshot</titleabbrev>
  5. ++++
  6. .New API reference
  7. [sidebar]
  8. --
  9. For the most up-to-date API details, refer to {api-es}/group/endpoint-snapshot[Snapshot and restore APIs].
  10. --
  11. Clones part or all of a snapshot into a new snapshot.
  12. [source,console]
  13. ----
  14. PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot
  15. {
  16. "indices": "index_a,index_b"
  17. }
  18. ----
  19. // TEST[skip:TODO]
  20. [[clone-snapshot-api-request]]
  21. ==== {api-request-title}
  22. `PUT /_snapshot/<repository>/<source_snapshot>/_clone/<target_snapshot>`
  23. [[clone-snapshot-api-prereqs]]
  24. ==== {api-prereq-title}
  25. * If the {es} {security-features} are enabled, you must have the `manage`
  26. <<privileges-list-cluster,cluster privilege>> to use this API.
  27. [[clone-snapshot-api-desc]]
  28. ==== {api-description-title}
  29. The clone snapshot API allows creating a copy of all or part of an existing snapshot
  30. within the same repository.
  31. [[clone-snapshot-api-params]]
  32. ==== {api-path-parms-title}
  33. `<repository>`::
  34. (Required, string)
  35. Name of the snapshot repository that both source and target snapshot belong to.
  36. [[clone-snapshot-api-query-params]]
  37. ==== {api-query-parms-title}
  38. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  39. `timeout`::
  40. (Optional, <<time-units, time units>>) Specifies the period of time to wait for
  41. a response. If no response is received before the timeout expires, the request
  42. fails and returns an error. Defaults to `30s`.
  43. `indices`::
  44. (Required, string)
  45. A comma-separated list of indices to include in the snapshot.
  46. <<api-multi-index,multi-target syntax>> is supported.