嘗試備份 Persistent Disk 或 Google Cloud Hyperdisk 時,如果因違反機構政策限制而失敗,就會發生錯誤 412,並顯示以下錯誤訊息:Error 412: Constraint constraints/compute.storageResourceUseRestrictions violated for project aaaaa. projects/aaax/zones/aa-aaaaa-a/disks/aaaa can't be used within your project., conditionNotMet
備份和災難復原服務會建立 Persistent Disk 和 Google Cloud Hyperdisk 的備份。
備份會存放在由 Google Cloud管理的 Google Cloud 專案 (又稱租戶專案) 中。租戶專案位於 google.com 機構內,與您的機構分開。
機構政策會規定您可以在何處建立儲存空間資源。
The Constraint constraints/compute.storageResourceUseRestrictions violated錯誤表示資源或備份項目違反政策,因為是在不屬於允許的機構結構的租戶專案中建立。由於租戶專案位於 google.com 機構內,因此不符合您定義的政策,導致備份失敗。
如要解決這項錯誤,請按照下列指示操作:
找出實作 constraints/compute.storageResourceUseRestrictions 限制的機構政策。如要進一步瞭解如何使用 Google Cloud 控制台查看機構政策,請參閱「查看機構政策」。
修改 constraints/compute.storageResourceUseRestrictions 政策,將 Backup for GKE 使用的 folders/238813353932 租戶專案資料夾納入允許清單。
將資料夾新增至允許清單後,請儲存政策變更。
機構政策更新並傳播後 (通常需要幾分鐘),請重新測試備份作業。備份作業應繼續進行,且不得違反儲存空間資源使用限制。如果作業仍未成功,請與 Cloud Customer Care 團隊聯絡,尋求進一步的協助。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Troubleshoot backup failure issues\n\nThis page shows you how to resolve issues with Backup and DR Service for\nresources that are backed up within the backup vault using the\n[backup plan](/backup-disaster-recovery/docs/cloud-console/backup-plan). To find\nsolutions for resources protected using the\n[backup template](/backup-disaster-recovery/docs/create-plan/create-template)\nin the management console, see [Event IDs and error messages](/backup-disaster-recovery/docs/event-codes).\n\n`PERMISSION_DENIED` issue\n-------------------------\n\nThe backup job failed due to missing permissions in the source project and\nthe following error message is displayed: \n\n Backup and DR agent or backup vault service agent is missing the permissions required to take backups of resources in the source project.\n\nTo resolve the issue, do the following:\n\n1. If the backup vault and the resource are in the same project, assign the Backup and DR agent (`roles/backupdr.serviceAgent`) IAM role to the [backup dr service agent](/backup-disaster-recovery/docs/cloud-console/backup-vault-create#agent), which is in the `service-\u003cproject-number\u003e@gcp-sa-backupdr.iam.gserviceaccount.com` format.\n2. If the backup vault and the resource to protect are in different projects, assign the Compute instance admin (v1) (`roles/compute.instanceAdmin.v1`) IAM role to the [backup dr service agent](/backup-disaster-recovery/docs/cloud-console/backup-vault-create#agent), which is in the `service-\u003cproject-number\u003e@gcp-sa-backupdr.iam.gserviceaccount.com` format.\n\n`FAILED_PRECONDITION` issue\n---------------------------\n\nThe backup job failed when the protected resource was deleted and the following\nerror message is displayed: \n\n Backup job failed due to unmet conditions. Check for source resource deletion or backup misconfigurations.\n\nTo resolve this issue, do the following:\n\n- Verify that the protected resource still exists from the **VM instances** page.\n\n [Go to VM instances](https://console.cloud.google.com/compute/instances)\n- If the deletion was intentional, [unprotect the Compute Engine instance](/backup-disaster-recovery/docs/cloud-console/compute/compute-instance-backup#unprotect).\n\nError 412: constraints/compute.storageResourceUseRestrictions violated\n----------------------------------------------------------------------\n\nError 412 occurs when an attempt to back up a Persistent Disk or Google Cloud Hyperdisk\nfails due to an organization policy constraint violation during backup creation,\nresulting in an error message stating\n`Error 412: Constraint constraints/compute.storageResourceUseRestrictions violated for project aaaaa. projects/aaax/zones/aa-aaaaa-a/disks/aaaa can't be used within your project., conditionNotMet`\n\nBackup and DR creates backups of your Persistent Disks and Google Cloud Hyperdisks.\nThe backups reside in your Google Cloud project (also known as the tenant project)\nthat is managed by Google Cloud. The tenant project exists within the\ngoogle.com organization, separate from your own organization.\n\nYour organization policy dictates where you can create storage resources.\n`The Constraint constraints/compute.storageResourceUseRestrictions violated`\nerror means that a resource or backup is violating the policy by being created\nin a tenant project that isn't part of your allowed organizational structure.\nBecause the tenant project is within the google,com organization, it falls outside of\nyour defined policy, which leads to the backup failure.\n\nTo resolve this error, use the following instructions:\n\n1. Locate the organization policy that implements the\n `constraints/compute.storageResourceUseRestrictions` constraint. For more\n information about how to view organization policies using the Google Cloud console,\n see [Viewing organization policies](/resource-manager/docs/organization-policy/creating-managing-policies#viewing_organization_policies).\n\n2. Modify the `constraints/compute.storageResourceUseRestrictions` policy to\n include the `folders/238813353932` tenant project folder used by\n Backup for GKE in its allowlist.\n\n | **Note:** Make sure the specified folder ID is added to the list of allowed locations to permit Backup for GKE to create snapshots within its tenant projects, even though they are outside your organizational hierarchy.\n3. Save the policy changes after you add the folder to the allowlist.\n\n4. Retest the backup operation after the organization policy updates and\n propagates, which usually takes a few minutes. The backup should proceed\n without violating the storage resource use restrictions. If the operation is\n still unsuccessful, contact Cloud Customer Care for further assistance."]]