Skip to main content

Start a SnapMirror transfer operation

Contributors

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

  • snapmirror update

  • snapmirror initialize

  • snapmirror restore

Important notes

  • The property "archive_retrieval_priority" is only applicable for object store SnapMirror relationships of type "restore".

  • The property "options.preserve_dedup_savings" is only applicable for object store SnapMirror relationships of type "restore". This property is only supported for restoring an entire volume from an object store.

  • The property "options.overwrite" is only applicable for object store SnapMirror relationships of type "restore". This property is only supported for restoring a directory from an object store to a FlexVol volume. Upon restart of an incomplete restore transfer the value of the "options.overwrite" property should match that of the previous request.

  • The property "source_snapshot_uuid" is only applicable for object store SnapMirror relationships of type "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"}]}'

Performing a SnapMirror initialize or update using a particular Snapshot copy.

 POST "/api/snapmirror/relationships/e4e7e130-0279-11e9-b566-0050568e9909/transfers" '{"source_snapshot":"snap1"}'

Performing a SnapMirror initialize or update of an object store SnapMirror relationship and locking Snapshot copy 'snap1' for a period of 40 months.

 POST "/api/snapmirror/relationships/e4e7e130-0279-11e9-b566-0050568e9909/transfers" '{"source_snapshot":"snap1", "snapshot_retention_period":"P40M"}]}'

Performing a SnapMirror restore transfer of a file with inode number 96 from an object store.

 POST "/api/snapmirror/relationships/5aadf886-2039-11ea-b47a-005056a778b7/transfers" '{"source_snapshot": "snap1", "files":[{"source_path": "96", "destination_path": "/f1"}]}'

Performing a SnapMirror restore transfer of a whole volume from an object store using a snapshot copy name.

 POST "/api/snapmirror/relationships/5aadf886-2039-11ea-b47a-005056a778b7/transfers" '{"source_snapshot": "snap1"}'

Performing a SnapMirror restore transfer of a whole volume from an object store using a snapshot copy uuid.

 POST "/api/snapmirror/relationships/5aadf886-2039-11ea-b47a-005056a778b7/transfers" '{"source_snapshot_uuid": "bded03c7-c71b-408e-9e1a-971eb156a2da"}'

Performing a SnapMirror restore transfer of a whole volume from an object store with archive_retrieval_priority high.

 POST "/api/snapmirror/relationships/5aadf886-2039-11ea-b47a-005056a778b7/transfers" '{"source_snapshot": "snap1", "archive_retrieval_priority": "high"}'

Performing a SnapMirror on-demand restore transfer of a whole volume from an object store.

 POST "/api/snapmirror/relationships/5aadf886-2039-11ea-b47a-005056a778b7/transfers" '{"source_snapshot": "snap1", "on_demand_attrs":"read_write_with_user_data_pull"}'

Performing a SnapMirror restore transfer of a whole volume from an object store with deuplication savings preserved.

 POST "/api/snapmirror/relationships/5aadf886-2039-11ea-b47a-005056a778b7/transfers" '{"source_snapshot": "snap1", "options.preserve_dedup_savings":"true"}'

Performing a SnapMirror restore transfer of a directory from an object store with overwrite.

 POST "/api/snapmirror/relationships/5aadf886-2039-11ea-b47a-005056a778b7/transfers" '{"source_snapshot": "snap1", "files":[{"source_path": "96", "destination_path": "/dir1"}], "options.overwrite":"true"}'

Parameters

Name Type In Required Description

relationship.uuid

string

path

True

SnapMirror relationship UUID

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

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.

  • Default value: 1

  • Max value: 120

  • Min value: 0

Request Body

Name Type Description

_links

_links

archive_retrieval_priority

string

This is supported for transfer of restore relationship only. Priority level at which objects are restored from the archival storage. The value can be high, standard or low. The cloud provider's lowest priority will be used as the default. It is only supported for object store SnapMirror relationships. If the objects were not archived, the property will be ignored.

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_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.

last_updated_time

string

Last updated time of the bytes transferred in an active transfer.

network_compression_ratio

string

Specifies the compression ratio achieved for the data sent over the wire with network compression enabled. This property is only valid for active transfers.

on_demand_attrs

string

