IBM Cloud Docs
Viewing Block Storage for VPC snapshots and consistency groups

Viewing Block Storage for VPC snapshots and consistency groups

You can view a list of all snapshots and consistency groups, and drill down to see information about a particular snapshot. Choose the UI, CLI, API, or Terraform to retrieve this information.

Listing snapshots in the UI

You can use the UI to list your snapshots and consistency groups.

Listing all snapshots in the UI

In the console, you can view a list of all snapshots that you created, with the most recent one at the beginning of the list. You can filter the list to view specific snapshots.

  1. In the IBM Cloud console, click the Navigation menu icon menu icon > VPC Infrastructure VPC icon > Storage > Block Storage snapshots for VPC. The page has two main tabs: Snapshot consistency group and Snapshots.

  2. Select the Snapshots tab. The snapshots are listed for a specific region. If you want to see snapshots in another region, click the arrow to expand the list and select a different region. By default, the newest snapshots are displayed at the beginning of the list.

  3. As your list of snapshots grows, use the filter to indicate the number of snapshots to display per page. Use the page navigation arrows to move forward and back through the list.

Table 1 describes the information for all snapshots that is shown on the list of snapshots.

Table 1. List of all snapshots
Field Description
Name The name that you provided when you created the snapshot. Click the name of the snapshot to see its details.
Status Status of the snapshot, depending on whether it's usable (active status), unusable, or being created. For more information, see Snapshot statuses.
Size Size of the snapshot in GBs. The size is inherited from the source volume.
Source volume It shows the boot or data volume from which the snapshot was created. Click the name of the volume to see its details.
Snapshot copies Number of copies that a snapshot has in other regions.
Created date The local date and time when the snapshot was created.
Consistency group This field shows the name of the consistency group if the snapshot is a member of a snapshot set.

Click the settings icon Settings icon to display optional fields that you can add to the table.

Table 2. List of optional informational fields for all snapshots
Field Description
Encryption It shows IBM-managed encryption or customer-managed encryption. The encryption is inherited from the source volume.
Fast restore status Status of restore as enabled, pending, or disabled.
Resource group The resource group that the snapshot belongs to.
Bootable Yes or No. It shows whether the snapshot was taken of a boot volume or a data volume.
Created by It shows whether the snapshot was created by the user or a backup policy.

By clicking the Actions icon Actions icon, you can display a menu of context-specific actions.

You can also list all snapshots that were created from a Block Storage for VPC volume from the volume details page. For more information, see View all snapshots that were created from the Block Storage for VPC volume.

Viewing snapshot details in the UI

To see detailed information about a snapshot, locate the snapshot on the Block Storage snapshots for VPC list. Then, click the name of a snapshot. The details page displays the name of the snapshot, its status, and attached user tags in the title.

The snapshot details panel shows the information that is described in the following table.

Table 3. Snapshot details
Field Description
Name The name of the snapshot, which you can change by clicking the Edit icon Edit icon. For more information, see Naming snapshots.
Snapshot ID Copiable GUID of the snapshot.
Bootable Yes or No.
CRN Copiable CRN of the snapshot.
Resource group Resource group defined when you set up your VPC.
Created date Date and time that the snapshot resource creation process started.
Captured date The date and time that this snapshot was captured.
Created by This field shows either User or Backup policy. If the snapshot is created by a backup policy, the UI also displays the name of the backup plan that created the backup snapshot.
Size Size in GBs of the snapshot, inherited from the source volume.
Source volume Source volume from which the first snapshot was taken. Click the link for volume details. If the volume was deleted, the name appears without a link.
Encryption Provider-managed or customer-managed encryption. For customer-managed encryption, the KMS instance, root key name, and root key ID are shown.
Fast restore panel Use fast restore to create a volume from this snapshot that is fully provisioned. Click Edit to enable or disable fast restore in a zone.
Consistency group panel It displays information about the consistency group that the snapshot is a member of. Click Create virtual server to restore volumes from the consistency group.

By clicking the Actions icon Actions icon, you can display a menu of context-specific actions.

Listing all consistency groups of snapshots in the UI

In the console, you can view a list of all consistency groups that you created, with the most recent one at the beginning of the list. You can filter the list to view specific consistency groups.

  1. In the IBM Cloud console, click the Navigation menu icon menu icon > VPC Infrastructure VPC icon > Storage > Block Storage snapshots for VPC. The page has two main tabs: Snapshot consistency group and Snapshots.

  2. Select the Snapshot consistency group tab. The groups are listed for a specific region. If you want to see consistency groups in another region, click the arrow to expand the list and select a different region. By default, the newest snapshot groups are displayed at the beginning of the list.

  3. As your list of consistency groups grows, use the filter to indicate the number of items to display per page. Use the page navigation arrows to move forward and back through the list.

