Move Block Volume Resources Between Compartments

You can move Block Volume resources such as block volumes, boot volumes, volume backups, volume groups, and volume group backups from one compartment to another. When you move a Block Volume resource to a new compartment, associated resources are not moved. After you move the resource to the new compartment, inherent policies apply immediately and affect access to the resource through the Console. For more information, see Managing Compartments.

Important

When moving Block Volume resources between compartments you need to ensure that the resource users have sufficient access permissions on the compartment the resource is being moved to.

Using the Console

To move a block volume to a new compartment
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Block Volumes.
  2. In the Scope section, select a compartment.
  3. Find the block volume in the list, click the the Actions icon (three dots), and then click Move Resource.
  4. Choose the destination compartment from the list.
  5. Click Move Resource.
To move a block volume backup to a new compartment
  1. Open the navigation menu. Under Block Storage, click Block Volume Backups.
  2. In the Scope section, select a compartment.
  3. Find the block volume backup in the list, click the the Actions icon (three dots), and then click Move Resource.
  4. Choose the destination compartment from the list.
  5. Click Move Resource.
To move a volume group to a new compartment
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Scope section, select a compartment.
  3. Find the volume group in the list, click the the Actions icon (three dots), and then click Move Resource.
  4. Choose the destination compartment from the list.
  5. Click Move Resource.
To move a volume group backup to a new compartment
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Group Backups.
  2. In the Scope section, select a compartment.
  3. Find the volume group backup in the list, click the the Actions icon (three dots), and then click Move Resource.
  4. Choose the destination compartment from the list.
  5. Click Move Resource.
To move a boot volume to a new compartment
  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Boot Volumes.
  2. In the Scope section, select a compartment.
  3. Find the boot volume in the list, click the the Actions icon (three dots), and then click Move Resource.
  4. Choose the destination compartment from the list.
  5. Click Move Resource.
To move a boot volume backup to a new compartment
  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Boot Volume Backups.
  2. In the Scope section, select a compartment.
  3. Find the boot volume backup in the list, click the the Actions icon (three dots), and then click Move Resource.
  4. Choose the destination compartment from the list.
  5. Click Move Resource.

Using the CLI

For information about using the CLI, see Command Line Interface (CLI).

To move a block volume to a new compartment

Open a command prompt and run:

oci bv volume change-volume-compartment --volume-id <volume_OCID> --compartment-id <destination_compartment_OCID>
To move a block volume backup to a new compartment

Open a command prompt and run:

oci bv volume-backup change-volume-backup-compartment --volume-backup-id <volume_backup_OCID> --compartment-id <destination_compartment_OCID>
To move a volume group to a new compartment

Open a command prompt and run:

oci bv volume-group change-volume-group-compartment --volume-group-id <volume_group_OCID> --compartment-id <destination_compartment_OCID>
To move a volume group backup to a new compartment

Open a command prompt and run:

oci bv volume-group-backup change-volume-group-backup-compartment --volume-group-backup-id <volume_group_backup_OCID> --compartment-id <destination_compartment_OCID>
To move a boot volume to a new compartment

Open a command prompt and run:

oci bv boot-volume change-boot-volume-compartment --boot-volume-id <boot_volume_OCID> --compartment-id <destination_compartment_OCID>
To move a boot volume backup to a new compartment

Open a command prompt and run:

oci bv boot-volume-backup change-boot-volume-backup-compartment --boot-volume-backup-id <boot_volume_backup_OCID> --compartment-id <destination_compartment_OCID>