このページでは、Compute Engine インスタンスのバックアップ、マウント、復元に必要な IAM ロールと権限について説明します。
IAM のロールと権限
インスタンスをバックアップ、マウント、復元するには、バックアップ/リカバリ アプライアンスのサービス アカウントに Backup and DR Compute Engine Operator ロールを割り当てるか、カスタムロールを作成し、このページに記載されているすべての権限を割り当てる必要があります。
次のリストに、Compute Engine インスタンスのバックアップ、マウント、復元に必要な事前定義された Compute Engine IAM 権限を示します。
Compute Engine インスタンスをバックアップする
compute.disks.createSnapshotcompute.disks.getcompute.instances.listcompute.instances.setLabelscompute.regions.getcompute.regionOperations.getcompute.snapshots.createcompute.snapshots.deletecompute.snapshots.getcompute.snapshots.setLabelscompute.snapshots.useReadOnlycompute.zones.listcompute.zoneOperations.getiam.serviceAccounts.actAsiam.serviceAccounts.getiam.serviceAccounts.listresourcemanager.projects.getresourcemanager.projects.list
既存の Compute Engine インスタンスにマウントする
compute.disks.createcompute.disks.deletecompute.disks.getcompute.disks.usecompute.diskTypes.getcompute.diskTypes.listcompute.images.createcompute.images.deletecompute.images.getcompute.images.useReadOnlycompute.instances.attachDiskcompute.instances.createcompute.instances.deletecompute.instances.detachDiskcompute.instances.getcompute.instances.listcompute.instances.setMetadatacompute.regions.getcompute.regions.listcompute.regionOperations.getcompute.zones.listiam.serviceAccounts.actAsiam.serviceAccounts.getiam.serviceAccounts.listresourcemanager.projects.get
新しい Compute Engine インスタンスにマウントしてインスタンスを復元する
compute.addresses.listcompute.diskTypes.getcompute.diskTypes.listcompute.disks.createcompute.disks.createSnapshotcompute.disks.deletecompute.disks.getcompute.disks.setLabelscompute.disks.usecompute.firewalls.listcompute.globalOperations.getcompute.images.createcompute.images.deletecompute.images.getcompute.images.useReadOnlycompute.instances.attachDiskcompute.instances.createcompute.instances.deletecompute.instances.detachDiskcompute.instances.getcompute.instances.listcompute.instances.setLabelscompute.instances.setMetadatacompute.instances.setServiceAccountcompute.instances.setTagscompute.instances.startcompute.instances.stopcompute.machineTypes.getcompute.machineTypes.listcompute.networks.listcompute.nodeGroups.listcompute.nodeGroups.getcompute.nodeTemplates.getcompute.projects.getcompute.regions.getcompute.regionOperations.getcompute.snapshots.createcompute.snapshots.getcompute.snapshots.setLabelscompute.snapshots.useReadOnlycompute.subnetworks.listcompute.subnetworks.usecompute.subnetworks.useExternalIpcompute.zoneOperations.getcompute.zones.listiam.serviceAccounts.actAsiam.serviceAccounts.getiam.serviceAccounts.listresourcemanager.projects.get
顧客管理の暗号鍵を使用して Compute Engine インスタンスをマウントする権限
ソースディスクがカスタマー マネージド暗号鍵(CMEK)を使用している場合に、Compute Engine バックアップ イメージを既存または新しい Compute Engine インスタンスとしてマウントするには、ターゲット プロジェクトから Compute Engine サービス エージェントのサービス アカウント名をコピーし、ソース プロジェクトに追加して、次のようにロール CryptoKey Encrypter/Decrypter を割り当てる必要があります。
CMEK を使用するときに権限を追加する手順は次のとおりです。
- [Project] プルダウンから、ターゲット プロジェクトを選択します。
- 左側のナビゲーション メニューで、[IAM と管理] > [IAM] に移動します。
- [Google 提供のロール付与を含む] を選択します。
- Compute Engine サービス エージェントのサービス アカウントを見つけて、プリンシパルの ID をコピーします。これはメールアドレス形式です(my-service-account@my-project など)。iam.gserviceaccount.com
- 鍵が作成されたソース プロジェクトを [プロジェクト] プルダウンから選択します。
- 左側のナビゲーション メニューで、[IAM と管理] > [IAM] に移動します。
- [アクセス権を付与] を選択します。
- [プリンシパルを追加] に、ターゲット プロジェクトの Compute Engine サービス エージェントの ID を貼り付けます。
- [ロールを割り当てる] で、
Cloud KMS CryptoKey Encrypter/Decrypterロールを割り当てます。 - [保存] を選択します。
バックアップと DR の Compute Engine ガイド
- クラウド認証情報を確認する
- Compute Engine インスタンスの検出と保護
- Compute Engine インスタンスのバックアップ イメージをマウントする
- Compute Engine インスタンスを復元する
- 永続ディスクのスナップショット イメージをインポートする