The following table describes the information for all consistency groups in the list.

Table 4. List of all consistency groups
Field Description
Name The name that you provided when you created the consistency group. Click the name of the group to see its details.
Status Status of the consistency group, depending on whether it's usable (active status), unusable, or being created.
Source VSI It shows the virtual server instance that contains the source volumes of the snapshots in the consistency group. Click the name of the virtual server instance to see its details.
Snapshot members Number of snapshots that are members of the group.
Created date The local date and time when the snapshot was created.

Click the settings icon Settings icon to display optional fields that you can add to the table.

Table 5. List of optional informational fields for all snapshots
Field Description
Created by It shows whether the snapshot set was created by the user or a backup policy.
Resource group The resource group that the consistency group belongs to.
Created by It shows whether the snapshot was created by the user or a backup policy.

By clicking the Actions icon Actions icon, you can display a menu of context-specific actions.

Viewing details of a consistency group in the UI

To see detailed information about a consistency group, locate the group on the Block Storage snapshots for VPC list. Then, click the name of a consistency group.

The overview section provides details about the consistency group and the virtual server instance that the consistency group snapshots were taken of. The first panel contains information about the consistency group.

Table 6. Consistency group overview.
Field Description
Name The unique name of the consistency group. If you want to update it, click the Edit icon Edit icon.
Consistency group ID This field shows the ID string of the consistency group.
CRN Cloud Resource Name of the consistency group.
Created by The field shows either user for a manually created snapshot, or a backup policy for automated snapshots.
Resource group The resource group that the consistency group belongs to.
Created date It shows the date when the consistency group was created.
Delete snapshot members It shows whether the snapshots are deleted or kept when the consistency group is deleted. Click the toggle to change the status.
Region The VPC region that the consistency group was created in.

For more information, see Managing snapshot consistency groups.

The second panel contains information about the virtual server instance that the source volumes of the snapshot set are attached to.

Table 7. Virtual server instance overview.
Field Description
Name Name of the virtual server instance. Click the link to go to the details page of the instance.
Virtual server instance ID You can copy the ID to use in other interfaces such as CLI, API, or Terraform.
Virtual private cloud The name of the VPC that the consistency group is created in. Click the link to go to the details page of the VPC.
Image Information about the operating system image.
Resource group The resource group that the virtual server instance belongs to.
Tags The user-defined tags that are used for the virtual server instance.

The Snapshots list displays the snapshots within the consistency group and provides the same information and actions as described in Table 1.

Viewing snapshots from the CLI

You can use the CLI to list all snapshots, all snapshots for a volume, and details about a particular snapshot.

Before you begin

Before you can use the CLI, you must install the IBM Cloud CLI and the VPC CLI plug-in. For more information, see the CLI prerequisites.

  1. Log in to IBM Cloud®.

    ibmcloud login --sso -a cloud.ibm.com
    

    This command returns a URL and prompts for a passcode. Go to that URL in your browser and log in. If successful, you get a one-time passcode. Copy this passcode and paste it as a response on the prompt. After successful authentication, you are prompted to choose your account. If you have access to multiple accounts, select the account that you want to log in as. Respond to any remaining prompts to finish logging in.

  2. Set the IBMCLOUD_IS_FEATURE_SNAPSHOT environment variable to true.

    export IBMCLOUD_IS_FEATURE_SNAPSHOT=true
    

Viewing all snapshots of an account in a region from the CLI

Run the snapshots command to list all snapshots.

ibmcloud is snapshots [--json]

The following example provides a list of all the snapshots in all the resource groups in the eu-de region that were created by the users of the "Test Account".

cloudshell:~$ ibmcloud is snapshots [--json]
Listing snapshots in all resource groups and region eu-de under account Test Account as user test.user@ibm.com...
ID                                          Name                                           Status     Source volume                               Bootable   Resource group   Created
r138-7cac80af-63bb-4a1b-83dd-5f6d550a5db7   bear-peroxide-viewable-oxidant                 stable     r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa   false      test-snap        2023-02-17T18:49:48+00:00
r138-f95ef79e-5452-4a2a-b674-923c8ab84923   csi-plan-6kraq5zm-x7ss0u3h-3dbc4108a6b6-4356   stable     r010-a32b3fc7-8cd1-4b6e-ab97-f9837024fc03   false      defaults         2023-01-18T15:35:19+00:00
r138-9ad969ee-64b2-409a-b1e8-a3093446ad4e   csi-plan-nmplujx4-67413149ce61-4740            unusable   r010-63524a21-889d-4c44-95d1-4d2332394975   false      defaults         2023-01-18T13:40:28+00:00
r138-0f005da7-026c-453a-aa9b-2bc6f5cc6961   demo2-8be140e9561c-4381                        stable     r010-5a558256-ca83-4534-973f-f7a3b80aebe7   true       defaults         2023-02-01T00:41:23+00:00
r138-f7030231-bc5b-4672-8454-2f30271578f6   my-hpcs-snapshot                               stable     r010-921c3c6f-6a0a-4914-bdc5-3e8c9167ec30   false      defaults         2022-02-11T16:54:35+00:00
r138-e6664842-b370-496a-9ae7-da3fb647707c   snappy-snap-snap                               stable     r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa   false      test-snap        2023-02-17T18:53:57+00:00

