forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds clone snapshot API to clone part of a snapshot into a new snapshot.
- Loading branch information
1 parent
40de7de
commit be8e1d8
Showing
13 changed files
with
1,712 additions
and
128 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
docs/reference/snapshot-restore/apis/clone-snapshot-api.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[[clone-snapshot-api]] | ||
=== Clone snapshot API | ||
++++ | ||
<titleabbrev>Clone snapshot</titleabbrev> | ||
++++ | ||
|
||
Clones part or all of a snapshot into a new snapshot. | ||
|
||
[source,console] | ||
---- | ||
PUT /_snapshot/my_repository/source_snapshot/_clone/target_snapshot | ||
{ | ||
"indices": "index_a,index_b" | ||
} | ||
---- | ||
// TEST[skip:TODO] | ||
|
||
[[clone-snapshot-api-request]] | ||
==== {api-request-title} | ||
|
||
`PUT /_snapshot/<repository>/<source_snapshot>/_clone/<target_snapshot>` | ||
|
||
[[clone-snapshot-api-desc]] | ||
==== {api-description-title} | ||
|
||
The clone snapshot API allows creating a copy of all or part of an existing snapshot | ||
within the same repository. | ||
|
||
[[clone-snapshot-api-params]] | ||
==== {api-path-parms-title} | ||
|
||
`<repository>`:: | ||
(Required, string) | ||
Name of the snapshot repository that both source and target snapshot belong to. | ||
|
||
[[clone-snapshot-api-query-params]] | ||
==== {api-query-parms-title} | ||
|
||
`master_timeout`:: | ||
(Optional, <<time-units, 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`. | ||
|
||
`timeout`:: | ||
(Optional, <<time-units, time units>>) Specifies the period of time to wait for | ||
a response. If no response is received before the timeout expires, the request | ||
fails and returns an error. Defaults to `30s`. | ||
|
||
`indices`:: | ||
(Required, string) | ||
A comma-separated list of indices to include in the snapshot. | ||
<<multi-index,Multi-index syntax>> is supported. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
410 changes: 404 additions & 6 deletions
410
server/src/internalClusterTest/java/org/elasticsearch/snapshots/CloneSnapshotIT.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.