Skip to main content
A newer release of this product is available.

Application consistency-groups consistency_group.uuid snapshots endpoint overview

Contributors

Overview

Consistency groups support Snapshot copy create, inventory, and restore. Snapshot copies can be created on a specified schedule or on-demand. On-demand Snapshot copies can have a type of application consistent or crash consistent. Crash consistent is the default. Scheduled Snapshot copiess are always crash consistent. There is no functional difference in ONTAP between crash consistent or application consistent Snapshot copies.

The functionality provided by these APIs is not integrated with the host application. Snapshot copies have limited value without host coordination, so the use of the SnapCenter Backup Management suite is recommended to ensure correct interaction between host applications and ONTAP.

On-Demand Snapshot Copies

A manual Snapshot copy may be created on-demand for a parent consistency group and for any of the children consistency groups within it.

Scheduled and manual Snapshot copy creation operations are subject to a pre-defined seven second internal timeout. If the Snapshot copy creation operation does not complete within this time, it is aborted.

Individual volume Snapshot copies within a consistency group Snapshot copies can be accessed and used with native volume Snapshot copy operations.

When an individual volume Snapshot copy is deleted that is part of a consistency group Snapshot copy, then that consistency group Snapshot copy becomes invalid and which cannot be used for restoring the consistency group.

Restoring to a Previous Snapshot Copy

A Snapshot copy restores to a parent consistency group from an existing parent consistency group's Snapshot copy. A Snapshot copy restores to any of the children's consistency groups within it from an existing children's consistency group. Granular Snapshot copies are supported. This is performed by a PATCH operation on the specific consistency group for the restore. An example is shown in PATCH /application/consistency-groups/{uuid} .

Any existing Snapshot copies that were created chronologically after the time of the Snapshot copy used in a successful restore operation is deleted, in compliance with existing ONTAP "future-snapshot" handling principles.

On failures during consistency group restores, any volumes that have been restored will remain so and will not be rolled back. The user must retry the failed restore operation until it is successful. The user can retry with consistency group restore or individual volume-granular restore.

Consistency group Snapshot APIs

The following APIs are used to perform operations related to consistency group Snapshot copies:

– GET /api/application/consistency-groups/snapshots

– POST /api/application/consistency-groups/snapshots

– GET /api/application/consistency-groups/snapshots/{uuid}

– DELETE /api/application/consistency-groups/snapshots/{uuid}

Examples

Required properties

  • consistency_group.uuid - Existing consistency group UUID in which to create the Snapshot copy.

Retrieving the list of existing Snapshot copies for a consistency group

Retrieves the list of consistency group granluar Snapshot copies for a specific consistency group.

curl -X GET -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/92c6c770-17a1-11eb-b141-005056acd498/snapshots'

#### Response:
{
"records": [
  {
    "uuid": "92c6c770-17a1-11eb-b141-005056acd498",
    "name": "sa3s1",
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/a8d0626a-17a0-11eb-b141-005056acd498/snapshots/92c6c770-17a1-11eb-b141-005056acd498"
      }
    }
  },
  {
    "uuid": "c5a250ba-17a1-11eb-b141-005056acd498",
    "name": "sa3s2",
    "_links": {
      "self": {
        "href": "/api/application/consistency-groups/a8d0626a-17a0-11eb-b141-005056acd498/snapshots/c5a250ba-17a1-11eb-b141-005056acd498"
      }
    }
  }
],
"num_records": 2,
"_links": {
  "self": {
    "href": "/api/application/consistency-groups/a8d0626a-17a0-11eb-b141-005056acd498/snapshots"
  }
}
}

Retrieves details of a specific Snapshot copy for a consistency group

Retrieves details for a specific Snapshot copy in a consistency group.

curl -X GET -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/92c6c770-17a1-11eb-b141-005056acd498/snapshots/a175c021-4199-11ec-8674-005056accf3f'

#### Response:
{
"consistency_group": {
  "uuid": "ddabc6a5-4196-11ec-8674-005056accf3f",
  "name": "CG_1",
  "_links": {
    "self": {
      "href": "/api/application/consistency-groups/ddabc6a5-4196-11ec-8674-005056accf3f"
    }
  }
},
"uuid": "a175c021-4199-11ec-8674-005056accf3f",
"name": "sa3s2",
"consistency_type": "crash",
"comment": "manually created snapshot",
"create_time": "2021-11-09T15:14:23-05:00",
"svm": {
  "uuid": "7379fecb-4195-11ec-8674-005056accf3f",
  "name": "vs1",
  "_links": {
    "self": {
      "href": "/api/svm/svms/7379fecb-4195-11ec-8674-005056accf3f"
    }
  }
},
"_links": {
  "self": {
    "href": "/api/application/consistency-groups/ddabc6a5-4196-11ec-8674-005056accf3f/snapshots/a175c021-4199-11ec-8674-005056accf3f"
  }
}
}

Creating a crash-consistent Snapshot copy of a consistency group

Creates an on-demand crash-consistent Snapshot copy of an existing consistency group.

curl -X POST -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/a8d0626a-17a0-11eb-b141-005056acd498/snapshots' -d '{ "name": "name_of_this_snapshot", "consistency_type": "crash", "comment": "this is a manually created on-demand snapshot", "snapmirror_label": "my_special_sm_label" }' -H "accept: application/hal+json"

#### Response:
{
}

Creating a app-consistent Snapshot copy of a consistency group

Creates an on-demand crash-consistent Snapshot copy of an existing consistency group.

curl -X POST -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/a8d0626a-17a0-11eb-b141-005056acd498/snapshots' -d '{ "name": "name_of_this_snapshot", "consistency_type": "application", "comment": "this is a manually created on-demand snapshot", "snapmirror_label": "my_special_sm_label" }' -H "accept: application/hal+json"

#### Response:
{
}

Deleting a Snapshot copy from a consistency group

Deletes an existing Snapshot copy from a consistency group.

curl -X DELETE -k -u admin:netapp1! 'https://netapp-cluster.netapp.com/api/application/consistency-groups/a8d0626a-17a0-11eb-b141-005056acd498/snapshots/92c6c770-17a1-11eb-b141-005056acd498'

#### Response:
{
}