Specifies whether or not an on-demand restore is being carried out. This is only supported for the transfer of restore relationships for entire volumes from the object store. A value for read_write_with_user_data_pull should be provided to start an on-demand restore. A file restore from the object store does not support this option.

options

array[options]

Options for snapmirror transfer.

relationship

relationship

snapshot

string

Name of Snapshot copy being transferred.

snapshot_retention_period

string

Specifies the duration for which the Snapshot copy specified in the 'source_snapshot' property is locked in the object store. The retention period value represents a duration and must be specified in the ISO-8601 duration format. The retention period can be in years, months, or days. A period specified for years, months, or days is represented in the ISO-8601 format as "PY", "PM", or "PD" respectively. For example, "P10Y" represents a duration of 10 years. The period string must contain only a single time element, that is, either years, months, or days. A duration which combines different periods is not supported, for example "P1Y10M" is not supported. Years, if specified, must be less than or equal to 100. Months, if specified, must be less than or equal to 1200. Days, if specified, must be between and including 30 and 36500. This property is valid only if the 'source_snapshot' property is specified and when the property 'snapshot_lock_mode' in the policy associated with the SnapMirror relationship is set to enterprise or compliance. If this property is not specified and the source Snapshot copy being transferred does not match a policy rule, then a default retention period of "P30D" is set. This property is supported only for non-restore transfers and for object store SnapMirror relationships.

source_snapshot

string

Specifies the Snapshot copy on the source to be transferred to the destination.

source_snapshot_uuid

string

Specifies the Snapshot copy UUID on the object store source to be restored to the destination.

state

string

Status of the transfer. Set PATCH state to "aborted" to abort the transfer. Set PATCH state to "hard_aborted" to abort the transfer and discard the restart checkpoint. To find "queued" transfers refer to relationships GET API.

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 KBs per second. This "throttle" overrides the "throttle" set on the SnapMirror relationship or SnapMirror relationship's policy. If neither of these are set, defaults to 0, which is interpreted as unlimited.

total_duration

string

Elapsed transfer time.

uuid

string

Unique identifier of the SnapMirror transfer.

Example request
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "archive_retrieval_priority": "high",
  "bytes_transferred": 0,
  "checkpoint_size": 0,
  "end_time": "2020-12-02 21:36:19 -0500",
  "error_info": {
    "code": 6620046,
    "message": "Transfer aborted"
  },
  "files": [
    {
      "destination_path": "/dirb/file2",
      "source_path": "/dira/file1"
    }
  ],
  "last_updated_time": "2023-09-15 19:58:39 -0400",
  "network_compression_ratio": 61,
  "on_demand_attrs": "read_write_with_user_data_pull",
  "options": [
    {
      "overwrite": 1,
      "preserve_dedup_savings": 1
    }
  ],
  "relationship": {
    "destination": {
      "cluster": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "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": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "svm1",
        "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
      },
      "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
    },
    "uuid": "d2d7ceea-ab52-11e8-855e-00505682a4c7"
  },
  "snapshot": "string",
  "snapshot_retention_period": "P30D",
  "source_snapshot": "string",
  "source_snapshot_uuid": "string",
  "state": "string",
  "throttle": 0,
  "total_duration": "PT28M41S",
  "uuid": "4ea7a442-86d1-11e0-ae1c-123478563412"
}

Response

Status: 201, Created

Headers

Name Description Type

Location

Useful for tracking the resource location

string

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 property

13304040

Throttle not supported for update of Synchronous SnapMirror relationships

6620237

SnapMirror relationship database write failed

6620238

SnapMirror relationship database read failed

13304026

API license token is required for this operation.

13304027

Invalid API license token specified.

6621865

Unexpected input value.

13304047

An additional property is required with the specified policy property.

13303872

Property specified requires an effective cluster version of ONTAP specified or later.

13304093

Property specified is not supported for specified relationships.

13304094

The property snapshot_retention_period is not supported for this relationship because the policy associated with it does not have the snapshot_lock_mode set to compliance or enterprise.

13304134

The overwrite property specified does not match the value specified in the previous request.

6684973

The Snapshot copy does not exist.

6621810

Failed to get object store endpoint information.

Name Type Description

error

returned_error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

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

options

Name Type Description

overwrite

boolean

