Backing Up Block Volumes

The backups feature for the Block Volume service lets you make a point-in-time snapshot of the data on a block volume. You can make a backup of a volume when the volume is attached to an instance or while it is detached. These backups can then be restored to new volumes any time.

There are two ways to initiate a backup:

For more information about block volume backups, such as the differences between backups and clones, refer to "Volume Backups and Clones" in the Block Volume Storage Overview in the Oracle Private Cloud Appliance Concepts Guide.

Viewing Volume Backups

Backups that are created by backup policies (also called automatic or scheduled backups) can take up to five minutes to show in the backups list either in the Compute Web UI or in OCI CLI list output.

Using the Compute Web UI

  1. In the navigation menu, under Block Storage, click Block Volumes, Boot Volumes, or Volume Groups.

    Both automatic and manual backups are listed.

  2. If you don't see your backup listed, ensure you are viewing the correct compartment, which is displayed above the list.

  3. To view the details of a backup, click the backup name.

Using the OCI CLI

  1. Get the compartment OCID (oci iam compartment list)

  2. Run the list backups command.

    Syntax:

    oci bv backup list --compartment-id compartment_OCID
    oci bv boot-volume-backup list --compartment-id compartment_OCID
    oci bv volume-group-backup list --compartment-id compartment_OCID

    Both SCHEDULED and MANUAL backups are listed.

    Example:

    This example lists block volume backups.

    $ oci bv backup list --compartment-id ocid1.unique_ID
    {
      "data": [
        {
          "compartment-id": "ocid1.compartment.unique_ID",
          "defined-tags": {},
          "display-name": ".auto-20230607T160000UTC",
          "expiration-time": null,
          "freeform-tags": {},
          "id": "ocid1.volumebackup.unique_ID",
          "kms-key-id": null,
          "lifecycle-state": "AVAILABLE",
          "size-in-gbs": 0,
          "size-in-mbs": null,
          "source-type": "SCHEDULED",
          "source-volume-backup-id": null,
          "system-tags": null,
          "time-created": "2023-06-07T16:00:00.000001+00:00",
          "time-request-received": "2023-06-07T16:03:30.000001+00:00",
          "type": "FULL",
          "unique-size-in-gbs": 0,
          "unique-size-in-mbs": null,
          "volume-id": "ocid1.volume.unique_ID"
        }
      ]
    }
    1.                 
                        
                      
                      
                        
                      
                      
                        
                      
                      
                        
                      
                    
    1.                 
                        
                      
                      
                        
                      
                      
                        
                      
                      
                        
                      
                      
                        
                      
                      
                        
                      
                    

Creating a Manual Boot or Block Volume Backup

This procedure describes how to manually back up either a block volume or a boot volume. To create scheduled backups, see Managing Backup Policies.

Using the Compute Web UI

  1. In the navigation menu, under Block Storage, click either Block Volumes or Boot Volumes.

  2. If the volume that you want to back up is not listed, use the Compartment drop-down menu above the volume list to select the correct compartment.

  3. For the volume you plan to back up, click the Actions menu, and click Create Manual Backup.

  4. In the dialog, enter this information:

    • Name: Enter a descriptive name for the backup.

    • Compartment: For a boot volume backup, select the compartment where you want this backup created.

    • Tagging:(Optional) Add defined or free-form tags for this backup as described in Adding Tags at Resource Creation. Tags can also be applied later.

  5. For a block volume backup, click Create Manual Backup. For a boot volume backup, click Create.

Using the OCI CLI

  • Creating a Block Volume Backup

    1. Get the OCID of the block volume that you want to back up (oci bv volume list)

      • Volume OCID (oci bv volume list)

    2. Run the create block volume backup command.

      $ oci bv backup create --volume-id ocid1.volume.unique_ID
      {
        "data": {
          "compartment-id": "ocid1.compartment.unique_ID",
          "defined-tags": {},
          "display-name": "volumebackup20230806080408",
          "expiration-time": null,
          "freeform-tags": {},
          "id": "ocid1.volumeBackup.unique_ID",
          "kms-key-id": null,
          "lifecycle-state": "CREATING",
          "size-in-gbs": null,
          "size-in-mbs": null,
          "source-type": "MANUAL",
          "source-volume-backup-id": null,
          "system-tags": null,
          "time-created": "2023-06-08T08:04:08.430090+00:00",
          "time-request-received": "2023-06-08T08:04:08.000001+00:00",
          "type": "FULL",
          "unique-size-in-gbs": null,
          "unique-size-in-mbs": null,
          "volume-id": "ocid1.volume.unique_ID"
        },
        "etag": "616112e8-728c-43d6-b0d1-c6cfcc1a46e6"
      }
  • Creating a Boot Volume Backup

    1. Get the OCID of the boot volume that you want to back up (oci bv boot-volume list)

    2. Run the create boot volume backup command.

      $ oci bv boot-volume-backup create 
      --boot-volume-id ocid1.bootvolume.unique_ID
      {
        "data": {
          "boot-volume-id": "ocid1.bootvolume.unique_ID",
          "compartment-id": "ocid1.compartment.unique_ID",
          "defined-tags": {},
          "display-name": "bootvolumebackup20230806082217",
          "expiration-time": null,
          "freeform-tags": {},
          "id": "ocid1.bootvolumebackup.unique_ID",
          "image-id": "ocid1.image.unique_ID",
          "kms-key-id": null,
          "lifecycle-state": "CREATING",
          "size-in-gbs": null,
          "source-boot-volume-backup-id": null,
          "source-type": "MANUAL",
          "system-tags": null,
          "time-created": "2023-06-08T08:22:17.011857+00:00",
          "time-request-received": "2023-06-08T08:22:16.000001+00:00",
          "type": "FULL",
          "unique-size-in-gbs": null
        },
        "etag": "123a12b3-daa8-4557-8c83-uniqueID",
        "opc-work-request-id": "ocid1.workrequest.unique_ID"
      }

Creating a Manual Backup of a Volume Group

This procedure describes how to manually back up a volume group. To create scheduled backups, see Managing Backup Policies.

Using the Compute Web UI

  1. In the navigation menu, click Block Storage, then click Volume Groups.

  2. Select the appropriate compartment.

  3. For the volume group you want to back up, click the Actions menu and then click Create Volume Group Backup.

  4. In the dialog, enter a descriptive name for the backup.

  5. Click Create Volume Group Backup.

Using the OCI CLI

  1. Get the OCID of the volume group (oci bv volume-group list)

  2. Run the create volume group backup command.

    $ oci bv volume-group-backup create \
    --volume-group-id ocid1.volumegroup.unique_ID
    {
      "data": {
        "compartment-id": "cid1.compartment.unique_ID",
        "defined-tags": {},
        "display-name": "volumegroupbackup20230806085452",
        "expiration-time": null,
        "freeform-tags": {},
        "id": "ocid1.volumegroupbackup.unique_ID",
        "lifecycle-state": "CREATING",
        "size-in-gbs": null,
        "size-in-mbs": null,
        "source-type": "MANUAL",
        "source-volume-group-backup-id": null,
        "time-created": "2023-06-08T08:54:52.286092+00:00",
        "time-request-received": "2023-06-08T08:54:51.000001+00:00",
        "type": "FULL",
        "unique-size-in-gbs": null,
        "unique-size-in-mbs": null,
        "volume-backup-ids": [],
        "volume-group-id": "ocid1.volumegroup.unique_ID"
      },
      "etag": "04761386-6ec5-4cfa-b88e-a085ad833eac",
      "opc-work-request-id": "ocid1.workrequest.unique_ID"
    }

Restoring a Backup to a New Volume

Using the Compute Web UI

  1. In the navigation menu, click Block Storage, then click Block Volume Backups.

  2. If you don't see your backup listed, ensure you are viewing the correct compartment which is displayed at the top of the page.

  3. For the block volume backup that you want to restore, click the Actions menu and click Restore Block Volume.

  4. In the Create Block Volume dialog, provide the following information:

    • Name: A name or description for the volume. Avoid entering confidential information.

    • Compartment:Select the compartment in which to restore the block volume.

    • Size (in GBs): To change the size, enter a value from 50 to 32768 (50 GB to 32 TB) in 1 GB increments. You cannot enter a smaller value than the value that is shown.

    • High Performance Volume:(Optional) By default, the volume uses balanced performance. To create a block volume that uses the high performance feature, click the Enable High Performance button. For more information, see "Block Volume Performance Options" in the Block Volume Storage Overview chapter in the Oracle Private Cloud Appliance Concepts Guide.

      This selection cannot be changed after the volume is created.

    • Backup Policy:(Optional) Select a backup policy from the drop-down list. You might need to change the compartment.

      For more information about backup policies, see Managing Backup Policies.

    • Tagging:(Optional) Add defined or free-form tags for this volume as described in Adding Tags at Resource Creation. Tags can also be applied later.

  5. Click Create Block Volume.

    The volume is ready to attach after its icon no longer lists it as PROVISIONING in the volume list.

