Start a SnapMirror transfer operation
POST /snapmirror/relationships/{relationship.uuid}/transfers
Introduced In: 9.6
Starts a SnapMirror transfer operation. This API initiates a restore operation if the SnapMirror relationship is of type "restore". Otherwise, it intiates a SnapMirror "initialize" operation or "update" operation based on the current SnapMirror state.
Default property values
-
storage_efficiency_enabled- true
Related ONTAP commands
-
snapmirror update -
snapmirror initialize -
snapmirror restore
Examples
The following examples show how to perform SnapMirror "initialize", "update", and "restore" operations.
Perform SnapMirror initialize or update
POST "/api/snapmirror/relationships/e4e7e130-0279-11e9-b566-0050568e9909/transfers" '{}'
Perform SnapMirror initialize, update or restore with throttle value set
POST "/api/snapmirror/relationships/e4e7e130-0279-11e9-b566-0050568e9909/transfers" '{"throttle":"100"}'
Perform SnapMirror restore transfer of a file
POST "/api/snapmirror/relationships/c8c62a90-0fef-11e9-b09e-0050568e7067/transfers" '{"source_snapshot": "src", "files":[{"source_path": "/a1.txt.0", "destination_path": "/a1-renamed.txt.0"}]}'
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
relationship.uuid |
string |
path |
True |
Relationship UUID |
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
|
Request Body
| Name | Type | Description |
|---|---|---|
bytes_transferred |
integer |
Bytes transferred |
checkpoint_size |
integer |
Amount of data transferred in bytes as recorded in the restart checkpoint. |
end_time |
string |
End time of the transfer. |
error_info |
Error information for the transfer. |
|
files |
array[files] |
This is supported for transfer of restore relationship only. This specifies the list of files or LUNs to be restored. Can contain up to eight files or LUNs. |
relationship |
||
snapshot |
string |
Name of Snapshot copy being transferred. |
source_snapshot |
string |
Specifies the Snapshot copy on the source to be transferred to the destination. |
storage_efficiency_enabled |
boolean |
This is supported for transfer of restore relationship only. Set this property to "false" to turn off storage efficiency for data transferred over the wire and written to the destination. |
throttle |
integer |
Throttle in KB/s. Defaults to throttle setting of the associated SnapMirror policy if set, or 0, which is interpreted as unlimited. |
total_duration |
string |
Elapsed transfer time. |
uuid |
string |
Example request
{
"bytes_transferred": 0,
"checkpoint_size": 0,
"end_time": "2020-12-02T18:36:19-08:00",
"error_info": {
"code": 6620046,
"message": "Transfer aborted"
},
"files": [
{
"destination_path": "/dirb/file2",
"source_path": "/dira/file1"
}
],
"relationship": {
"destination": {
"cluster": {
"name": "cluster1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"consistency_group_volumes": [
{
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
}
],
"ipspace": "Default",
"path": "svm1:volume1",
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
},
"uuid": "d2d7ceea-ab52-11e8-855e-00505682a4c7"
},
"snapshot": "string",
"source_snapshot": "string",
"throttle": 0,
"total_duration": "PT28M41S",
"uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
}
Response
Status: 201, Created
Error
Status: Default
ONTAP Error Response codes
| Error code | Description |
|---|---|
13303845 |
Restore operation failed |
13303812 |
Initialize operation failed |
13303844 |
Update operation failed |
13303846 |
Empty source path file list |
13303847 |
Invalid arguments |
13304040 |
Throttle not supported for update of Synchronous SnapMirror relationships |
6620237 |
SnapMirror relationship database write failed |
6620238 |
SnapMirror relationship database read failed |
Definitions
See Definitions
href
| Name | Type | Description |
|---|---|---|
href |
string |
_links
error_info
Error information for the transfer.
| Name | Type | Description |
|---|---|---|
code |
integer |
Error code |
message |
string |
Error message |
files
Specifies a file or LUN consisting of a source_path and an optional destination_path. If not specified, the destination_path is the same as the source_path. File restore is not supported if the source_path or destination_path contains commas in its directory or file name.
| Name | Type | Description |
|---|---|---|
destination_path |
string |
|
source_path |
string |
cluster
| Name | Type | Description |
|---|---|---|
name |
string |
|
uuid |
string |
consistency_group_volumes
| Name | Type | Description |
|---|---|---|
name |
string |
The name of the volume. |
uuid |
string |
Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.
|
svm
| Name | Type | Description |
|---|---|---|
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
snapmirror_endpoint
Endpoint of a SnapMirror relationship. For a GET request, the property "cluster" is populated when the endpoint is on a remote cluster. A POST request to create the destination SVM endpoint or to establish an SVM DR relationship must have the property "cluster" populated with the remote cluster details. A POST request to create the destination FlexVol volume, FlexGroup volume, Consistency Group, ONTAP S3 bucket and NON-ONTAP object-store endpoints can optionally specify the "cluster" property when the source SVM and the destination SVM are peered. A POST request to establish a SnapMirror relationship between the source endpoint and destination endpoint and when the source SVM and the destination SVM are not peered, must specify the "cluster" property for the remote endpoint.
| Name | Type | Description |
|---|---|---|
cluster |
||
consistency_group_volumes |
array[consistency_group_volumes] |
Mandatory property for a Consistency Group endpoint. Specifies the list of FlexVol volumes for a Consistency Group. |
ipspace |
string |
Optional property to specify the IPSpace of the SVM. |
path |
string |
ONTAP FlexVol/FlexGroup - svm1:volume1 ONTAP SVM - svm1: ONTAP Consistency Group - svm1:/cg/cg_name ONTAP S3 - svm1:/bucket/bucket1 NON-ONTAP - objstore1:/objstore
|
svm |
relationship
| Name | Type | Description |
|---|---|---|
destination |
Endpoint of a SnapMirror relationship. For a GET request, the property "cluster" is populated when the endpoint is on a remote cluster. A POST request to create the destination SVM endpoint or to establish an SVM DR relationship must have the property "cluster" populated with the remote cluster details. A POST request to create the destination FlexVol volume, FlexGroup volume, Consistency Group, ONTAP S3 bucket and NON-ONTAP object-store endpoints can optionally specify the "cluster" property when the source SVM and the destination SVM are peered. A POST request to establish a SnapMirror relationship between the source endpoint and destination endpoint and when the source SVM and the destination SVM are not peered, must specify the "cluster" property for the remote endpoint.
|
|
restore |
boolean |
Is the relationship for restore? |
uuid |
string |
snapmirror_transfer
SnapMirror transfer information
| Name | Type | Description |
|---|---|---|
bytes_transferred |
integer |
Bytes transferred |
checkpoint_size |
integer |
Amount of data transferred in bytes as recorded in the restart checkpoint. |
end_time |
string |
End time of the transfer. |
error_info |
Error information for the transfer. |
|
files |
array[files] |
This is supported for transfer of restore relationship only. This specifies the list of files or LUNs to be restored. Can contain up to eight files or LUNs. |
relationship |
||
snapshot |
string |
Name of Snapshot copy being transferred. |
source_snapshot |
string |
Specifies the Snapshot copy on the source to be transferred to the destination. |
storage_efficiency_enabled |
boolean |
This is supported for transfer of restore relationship only. Set this property to "false" to turn off storage efficiency for data transferred over the wire and written to the destination. |
throttle |
integer |
Throttle in KB/s. Defaults to throttle setting of the associated SnapMirror policy if set, or 0, which is interpreted as unlimited. |
total_duration |
string |
Elapsed transfer time. |
uuid |
string |
error_arguments
| Name | Type | Description |
|---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
| Name | Type | Description |
|---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |