ボリューム・データ移行プロセスについて

移行プロセスには次のステップが含まれます。

  1. 古いテナンシの許可ポリシーを定義します。
  2. 新しいテナンシに承認ポリシーを定義します。
  3. CLIプロファイルを構成します。
  4. ボリュームをクローニングまたは復元します。
次の図は、古いテナンシから新しいテナンシにボリュームを移行するためのアーキテクチャを示しています。


deploy-oci-tenancies-arch.pngの説明が続きます
図deploy-oci-tenancies-arch.pngの説明

deploy-oci-tenancies-arch-oracle.zip

古いテナンシでの許可ポリシーの定義

OCI許可ポリシーにより、別のテナンシのユーザーはテナンシ間で操作を実行できます。次に説明するポリシーは、古いテナンシで定義し、古いテナンシのボリュームをクローニングまたはリストアする権限を新しいテナンシのアイデンティティ・グループNewTenancyIdentityGroupに付与する必要があります。

クローン操作とリストア操作の両方によって新しいボリュームが作成されるため、ポリシーは作成操作のみを許可します。ポリシーをエンドース・ポリシー(後述)とともに定義すると、新しいテナンシのNewTenancyIdentityGroupのユーザーは、古いテナンシから新しいテナンシにボリュームをクローニングまたはリストアする権限を持ちます。

クローニングの許可ポリシー

クローニングを許可するには、OCIコンソールまたはCLIを使用して、古いテナンシに次のアイデンティティ・ポリシーを作成します。in tenancyin compartment compartment nameに置き換えることで、コンパートメント内のボリュームへのアクセスを許可するようにこれらのポリシーをさらに制限できます。

Define tenancy NewTenancy as ocid1.tenancy.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Define group NewTenancyIdentityGroup as ocid1.group.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Admit group NewTenancyIdentityGroup of tenancy NewTenancy to use volumes in tenancy where ANY { request.operation='CreateVolume', request.operation='GetVolume', request.operation='CreateBootVolume', request.operation='GetBootVolume' }

リストアの許可ポリシー

リストアを許可するには、OCIコンソールまたはCLIを使用して、古いテナンシに次のアイデンティティ・ポリシーを作成します。in tenancyin compartment compartment nameに置き換えることで、コンパートメント内のボリュームへのアクセスを許可するようにこれらのポリシーをさらに制限できます。

Define tenancy NewTenancy as ocid1.tenancy.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Define group NewTenancyIdentityGroup as ocid1.group.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Admit group NewTenancyIdentityGroup of tenancy NewTenancy to read boot-volume-backups in tenancy
Admit group NewTenancyIdentityGroup of tenancy NewTenancy to read volume-backups in tenancy 
Admit group NewTenancyIdentityGroup of tenancy NewTenancy to inspect volumes in tenancy

新規テナンシでの承認ポリシーの定義

OCIエンドース・ポリシーでは、テナンシのユーザーがテナンシ間で操作を実行することを承認します。新しいテナンシに次のポリシーを定義し、新しいテナンシのアイデンティティ・グループNewTenancyIdentityGroupに、古いテナンシのボリュームをクローニングまたはリストアする権限を付与する必要があります。クローニングとリストアでは新しいボリュームが作成されるため、ポリシーは作成操作を承認します

クローニングのエンドース・ポリシー

クローニングを許可するには、OCIコンソールまたはCLIを使用して、新しいテナンシに次のアイデンティティ・ポリシーを作成します。

Define tenancy OldTenancy as ocid1.tenancy.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Endorse group NewTenancyIdentityGroup to use volumes in tenancy OldTenancy where ANY { request.operation = 'CreateVolume', request.operation='GetVolume', request.operation='CreateBootVolume', request.operation='GetBootVolume' }

リストアの承認ポリシー

リストアを許可するには、OCIコンソールまたはCLIを使用して、新しいテナンシに次のアイデンティティ・ポリシーを作成します。

Define tenancy OldTenancy as ocid1.tenancy.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Endorse group NewTenancyIdentityGroup to read boot-volume-backups in tenancy OldTenancy
Endorse group NewTenancyIdentityGroup to read volume-backups in tenancy OldTenancy
Endorse group NewTenancyIdentityGroup to inspect volumes in tenancy OldTenancy

CLIプロファイルの構成

NewTenancyIdentityGroupのユーザーのCLIプロファイルcross_tenancy_user_profileを作成します。次の例では、このユーザーがクロス・テナンシ操作の実行に使用されます。「CLIの構成」でCLIプロファイルを構成するための完全な手順を参照してください。この手順は、このプレイブックの他の場所にある「詳細の参照」トピックからアクセスできます。

ボリュームのクローニングまたは復元

最後に、ボリュームの移行を完了するために、それをクローニングまたはリストアできます。

テナンシ間でのボリュームのクローニング

ポリシーが古いテナンシと新しいテナンシの両方で構成されたので、構成済のCLIプロファイルから次のコマンドを実行して、古いテナンシから新しいテナンシにボリュームをクローニングします。次のように、ボリュームをクローニングするコンパートメントを選択し、--compartment-id引数として渡します:

# Clone Volume
$ oci bv volume create --profile=cross_tenancy_user_profile --region=us-ashburn-1 --source-volume-id=ocid1.volume.oc1. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --compartment-id=ocid1.compartment.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Clone Boot Volume
$ oci bv boot-volume create --profile=cross_tenancy_user_profile --region=us-ashburn-1 --source-boot-volume-id=ocid1.bootvolume.oc1.iad. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --compartment-id=ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

テナンシ間でのボリュームのリストア

ポリシーが古いテナンシと新しいテナンシの両方で構成されたので、次のコマンドを実行して、古いテナンシから新しいテナンシにボリュームをリストアします。次に示すように、ボリュームをリストアするコンパートメントおよびADを選択し、--compartment-idおよび--availability-domain引数として渡します:

# Restore Volume
$ oci bv volume create --profile=cross_tenancy_user_profile --region=us-ashburn-1 ---volume-backup-id=ocid1.volumebackup.oc1.iad. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --compartment-id=ocid1.compartment.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --availability-domain=XXXX:US-ASHBURN-AD-1
# Restore Boot Volume
$ oci bv boot-volume create --profile=cross_tenancy_user_profile --region=us-ashburn-1 --boot-volume-backup-id=ocid1.bootvolumebackup.oc1.iad. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --compartment-id=ocid1.compartment.oc1.. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --availability-domain=pjBI:US-ASHBURN-AD-1