For more information about available snapshot command options, see ibmcloud is snapshots.

Viewing all snapshots of a volume from the CLI

Run the snapshots command and specify the volume ID.

ibmcloud is snapshots --volume VOLUME-ID [--json]

The following example shows all three snapshots that were taken of the volume r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa.

cloudshell:~$ ibmcloud is snapshots --volume  r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa
Listing snapshots in all resource groups and region eu-de under account Test Account as user test.user@ibm.com...
ID                                          Name                             Status   Source volume                               Bootable   Resource group   Created
r138-7cac80af-63bb-4a1b-83dd-5f6d550a5db7   bear-peroxide-viewable-oxidant   stable   r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa   false      test-snap        2023-02-17T18:49:48+00:00
r138-4463eb2c-4913-43b1-b9bf-62a94f74c146   cli-snapshot-test                stable   r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa   false      defaults         2023-02-17T20:15:43+00:00
r138-e6664842-b370-496a-9ae7-da3fb647707c   snappy-snap-snap                 stable   r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa   false      test-snap        2023-02-17T18:53:57+00:00

For more information about available command options, see ibmcloud is snapshots.

Viewing all snapshots in a consistency group from the CLI

Run the snapshots command and specify the consistency group ID, name, or CRN.

ibmcloud is snapshots --volume CONSISTENCY_GROUP_ID

The following example uses the ID of the consistency group to list the snapshots that are members of the set.

ibmcloud is snapshots --snapshot-consistency-group r174-7c8762e2-c1b9-424e-b773-23240d1780dd

Listing snapshots in all resource groups and region us-south under account Test Account as user test.user@ibm.com...
ID                                          Name            Status   Source volume                               Bootable   Resource group   Created   
r174-b8cac978-a990-4824-a15c-604856982efe   snapshot-no-2   stable   r174-0641e516-09a1-4291-96ca-af254017123e   true       Default          2023-09-05T23:14:40+05:30 
r174-7311f226-8259-46be-9bfa-5b2cd08bdf2f   snapshot-no-1   stable   r174-bf595773-9922-4dd4-9a3c-998b10022e0c   false      Default          2023-09-05T23:14:40+05:30

For more information about available command options, see ibmcloud is snapshots.

Viewing details of a snapshot from the CLI

Run the snapshots command and specify the snapshot ID.

ibmcloud is snapshots SNAPSHOT_ID [--json]

The following example shows the details of a bootable snapshot in the us-south region.

cloudshell:~$ ibmcloud is snapshot c2bc3194-0cab-40c4-9434-db9f26218700
Getting snapshot c2bc3194-0cab-40c4-9434-db9f26218700 under account vpc1 as user user@mycompany.com...

ID                         c2bc3194-0cab-40c4-9434-db9f26218700
Name                       my-snapshot
CRN                        crn:v1:bluemix:public:is:us-south:a/a1234567::snapshot:c2bc3194-0cab-40c4-9434-db9f26218700
Status                     stable
Source volume              ID                                          Name
                           fe027a90-19e7-4cb5-bda3-4c0e35d2bcdf        test5-vol

Progress                   -
Bootable                   true
Encryption                 provider_managed
Encryption key             -
Minimum capacity(GB)       100
Size(GB)                   1
Source image               ID                                          Name
                           fb4d7950-8ff4-4d9a-9d9f-3056cb8c36d9        centos-8-2-minimal-amd64-2

Operating system           Name             Vendor   Version                 Family   Architecture   Display name
                           centos-8-amd64   CentOS   8.x - Minimal Install   CentOS   amd64          CentOS 8.x - Minimal Install (amd64)

Snapshot Consistency Group ID                                          Name                                   CRN                                                                    Resource type  
                             r174-4625d29b-3ac9-4bee-aca8-9366c4fd0c44 multiple-snapshots-consistency-group-1   crn:v1:bluemix:public:is:us-south:a/a1234567::snapshot-consistency-group:r174-4625d29b-3ac9-4bee-aca8-9366c4fd0c44   snapshot_consistency_group      

Resource group               ID                                     Name
                             ef2694fe-d6d1-4136-94c3-0ae315204e6b   Default

