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.
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.
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 thevolumeId
attribute in the request body and thecomparmentId
attribute in theChangeVolumeCompartmentDetails
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.
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 thevolumeBackupId
attribute in the request body and thecompartmentId
attribute in theChangeVolumeBackupCompartmentDetails
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.
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 thevolumeGroupId
attribute in the request body and thecompartmentId
attribute in theChangeVolumeGroupCompartmentDetails
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.
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 thevolumeGroupBackupId
attribute in the request body and thecompartmentId
attribute for theChangeVolumeGroupBackupCompartmentDetailsReference
resource.
Moving Boot Volumes
Learn how to move a boot volume to a different compartment.
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 thebootVolumeId
attribute in the request body and thecompartmentId
attribute in theChangeBootVolumeCompartmentDetails
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.
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 thebootVolumeBackupId
attribute in the request body and thecompartmentId
attribute in theChangeBootVolumeBackupCompartmentDetails
resource to move a boot volume backup to a different compartment.