CopyVolume
You can use the CopyVolume
method to overwrite the data contents of an existing volume with the data contents of another volume (or snapshot). Attributes of the destination volume such as IQN, QoS settings, size, account, and volume access group membership are not changed. The destination volume must already exist and must be the same size as the source volume.
It is best if clients unmount the destination volume before the operation begins. If the destination volume is modified during the operation, the changes are lost. This operation can take a variable amount of time to complete. You can use the GetAsyncResult method to determine when the process has finished, and ListSyncJobs to see the progress of the copy.
Parameters
This method has the following input parameter:
Name | Description | Type | Default value | Required |
---|---|---|---|---|
dstVolumeID |
VolumeID of the volume to overwrite. |
integer |
None |
Yes |
volumeID |
VolumeID of the volume to be read from. |
integer |
None |
Yes |
snapshotID |
ID of the snapshot that is used as the source of the clone. If no ID is provided, the current active volume is used. |
integer |
None |
No |
Return values
This method has the following return values:
Name |
Description |
Type |
asyncHandle |
Handle value used to obtain the operation result. |
integer |
cloneID |
CloneID for the newly cloned volume. |
integer |
Request example
Requests for this method are similar to the following example:
{ "method": "CopyVolume", "params": { "volumeID" : 3, "dstVolumeID" : 2 }, "id" : 1 }
Response example
This method returns a response similar to the following example:
{ "id": 1, "result": { "asyncHandle": 9, "cloneID": 5 } }
New since version
9.6