Created                      2023-12-05T01:53:15+05:30
Captured                     2023-12-05T01:53:34+05:30

The following example shows the details of a nonbootable snapshot in the eu-de region, which also has a fast restore clone in the eu-de-1 zone.

cloudshell:~$ ibmcloud is snapshot r138-4463eb2c-4913-43b1-b9bf-62a94f74c146
Getting snapshot r138-4463eb2c-4913-43b1-b9bf-62a94f74c146 under account Test Account as user test.user@ibm.com...

ID                         r138-4463eb2c-4913-43b1-b9bf-62a94f74c146
Name                       cli-snapshot-test
CRN                        crn:v1:bluemix:public:is:eu-de:a/a1234567::snapshot:r138-4463eb2c-4913-43b1-b9bf-62a94f74c146
Status                     stable
Clones                     Zone      Available   Created
                           eu-de-1   true        2023-02-17T20:15:46+00:00

Source volume              ID                                          Name
                           r010-df8ffd90-f2e5-470b-83d7-76e64995a1aa   block-test1

Bootable                   false
Encryption                 provider_managed
Encryption key             -
Minimum capacity(GB)       20
Size(GB)                   1
Snapshot Consistency Group ID                                                    Name                    Snapshot Consistency Group ID                                         Name                                   CRN                                                                    Resource type  
                           r174-4625d29b-3ac9-4bee-aca8-9366c4fd0c44 multiple-snapshots-consistency-group-1   crn:v1:bluemix:public:is:eu-de:a/a1234567:snapshot-consistency-group:r174-4625d29b-3ac9-4bee-aca8-9366c4fd0c44   snapshot_consistency_group     

Resource group             ID                                 Name
                           6edefe513d934fdd872e78ee6a8e73ef   defaults

Created                    2023-12-05T20:15:43+00:00
Captured at                2023-12-05T20:15:44+00:00
Tags                       env:prod,env:test

For more information about available command options, see ibmcloud is snapshots.

Viewing all fast restore snapshot clones from the CLI

You can list all available fast restore clones of a snapshot by issuing the ibmcloud is snapshot-clones command. The following example lists the available fast restore snapshot clones of the snapshot that has the ID of r138-4463eb2c-4913-43b1-b9bf-62a94f74c146.

$ ibmcloud is snapshot-clones r138-4463eb2c-4913-43b1-b9bf-62a94f74c146
Listing zonal clones of snapshot r138-4463eb2c-4913-43b1-b9bf-62a94f74c146 under account Test Account as user test.user@ibm.com...
Zone      Available   Created
eu-de-1   true        2023-02-17T20:15:46+00:00
eu-de-3   true        2023-02-17T20:29:21+00:00

For more information about available command options, see ibmcloud is snapshot-clones.

Viewing details of a fast restore snapshot clone from the CLI

You can run the ibmcloud is snapshot-clone command to list the details of a specific fast restore snapshot clone. The following example shows how to list the details of the fast restore snapshot clone of snapshot r138-4463eb2c-4913-43b1-b9bf-62a94f74c146 that resides in the eu-de-3 zone.

$ ibmcloud is snapshot-clone r138-4463eb2c-4913-43b1-b9bf-62a94f74c146 eu-de-3
Getting zonal clone eu-de-3 of snapshot r138-4463eb2c-4913-43b1-b9bf-62a94f74c146 under account Test Account as user test.user@ibm.com...

Zone        eu-de-3
Available   true
Created     2023-02-17T20:29:21+00:00
Href        https://eu-de.iaas.cloud.ibm.com/v1/regions/eu-de/zones/eu-de-3

For more information about available command options, see ibmcloud is snapshot-clone.

Viewing details of a remote region snapshot copy from the CLI

You can run the ibmcloud is snaphot command to list the details of a specific remote region snapshot copy. The following example shows how to list the details of the remote region snapshot [my-cli-snapshot-crc] that resides in the us-east region. The response provides information of the parent snapshot and parent volume as well.

ibmcloud is snapshot my-cli-snapshot-crc
Getting snapshot my-cli-snapshot-crc-target under account Test Account as user test.user@ibm.com...

ID                     r142-bd4532c0-e73c-44f9-a017-89e5368c521a
Name                   my-cli-snapshot-crc-target
CRN                    crn:v1:bluemix:public:is:us-east:a/a1234567::snapshot:r142-bd4532c0-e73c-44f9-a017-89e5368c521a
Status                 stable
Clones                 Zone   Available   Created

Source volume          ID                                          Name                   Remote Region
                       r006-be21061a-4dc6-4c9f-b17d-421838fde399   -remote-421838fde399   us-south

Snapshot Copies        ID   Name   Remote Region   CRN   Resource type