Using the OCI CLI

  1. Get the OCID of the volume backup (oci bv backup list)

  2. Run the restore volume backup command.

    Syntax:

    oci bv volume create --availability-domain AD-1 \
    --volume-backup-id source_volume_backup_OCID

    The volume backup is the source of the data that will be restored to the newly created volume.

    Example:

    $ oci bv volume create --availability-domain AD-1 \
    --volume-backup-id ocid1.volumebackup.unique_ID
    {
      "data": {
        "auto-tuned-vpus-per-gb": null,
        "autotune-policies": null,
        "availability-domain": "AD-1",
        "compartment-id": "ocid1.compartment.unique_ID",
        "defined-tags": {},
        "display-name": "volume20230806093839",
        "freeform-tags": {},
        "id": "ocid1.volume.unique_ID",
        "is-auto-tune-enabled": null,
        "is-hydrated": null,
        "kms-key-id": null,
        "lifecycle-state": "PROVISIONING",
        "size-in-gbs": 50,
        "size-in-mbs": 51200,
        "source-details": {
          "id": "ocid1.volumebackup.unique_ID",
          "type": "volumeBackup"
        },
        "system-tags": null,
        "time-created": "2023-06-08T09:38:39.036730+00:00",
        "volume-group-id": null,
        "vpus-per-gb": 10
      },
      "etag": "13864f86-cd1c-49f7-b414-4c4800103b0c",
      "opc-work-request-id": "ocid1.workrequest.unique_ID"
    }

Restoring a Volume Group from a Volume Group Backup

Using the Compute Web UI

  1. In the navigation menu, under Block Storage, click Volume Group Backups.

  2. Select the appropriate compartment.

  3. For the volume group backup that you want to restore, click the Actions menu and click Restore Volume Group.

  4. In the Create Volume Group dialog, provide the following information:

    • Name: Enter a descriptive name for the group.

    • Compartment: Select the compartment for the volume group.

    • Backup Policy: (Optional) Select a backup policy from the drop-down list. You might need to change the compartment.

      For more information about backup policies, see Managing Backup Policies.

    • Tagging:(Optional) Add defined or free-form tags for this volume as described in Adding Tags at Resource Creation. Tags can also be applied later.

  5. Click Create Volume Group.

Using the OCI CLI

  1. Gather the information that you need to run the command:

    • Compartment OCID (oci iam compartment list)

    • The OCID of the volume group backup that you want to restore to a new volume group (oci bv volume-group list)

  2. Run the create volume group command.

    To restore a volume group backup to a new volume group, use the oci bv volume-group create command, specifying the volume group backup as the source.

    Syntax:

    oci bv volume-group create \
    --availability-domain AD-1 \
    --compartment-id compartment_OCID \
    --source-details volume_group_backup

    Example:

    $ oci bv volume-group create --availability-domain AD-1 \
    --compartment-id ocid1.compartment.unique_ID \
    --source-details '{"type": "volumeGroupBackupId", "volumeGroupBackupId": "ocid1.volumegroupbackup.unique_ID"}'
    {
      "data": {
        "availability-domain": "AD-1",
        "compartment-id": "ocid1.compartment.unique_ID",
        "defined-tags": {},
        "display-name": "volumegroup20230806102749",
        "freeform-tags": {},
        "id": "ocid1.volumegroup.unique_ID",
        "is-hydrated": null,
        "lifecycle-state": "PROVISIONING",
        "size-in-gbs": 0,
        "size-in-mbs": 0,
        "source-details": {
          "type": "volumeGroupBackupId",
          "volume-group-backup-id": "ocid1.volumegroupbackup.unique_ID"
        },
        "time-created": "2023-06-08T10:27:49.025508+00:00",
        "volume-group-replicas": null,
        "volume-ids": []
      },
      "etag": "c7053513-6819-49ad-8785-dd3e2a45272a",
      "opc-work-request-id": "ocid1.workrequest.unique_ID"
    }