Create a consistency group snapshot
POST /application/consistency-groups/{consistency_group.uuid}/snapshots
Introduced In: 9.10
Creates a snapshot of an existing consistency group.
Required properties
-
consistency_group.uuid
- Existing consistency group UUID in which to create the snapshot.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
consistency_group.uuid |
string |
path |
True |
The unique identifier of the consistency group to retrieve. |
action |
string |
query |
False |
Initiates the snapshot create operation. The start of the snapshot operation can optionally use a timeout value specified by "action_timeout". The snapshot is committed by calling PATCH on the snapshot href link with action specified as "commit".
|
action_timeout |
integer |
query |
False |
Duration to complete the 2-phase snapshot operation. This also specifies the maximum duration that the write-fence remains in effect on the volumes associated with this consistency group. Default is 7 seconds with a valid range of 5 to 120 seconds.
|
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.
|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
Name | Type | Description |
---|---|---|
comment |
string |
Comment for the snapshot. |
consistency_group |
The consistency group of the snapshot. |
|
consistency_type |
string |
Consistency type. This is for categorization purposes only. A snapshot should not be set to 'application consistent' unless the host application is quiesced for the snapshot. Valid in POST. |
create_time |
string |
Time the snapshot copy was created |
is_partial |
boolean |
Indicates whether the snapshot taken is partial or not. |
luns |
array[luns] |
The list of LUNs in this snapshot. |
missing_luns |
array[lun_reference] |
List of LUNs that are not in the snapshot. |
missing_namespaces |
array[missing_namespaces] |
List of NVMe namespaces that are not in the snapshot. |
missing_volumes |
array[volume_reference] |
List of volumes which are not in the snapshot. |
name |
string |
Name of the snapshot. |
namespaces |
array[namespaces] |
The list of NVMe namespaces in this snapshot. |
reclaimable_space |
integer |
Space reclaimed when the snapshot is deleted, in bytes. |
restore_size |
integer |
Size of the consistency group if this snapshot is restored. |
snapmirror_label |
string |
Snapmirror Label for the snapshot. |
snapshot_volumes |
List of volume and snapshot identifiers for each volume in the snapshot. |
|
svm |
SVM, applies only to SVM-scoped objects. |
|
uuid |
string |
The unique identifier of the snapshot. The UUID is generated by ONTAP when the snapshot is created.
|
write_fence |
boolean |
Specifies whether a write fence will be taken when creating the snapshot. The default is false if there is only one volume in the consistency group, otherwise the default is true. |
Example request
{
"comment": "My snapshot comment",
"consistency_group": {
"name": "my_consistency_group",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"consistency_type": "crash",
"create_time": "2020-10-25 07:20:00 -0400",
"is_partial": "",
"luns": [
{
"name": "/vol/volume1/lun1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
],
"missing_luns": [
{
"name": "/vol/volume1/lun1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
],
"missing_namespaces": [
{
"name": "/vol/volume1/namespace1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
],
"missing_volumes": [
{
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
}
],
"name": "string",
"namespaces": [
{
"name": "/vol/volume1/namespace1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
],
"reclaimable_space": 0,
"restore_size": 4096,
"snapmirror_label": "sm_label",
"snapshot_volumes": [
{
"snapshot": {
"name": "this_snapshot",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"volume": {
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
}
}
],
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
Response
Status: 202, Accepted
Name | Type | Description |
---|---|---|
job |
Example response
{
"job": {
"uuid": "string"
}
}
Headers
Name | Description | Type |
---|---|---|
Location |
Useful for tracking the resource location |
string |
Response
Status: 201, Created
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
53411918 |
Snapshot operation not permitted. |
53411921 |
Failed to create snapshot for consistency group. |
Also see the table of common errors in the Response body overview section of this documentation.
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
self_link
consistency_group
The consistency group of the snapshot.
Name | Type | Description |
---|---|---|
name |
string |
The name of the consistency group. |
uuid |
string |
The unique identifier of the consistency group. |
_links
luns
A reference to a LUN.
Name | Type | Description |
---|---|---|
name |
string |
The name of a LUN. A LUN is located within a volume. Optionally, it can be located within a qtree in a volume. LUN names are paths of the form "/vol/<volume>[/<qtree>]/<namespace>" where the qtree name is optional. |
uuid |
string |
The unique identifier of the LUN. |
lun_reference
A reference to a LUN.
Name | Type | Description |
---|---|---|
name |
string |
The name of a LUN. A LUN is located within a volume. Optionally, it can be located within a qtree in a volume. LUN names are paths of the form "/vol/<volume>[/<qtree>]/<namespace>" where the qtree name is optional. |
uuid |
string |
The unique identifier of the LUN. |
missing_namespaces
A reference to a namespace.
Name | Type | Description |
---|---|---|
name |
string |
The name of an NVMe namespace. An NVMe namespace is located within a volume. Optionally, it can be located within a qtree in a volume. NVMe namespace names are paths of the form "/vol/<volume>[/<qtree>]/<namespace>" where the qtree name is optional. |
uuid |
string |
The unique identifier of the NVMe namespace. |
volume_reference
Name | Type | Description |
---|---|---|
name |
string |
The name of the volume. This field cannot be specified in a PATCH method. |
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.
|
namespaces
A reference to a namespace.
Name | Type | Description |
---|---|---|
name |
string |
The name of an NVMe namespace. An NVMe namespace is located within a volume. Optionally, it can be located within a qtree in a volume. NVMe namespace names are paths of the form "/vol/<volume>[/<qtree>]/<namespace>" where the qtree name is optional. |
uuid |
string |
The unique identifier of the NVMe namespace. |
snapshot_reference
Name | Type | Description |
---|---|---|
name |
string |
|
uuid |
string |
consistency_group_volume_snapshot
Name | Type | Description |
---|---|---|
snapshot |
||
volume |
svm_reference
SVM, applies only to SVM-scoped objects.
Name | Type | Description |
---|---|---|
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. |
consistency_group_snapshot
Name | Type | Description |
---|---|---|
comment |
string |
Comment for the snapshot. |
consistency_group |
The consistency group of the snapshot. |
|
consistency_type |
string |
Consistency type. This is for categorization purposes only. A snapshot should not be set to 'application consistent' unless the host application is quiesced for the snapshot. Valid in POST. |
create_time |
string |
Time the snapshot copy was created |
is_partial |
boolean |
Indicates whether the snapshot taken is partial or not. |
luns |
array[luns] |
The list of LUNs in this snapshot. |
missing_luns |
array[lun_reference] |
List of LUNs that are not in the snapshot. |
missing_namespaces |
array[missing_namespaces] |
List of NVMe namespaces that are not in the snapshot. |
missing_volumes |
array[volume_reference] |
List of volumes which are not in the snapshot. |
name |
string |
Name of the snapshot. |
namespaces |
array[namespaces] |
The list of NVMe namespaces in this snapshot. |
reclaimable_space |
integer |
Space reclaimed when the snapshot is deleted, in bytes. |
restore_size |
integer |
Size of the consistency group if this snapshot is restored. |
snapmirror_label |
string |
Snapmirror Label for the snapshot. |
snapshot_volumes |
List of volume and snapshot identifiers for each volume in the snapshot. |
|
svm |
SVM, applies only to SVM-scoped objects. |
|
uuid |
string |
The unique identifier of the snapshot. The UUID is generated by ONTAP when the snapshot is created.
|
write_fence |
boolean |
Specifies whether a write fence will be taken when creating the snapshot. The default is false if there is only one volume in the consistency group, otherwise the default is true. |
job_link
Name | Type | Description |
---|---|---|
uuid |
string |
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation. |
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. |