Bootable               true
Encryption             provider_managed
Encryption key         -
Source Snapshot        ID                                          Name                   Remote Region   CRN                                                                                                                        Resource type
                       r006-b9590a48-63a3-445e-b819-3f2c0b82daf8   cli-snap-crc-test-sn   us-south        crn:v1:bluemix:public:is:us-south:a/a1234567::snapshot:r006-b9590a48-63a3-445e-b819-3f2c0b82daf8   snapshot

Minimum capacity(GB)   100
Size(GB)               2
Source Image           ID                                          Name                   Remote Region
                       r006-24d856e2-6aec-41c2-8f36-5a8a3766f0d6   -remote-5a8a3766f0d6   us-south

Operating system       Name             Vendor   Version                 Family   Architecture   Display name
                       centos-7-amd64   CentOS   7.x - Minimal Install   CentOS   amd64          CentOS 7.x - Minimal Install (amd64)

Resource group         ID                                 Name
                       cdc21b72d4e647b195de988b175e3d82   Default

Created                2023-04-24T18:54:29+05:30
Captured at            2023-04-24T09:48:03+05:30
Tags                   -
Service Tags           -

Viewing all snapshot consistency groups from the CLI

Run the snapshot-consistency-groups command to list all consistency groups in a region.

ibmcloud is snapshot-consistency-groups

For more information about available command options, see ibmcloud is snapshot-consistency-groups.

Viewing details of a snapshot consistency group from the CLI

Run the snapshot-consistency-group command to list the details of a specific consistency group in a region.

ibmcloud is snapshot-consistency-group CONSISTENCY_GROUP_ID

For more information about available command options, see ibmcloud is snapshot-consistency-group.

Listing snapshots with the API

You can list your snapshots by using the API.

Listing all snapshots with the API

You can programmatically list all snapshots of your volumes by calling the /snapshots method in the VPC API as shown in the following sample request. By default, the list shows the most recent snapshots first, followed by older snapshots in descending order.

curl -X GET \
  "$vpc_api_endpoint/v1/snapshots?version=2022-12-16&generation=2" \
  -H "Authorization: $iam_token"

You can filter the list by using the resource group ID, source volume ID, or source volume CRN, and further filter the results by using the following options:

  • Limit - To control the number of snapshots displayed on a page.
  • Start - To specify which snapshot (by ID) to start the list.
  • Sort - To control the order in which you sort the page, such as by date created or alphabetically by snapshot name.

For example, the following call filters the list to show snapshots that were created for a single volume and limits the results to five per page.

curl -X GET \
"$vpc_api_endpoint/v1/snapshots?version=2022-08-16&generation=2" \
-H "Authorization: $iam_token" \
-d '{
      "limit": 5,
      "source_volume":
        "id": "8948ad59-bc0f-7510-812f-5dc64f59fab8"
      }'

A successful response looks like the following example.

{
    "first": {
      "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots?limit=50"
    },
    "limit": 5,
    "snapshots": [
      {
        "bootable": true,
        "clones": [],
        "created_at": "2022-12-18T20:18:18Z",
        "crn": "crn:[...]",
        "deletable": true,
        "encryption": "user_managed",
        "encryption_key": {
          "crn": "crn:[...]"
        },
        "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/f945d446-0d46-478a-a298-acba907d45d1",
        "id": " f945d446-0d46-478a-a298-acba907d45d1",
        "lifecycle_state": "stable",
        "minimum_capacity": 100,
        "name": "my-snapshot",
        "operating_system": {
          "architecture": "amd64",
          "dedicated_host_only": false,
          "display_name": "Ubuntu Linux 20.04 LTS Focal Fossa Minimal Install (amd64)",
          "family": "Ubuntu Linux",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-20-04-amd64",
          "name": "ubuntu-20-04-amd64",
          "vendor": "Canonical",
          "version": "20.04 LTS Focal Fossa Minimal Install"
        },
        "resource_group": {
          "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/678523bcbe2b4eada913d32640909956",
          "id": "678523bcbe2b4eada913d32640909956",
          "name": "Default"
        },
        "resource_type": "snapshot",
        "service_tags": [],
        "size": 1,
        "source_image": {
          "crn": "crn:[...]",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/images/de066f7d-b95f-4ca2-9aa0-b6362889e933",
          "id": "de066f7d-b95f-4ca2-9aa0-b6362889e933",
          "name": "ubuntu-20-04-minimal-amd64-1"
        },
        "source_volume": {
          "crn": "crn:[...]",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/8948ad59-bc0f-7510-812f-5dc64f59fab8",
          "id": "8948ad59-bc0f-7510-812f-5dc64f59fab8",
          "name": "instance-vol1"
        },
        "user_tags": []
      },
      {
        "bootable": true,
        "clones": [],
        "created_at": "2022-12-17T20:11:28Z",
        "crn": "crn:[...]",
        "deletable": true,
        "encryption": "user_managed",
        "encryption_key": {
          "crn": "crn:[...]"
        },
        "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/e5bfa329-0e36-433f-a3bb-0df632e79263",
        "id": "e5bfa329-0e36-433f-a3bb-0df632e79263",
        "lifecycle_state": "stable",
        "minimum_capacity": 100,
        "name": "my-snapshot-2",
        "operating_system": {
          "architecture": "amd64",
          "dedicated_host_only": false,
          "display_name": "Ubuntu Linux 20.04 LTS Focal Fossa Minimal Install (amd64)",
          "family": "Ubuntu Linux",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-20-04-amd64",
          "name": "ubuntu-20-04-amd64",
          "vendor": "Canonical",
          "version": "20.04 LTS Focal Fossa Minimal Install"
        },
        "resource_group": {
          "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/678523bcbe2b4eada913d32640909956",
          "id": "678523bcbe2b4eada913d32640909956",
          "name": "Default"
        },
        "resource_type": "snapshot",
        "service_tags": [],
        "size": 1,
        "source_image": {
          "crn": "crn:[...]",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/images/23045dc2-b463-4cda-b424-bc3dcf51dfbb",
          "id": "23045dc2-b463-4cda-b424-bc3dcf51dfbb",
          "name": "ubuntu-20-04-minimal-amd64-1"
        },
        "source_volume": {
          "crn": "crn:[...]",
          "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/8948ad59-bc0f-7510-812f-5dc64f59fab8",
          "id": "8948ad59-bc0f-7510-812f-5dc64f59fab8",
          "name": "instance-vol1"
        },
        "user_tags": []
      }
    ],
    "total_count": 2
  }