Specifies whether or not to overwrite the directory during restore from an object store to a FlexVol volume. This property is only supported for restoring a directory from an object store. Valid values are 'true' or 'false'. This property is not supported for full volume restores from an object store.

preserve_dedup_savings

boolean

Specifies whether or not deduplication savings of a backed up Snapshot copy will be preserved during restore from an object store. This parameter is only supported for restoring an entire volume from an object store. Valid values are 'true' or 'false'. This parameter enables cost-optimized restore, although it may affect the duration of the restore operation. This parameter is not supported for file restores from an object store.

cluster

Name Type Description

_links

_links

name

string

uuid

string

consistency_group_volumes

Name Type Description

name

string

The name of the volume.

uuid

string

Unique identifier of 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.

  • example: 028baa66-41bd-11e9-81d5-00a0986138f7

  • x-ntap-createOnly: true

  • Introduced in: 9.8

  • x-nullable: true

svm

SVM, applies only to SVM-scoped objects.

Name Type Description

_links

_links

name

string

The name of the SVM. This field cannot be specified in a PATCH method.

uuid

string

The unique identifier of the SVM. This field cannot be specified in a PATCH method.

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

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

  • example: svm1:volume1

  • Introduced in: 9.6

  • x-nullable: true

svm

svm

SVM, applies only to SVM-scoped objects.

uuid

string

Unique identifier of the endpoint. Applicable for object store SnapMirror relationships only.

relationship

Name Type Description

destination

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.

  • Introduced in: 9.6

restore

boolean

Is the relationship for restore?

uuid

string

Unique identifier of the SnapMirror relationship.

snapmirror_transfer

SnapMirror transfer information

Name Type Description

_links

_links

archive_retrieval_priority

string

This is supported for transfer of restore relationship only. Priority level at which objects are restored from the archival storage. The value can be high, standard or low. The cloud provider's lowest priority will be used as the default. It is only supported for object store SnapMirror relationships. If the objects were not archived, the property will be ignored.

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_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.

last_updated_time

string

Last updated time of the bytes transferred in an active transfer.

network_compression_ratio

string

Specifies the compression ratio achieved for the data sent over the wire with network compression enabled. This property is only valid for active transfers.

on_demand_attrs

string

Specifies whether or not an on-demand restore is being carried out. This is only supported for the transfer of restore relationships for entire volumes from the object store. A value for read_write_with_user_data_pull should be provided to start an on-demand restore. A file restore from the object store does not support this option.

options

array[options]

Options for snapmirror transfer.

relationship

relationship

snapshot

string

Name of Snapshot copy being transferred.

snapshot_retention_period

string

Specifies the duration for which the Snapshot copy specified in the 'source_snapshot' property is locked in the object store. The retention period value represents a duration and must be specified in the ISO-8601 duration format. The retention period can be in years, months, or days. A period specified for years, months, or days is represented in the ISO-8601 format as "PY", "PM", or "PD" respectively. For example, "P10Y" represents a duration of 10 years. The period string must contain only a single time element, that is, either years, months, or days. A duration which combines different periods is not supported, for example "P1Y10M" is not supported. Years, if specified, must be less than or equal to 100. Months, if specified, must be less than or equal to 1200. Days, if specified, must be between and including 30 and 36500. This property is valid only if the 'source_snapshot' property is specified and when the property 'snapshot_lock_mode' in the policy associated with the SnapMirror relationship is set to enterprise or compliance. If this property is not specified and the source Snapshot copy being transferred does not match a policy rule, then a default retention period of "P30D" is set. This property is supported only for non-restore transfers and for object store SnapMirror relationships.

source_snapshot

string

Specifies the Snapshot copy on the source to be transferred to the destination.

source_snapshot_uuid

string

Specifies the Snapshot copy UUID on the object store source to be restored to the destination.

state

string

Status of the transfer. Set PATCH state to "aborted" to abort the transfer. Set PATCH state to "hard_aborted" to abort the transfer and discard the restart checkpoint. To find "queued" transfers refer to relationships GET API.

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 KBs per second. This "throttle" overrides the "throttle" set on the SnapMirror relationship or SnapMirror relationship's policy. If neither of these are set, defaults to 0, which is interpreted as unlimited.

total_duration

string

Elapsed transfer time.

uuid

string

Unique identifier of the SnapMirror transfer.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

returned_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.