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.

Required IAM Policy

To use Oracle Cloud Infrastructure, an administrator must be a member of a group granted security access in a policy  by a tenancy administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don't have permission or are unauthorized, verify with the tenancy administrator what type of access you have and which compartment  your access works in.

For administrators: The following policies allow users to move Block Volume resources to a different compartment:

Allow group BlockCompartmentMovers to manage volume-family in tenancy

If you're new to policies, see Managing Identity Domains and Common Policies.

Security Zones

Security Zones ensure that your cloud resources comply with Oracle security principles. If any operation on a resource in a security zone compartment violates a policy for that security zone, then the operation is denied.

The following security zone policies affect your ability to move Block Volume resources from one compartment to another:

  • You can't move a block volume or boot volume from a security zone to a compartment that is not in the security zone.
  • You can't move a block volume or boot volume to a compartment that is in a security zone if the volume violates any security zone policies.

Moving Block Volumes

Learn how to move a block volume to a different compartment.

    1. Open the navigation menu  and select Storage. Under Block Storage, select Block Volumes.
    2. On the Block Volumes list page, find the block volume that you want to work with. If you need help finding the list page or the block volume, see Listing Volumes.
    3. To view the block volumes in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    4. From the Actions menu (three dots) for the block volume, select Move resource.
    5. In the Move resource panel, select the destination compartment from the list.
    6. Select Move resource.
  • Use the oci bv volume change-compartment command and specify the --compartment-id and --volume-id parameters to move a block volume to a different compartment:

    oci bv volume change-compartment --compartment-id <compartment_OCID --volume-id <volume_OCID>

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeVolumeCompartment operation and specify the volumeId attribute in the request body and the comparmentId attribute in the ChangeVolumeCompartmentDetails resource to move a block volume to a different compartment.

Moving Block Volume Backups

Learn how to move a block volume backup to a different compartment.

    1. On the Block Volume Backups list page, find the block volume backup that you want to work with. If you need help finding the list page or the block volume backup, see Listing Volume Backups.
    2. To view the block volume backups in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    3. From the Actions menu (three dots) for the block volume backup, select Move resource.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the oci bv backup change-compartment command and specify the --compartment-id and --volume-backup-id parameters to move a block volume backup to a different compartment:

    oci bv backup change-compartment  --volume-backup-id <volume_backup_OCID> --compartment-id <destination_compartment_OCID>

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeVolumeBackupCompartment operation and specify the volumeBackupId attribute in the request body and the compartmentId attribute in the ChangeVolumeBackupCompartmentDetails attribute to move the block volume backup to a different compartment.

Moving Volume Groups

Learn how to move a volume group to a different compartment.

    1. On the Volume Groups list page, find the volume group that you want to work with. If you need help finding the list page or the volume group, see Listing Volume Groups.
    2. To view the volume groups in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    3. From the Actions menu (three dots) for the block volumeListing Volume Groups, select Move resource.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the oci bv volume-group change-volume-group-compartment command and specify the --volume-group-id and --compartment-id parameters to move a volume group to a different compartment:

    oci bv volume-group change-volume-group-compartment --volume-group-id <volume_group_OCID> --compartment-id <destination_compartment_OCID>

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeVolumeGroupCompartment operation and specify the volumeGroupId attribute in the request body and the compartmentId attribute in the ChangeVolumeGroupCompartmentDetails resource to move the volume group to a different compartment.

Moving Volume Group Backups

Learn how to move a volume group backup to a different compartment.

    1. On the Volume Group Backups list page, find the volume group backup that you want to work with. If you need help finding the list page or the volume group backup, see Listing Volume Group Backups.
    2. To view the volume group backups in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    3. From the Actions menu (three dots) for the volume group backup, select Move resource.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the oci bv volume-group-backup change-volume-group-backup-compartment command and specify the --volume-group-backup-id and --compartment-id parameters to move a volume group backup to a different compartment:

    oci bv volume-group-backup change-volume-group-backup-compartment --volume-group-backup-id <volume_group_backup_OCID> --compartment-id <destination_compartment_OCID>

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeVolumeGroupBackupCompartment operation to and specify the volumeGroupBackupId attribute in the request body and the compartmentId attribute for the ChangeVolumeGroupBackupCompartmentDetailsReference resource.

Moving Boot Volumes

Learn how to move a boot volume to a different compartment.

    1. On the Boot Volumes list page, find the boot volume that you want to work with. If you need help finding the list page or the boot volume, see Listing Boot Volumes.
    2. To view the boot volumes in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    3. From the Actions menu (three dots) for the boot volume, select Move resource.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the oci bv boot-volume change-boot-volume-compartment command and specify the --boot-volume-id and --compartment-id parameters to move the boot volume to a different compartment:

    oci bv boot-volume change-boot-volume-compartment --boot-volume-id <boot_volume_OCID> --compartment-id <destination_compartment_OCID>

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeBootVolumeCompartment operation and specify the bootVolumeId attribute in the request body and the compartmentId attribute in the ChangeBootVolumeCompartmentDetails resource to move the boot volume to a different compartment.

Moving Boot Volume Backups

Learn how to move a boot volume backup to a different compartment.

    1. On the Boot Volume Backups list page, find the boot volume backup that you want to work with. If you need help finding the list page or the boot volume backup, seeListing Boot Volume Backups.
    2. To view the boot volume backups in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    3. From the Actions menu (three dots) for the boot volume backup, select Move resource.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the oci bv boot-volume-backup change-boot-volume-backup-compartment command and specify the --boot-volume-backup-id and --compartment-id parameters to move the boot volume backup to a different compartment:

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

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeBootVolumeBackupCompartment operation and specify the bootVolumeBackupId attribute in the request body and the compartmentId attribute in the ChangeBootVolumeBackupCompartmentDetails resource to move a boot volume backup to a different compartment.