Listing details of a snapshot with the API

You can programmatically retrieve the details of a single snapshot by calling the /snapshots method in the VPC API and specifying the snapshot ID as shown in the following sample request.

curl -X GET \
"$vpc_api_endpoint/v1/snapshots/7528eb61-bc01-4763-a67a-a414a103f96d?version=2022-12-16&generation=2" \
-H "Authorization: $iam_token"

A successful response looks like the following example.

{
  "bootable": true,
  "clones": [],
  "captured_at": "2022-12-16T20:19:12Z",
  "created_at": "2021-12-16T20:18:18Z",
  "crn": "crn:[...]",
  "deletable": true,
  "encryption": "user_managed",
  "encryption_key": {
    "crn": "crn:[...]"
  },
  "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/7528eb61-bc01-4763-a67a-a414a103f96d",
  "id": "7528eb61-bc01-4763-a67a-a414a103f96d",
  "lifecycle_state": "stable",
  "minimum_capacity": 100,
  "name": "my-snapshot",
  "operating_system": {
    "architecture": "amd64",
    "dedicated_host_only": false,
    "display_name": "Ubuntu Linux 20.04 LTS Focal Fossa Minimal Install (amd64)",
    "family": "Ubuntu Linux",
    "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-20-04-amd64",
    "name": "ubuntu-20-04-amd64",
    "vendor": "Canonical",
    "version": "20.04 LTS Focal Fossa Minimal Install"
  },
  "resource_group": {
    "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/59ff2d74-b0e5-4b40-a553-b812e50c72e9",
    "id": "59ff2d74-b0e5-4b40-a553-b812e50c72e9",
    "name": "Default"
  },
  "resource_type": "snapshot",
  "service_tags": [],
  "size": 1,
  "source_image": {
    "crn": "crn:[...]",
    "href": "https://us-south.iaas.cloud.ibm.com/v1/images/dc021ec6-759d-4b87-8e0a-04106b8aa635",
    "id": "dc021ec6-759d-4b87-8e0a-04106b8aa635",
    "name": "ubuntu-20-04-minimal-amd64-1"
  },
  "source_volume": {
    "crn": "crn:[...]",
    "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/c90453a6-7b5e-47ce-95fc-f6fff9e5b79c",
    "id": "c90453a6-7b5e-47ce-95fc-f6fff9e5b79c",
    "name": "my-instance-data"
  },
  "user_tags": []
}

Viewing all fast restore snapshot clones with the API

You can programmatically list all fast restore clones by calling the /snapshots/clones method in the VPC API and specifying the snapshot ID as shown in the following sample request.

Make a GET /v1/snapshots/{id}/clones request to list all fast restore snapshot clones.

curl -X GET \
"$vpc_api_endpoint/v1/snapshots/7528eb61-bc01-4763-a67a-a414a103f96d/clones?version=2022-12-16&generation=2" \
-H "Authorization: $iam_token"

A successful response provides information about the fast restore snapshot clones.

{
  "clones": [
    {
      "available": true,
      "created_at": "2022-12-16T19:55:28.537Z",
      "zone": {
        "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-2",
        "name": "us-south-2"
      }
    },
    {
      "available": true,
      "created_at": "2022-12-16T19:58:22.337Z",
      "zone": {
        "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-3",
        "name": "us-south-3"
      }
    }
  ]
}

Viewing details of a fast restore snapshot clone with the API

You can programmatically retrieve the details of a single fast restore clone by calling the /snapshots/clones method in the VPC API and specifying the snapshot ID and zone as shown in the following sample request.

Make a GET /v1/snapshots/{id}/clones/{zone-name} request to retrieve a single fast restore snapshot clone specified by ID and zone name.

curl -X GET \
"$vpc_api_endpoint/v1/snapshots/7528eb61-bc01-4763-a67a-a414a103f96d/clones/us-south-1?version=2022-12-16&generation=2" \
-H "Authorization: $iam_token"

A successful response shows the following information about the fast restore snapshot clone.

{
  "available": true,
  "created_at": "2022-12-16T20:15:35.164Z",
  "zone": {
    "href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1",
    "name": "us-south-1"
  }
}

Viewing details of a remote region snapshot copy with the API

You can programmatically retrieve the details of a single snapshot by calling the /snapshots method in the VPC API and specifying the snapshot ID as shown in the following sample request.

curl -X GET \
"$vpc_api_endpoint/v1/snapshots/7528eb61-bc01-4763-a67a-a414a103f96d?version=2022-12-16&generation=2" \
-H "Authorization: $iam_token"

A successful response shows information that is similar to the following example.

{
  "bootable": true,
  "created_at": "2023-05-18T20:18:18Z",
  "crn": "crn:[...]",
  "deletable": false,
  "encryption": "user_managed",
  "encryption_key": {
    "crn": "crn:[...]"
  },
  "href": "https://us-east.iaas.cloud.ibm.com/v1/snapshots/r139-f6bfa329-0e36-433f-a3bb-0df632e79263",
  "id": "r139-f6bfa329-0e36-433f-a3bb-0df632e79263",
  "lifecycle_state": "stable",
  "minimum_capacity": 100,
  "name": "my-snapshot",
  "operating_system": {
    "architecture": "amd64",
    "dedicated_host_only": false,
    "display_name": "Ubuntu Linux 20.04 LTS Focal Fossa Minimal Install (amd64)",
    "family": "Ubuntu Linux",
    "gpu_supported": [],
    "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-20-04-amd64",
    "name": "ubuntu-20-04-amd64",
    "vendor": "Canonical",
    "version": "20.04 LTS Focal Fossa Minimal Install"
  },
  "resource_group": {
    "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/678523bcbe2b4eada913d32640909956",
    "id": "678523bcbe2b4eada913d32640909956",
    "name": "Default"
  },
  "resource_type": "snapshot",
  "service_tags": [],
  "region": "us-east",
  "size": 1,
  "source_image": {
    "crn": "crn:[...]",
    "remote": {
    	"region": {
    	   "name": "us-south",
    	   "hfef": "https://us-east.iaas.cloud.ibm.com/v1/regions/us-south"
    	}
    },
    "href": "https://us-south.iaas.cloud.ibm.com/v1/images/r006-32045dc2-b463-4cda-b424-bc3dcf51dfbb",
    "id": "r006-32045dc2-b463-4cda-b424-bc3dcf51dfbb",
    "name": "ibm-ubuntu-20-04-minimal-amd64-1"
  },
  "source_snapshot": {
    "crn": "crn:[...]",
    "remote": {
    	"region": {
    	   "name": "us-south",
    	   "hfef": "https://us-east.iaas.cloud.ibm.com/v1/regions/us-south"
    	}
    },
    "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-511a798c-5816-4082-8ecb-554a440f83de",
    "id": "r006-511a798c-5816-4082-8ecb-554a440f83de",
    "name": "my-snapshot-data"
  },
  "source_volume": {
    "crn": "crn:[...]",
    "remote": {
    	"region": {
    	   "name": "us-south",
    	   "hfef": "https://us-east.iaas.cloud.ibm.com/v1/regions/us-south"
    	}
    },
    "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/r006-411a798c-5816-4082-8ecb-554a440f83de",
    "id": "r006-411a798c-5816-4082-8ecb-554a440f83de",
    "name": "my-instance-data"
  },
  "user_tags": []
}

Viewing all snapshot consistency groups with the API

You can programmatically list all consistency groups by calling the /snapshot_consistency_groups method in the VPC API as shown in the following sample request.

GET /snapshot_consistency_groups

Viewing details of a snapshot consistency group with the API

You can programmatically retrieve details of a consistency group by calling the /snapshot_consistency_groups method in the VPC API as shown in the following sample request.

GET /snapshot_consistency_groups/r006-e8707243-96b3-4c27-be1f-57eff0196207

A successful response looks like the following example.

{
    "created_at": "2023-12-05T22:40:42Z",
    "id": "r006-e8707243-96b3-4c27-be1f-57eff0196207",
    "delete_snapshots_on_delete": true,
    "crn": "crn:v1:bluemix:public:is:us-south:a/a1234567::snapshot-consistency-group:r006-e8707243-96b3-4c27-be1f-57eff0196207",
    "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshot_consistency_groups/r006-e8707243-96b3-4c27-be1f-57eff0196207",
    "name": "my-consistency-group-snapshots",
    "resource_group": {
        "id": "a41ca701e1c041c1bb224564ff645770",
        "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/a41ca701e1c041c1bb224564ff645770",
        "name": "Default"
    },
    "lifecycle_state": "stable",
    "resource_type": "snapshot_consistency_group",
    "service_tags": [
        "is.instance:0727_44fda9fe-eeef-4e71-8fa4-4c3f7300e645"
    ],
    "snapshots": [
        {
            "crn": "crn:v1:bluemix:public:is:us-south:a/a1234567::snapshot:r006-540d8d17-5334-4d04-b845-270dbb30233f",
            "id": "r006-540d8d17-5334-4d04-b845-270dbb30233f",
            "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-540d8d17-5334-4d04-b845-270dbb30233f",
            "name": "my-test-scg-1",
            "resource_type": "snapshot"
        },
        {
            "crn": "crn:v1:bluemix:public:is:us-south:a/a1234567::snapshot:r006-77cc526a-b21c-4bdc-a2b3-442a1d4e78c0",
            "id": "r006-77cc526a-b21c-4bdc-a2b3-442a1d4e78c0",
            "href": "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r006-77cc526a-b21c-4bdc-a2b3-442a1d4e78c0",
            "name": "my-test-scg-2",
            "resource_type": "snapshot"
        }
    ]
}

Viewing snapshots with Terraform

You can use Terraform to view your snapshots.

To use Terraform, download the Terraform CLI and configure the IBM Cloud Provider plug-in. For more information, see Getting started with Terraform.

VPC infrastructure services use a specific regional endpoint, which targets to us-south by default. If your VPC is created in another region, make sure to target the appropriate region in the provider block in the provider.tf file.

See the following example of targeting a region other than the default us-south.

provider "ibm" {
  region = "eu-de"
}

Listing all snapshots with Terraform

Import the details of a collection of snapshots as a read-only data source. You can filter the collection of snapshots by source_volume, resource_group, name, and so on.

data "ibm_is_snapshots" "example" {
}

For more information, see ibm_is_snapshots.

Listing details of a snapshot with Terraform

Import the details of a snapshot as a read-only data source. You can specify either the snapshot ID or the snapshot name.

data "ibm_is_snapshot" "example" {
  identifier = "r138-e6664842-b370-496a-9ae7-da3fb647707c"
}
data "ibm_is_snapshot" "example" {
  name = "snappy-snap-snap"
}

For more information, see ibm_is_snapshot.

Listing all fast restore snapshot clones

Import the details of all the fast restore clones of a snapshot as a read-only data source.

data "ibm_is_snapshot_clones" "ds_snapshotclones" {
  snapshot = "r138-e6664842-b370-496a-9ae7-da3fb647707c"
}

For more information, see ibm_is_snapshot_clones.

Listing details of a fast restore clone with Terraform

Import the details of a snapshot's fast restore clone in a zone as a read-only data source.

data "ibm_is_snapshot_clone" "ds_snapshotclone" {
  snapshot = "r138-e6664842-b370-496a-9ae7-da3fb647707c"
  zone     = "eu-de-1"
}

For more information, see ibm_is_snapshot_clone.

Listing all consistency groups with Terraform

Import the details of a collection of consistency groups as a read-only data source.

data "ibm_is_snapshot_consistency_groups" "example" {
}

For more information, see ibm_is_consistency_groups.

Listing details of a consistency group with Terraform

Import the details of a snapshot consistency group as a read-only data source. You can specify the consistency group by either the ID or the name of the consistency group.

data "ibm_is_snapshot_consistency_group" "example" {
  identifier = ibm_is_snapshot_consistency_group.is_snapshot_consistency_group.id
}
data "ibm_is_snapshot_consistency_group" "example" {
  name = "my-data-consistency-group"
}

For more information, see ibm_is_consistency_group.

Next steps

You can modify or delete snapshots and restore a volume from a snapshot.