Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara membuat pencadangan on-demand data cluster AlloyDB.
Saat Anda membuat cadangan sesuai permintaan, AlloyDB akan memeriksa apakah
cluster yang Anda cadangkan dan instance utamanya berada dalam status "Siap", lalu
memulai operasi yang berjalan lama untuk melakukan pencadangan data cluster.
Pilih Kunci enkripsi yang dikelola pelanggan (CMEK).
Pilih kunci yang dikelola pelanggan dari menu yang muncul.
Konsol Google Cloud membatasi daftar ini ke kunci dalam
project dan region Google Cloud yang sama dengan cluster
baru. Untuk menggunakan kunci yang tidak ada dalam daftar ini, klik
Tidak melihat kunci Anda? Masukkan nama resource kunci,
lalu ketik nama resource kunci ke dalam dialog
yang dihasilkan.
Perhatikan bahwa penggunaan CMEK dengan AlloyDB memerlukan
beberapa penyiapan tambahan. Untuk mengetahui informasi selengkapnya, lihat Menggunakan CMEK dengan
AlloyDB.
Klik Buat.
AlloyDB memeriksa apakah cluster sumber dalam status "Siap", lalu memulai operasi yang berjalan lama untuk melakukan pencadangan. Halaman
Pencadangan menampilkan pencadangan dengan status "Sedang berlangsung" hingga
operasi selesai.
BACKUP_ID: ID untuk cadangan yang akan dibuat.
Untuk membuat cadangan di lokasi lintas region menggunakan gcloud CLI, ganti dengan jalur
cadangan lengkap dalam format berikut: projects/PROJECT_ID/locations/REGION_ID/backups/BACKUP_ID
CLUSTER_ID: ID cluster yang ingin Anda cadangkan.
REGION_ID: ID region tempat cluster ditempatkan.
PROJECT_ID: ID project tempat cluster ditempatkan.
Jika Anda ingin mengenkripsi cadangan ini menggunakan kunci enkripsi yang dikelola pelanggan (CMEK), bukan enkripsi yang dikelola Google secara default, Anda harus memberikan argumen tambahan berikut:
--kms-key=KEY_ID: ID kunci CMEK yang akan digunakan.
--kms-keyring=KEYRING_ID: ID keyring kunci.
--kms-location=LOCATION_ID: ID region keyring tersebut. Perhatikan bahwa region ini harus cocok dengan region cluster.
--kms-project=PROJECT_ID: Project ID keyring.
Saat Anda menjalankan perintah ini, AlloyDB akan memeriksa apakah cluster
sumber dalam status "Siap", memulai operasi yang berjalan lama untuk melakukan
pencadangan, dan menampilkan informasi tentang operasi yang berjalan lama.
Anda dapat melacak penyelesaian operasi yang berjalan lama menggunakan
perintah operations describe:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-25 UTC."],[[["\u003cp\u003eThis guide outlines the process for creating on-demand backups of AlloyDB cluster data, ensuring the cluster and its primary instance are in the "Ready" state before initiating the backup.\u003c/p\u003e\n"],["\u003cp\u003eBackups can be initiated through the Google Cloud console or using the \u003ccode\u003egcloud\u003c/code\u003e CLI, providing flexibility in managing your AlloyDB data.\u003c/p\u003e\n"],["\u003cp\u003eCreating an on-demand backup via the Google Cloud Console involves navigating to the Backups page, selecting the source cluster, specifying backup details, and the option to use Customer-Managed Encryption Keys (CMEK).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcloud\u003c/code\u003e CLI method utilizes the \u003ccode\u003egcloud alloydb backups create\u003c/code\u003e command, with options for specifying cluster, region, project IDs, and the option to encrypt backups with CMEK, and returns an operation ID that can be used to check its status.\u003c/p\u003e\n"],["\u003cp\u003eBefore creating a backup, users must have appropriate IAM roles, such as \u003ccode\u003eroles/alloydb.admin\u003c/code\u003e, \u003ccode\u003eroles/owner\u003c/code\u003e, or \u003ccode\u003eroles/editor\u003c/code\u003e, in their Google Cloud project to gain access.\u003c/p\u003e\n"]]],[],null,["# Create an on-demand backup\n\nThis page describes how to create an on-demand backup of\nan AlloyDB cluster's data.\n\nWhen you create an on-demand backup, AlloyDB checks that the\ncluster you're backing up and its primary instance are in the \"Ready\" state, and\nthen it starts a long-running operation to perform the backup of the cluster\ndata.\n\n\nBefore you begin\n----------------\n\n- The Google Cloud project you are using must have been [enabled to access AlloyDB](/alloydb/docs/project-enable-access).\n- You must have one of these IAM roles in the Google Cloud project you are using:\n - `roles/alloydb.admin` (the AlloyDB Admin predefined IAM role)\n - `roles/owner` (the Owner basic IAM role)\n - `roles/editor` (the Editor basic IAM role)\n\n If you don't have any of these roles, contact your Organization Administrator to request\n access.\n\n\u003cbr /\u003e\n\nProcedure\n---------\n\n### Console\n\n1. In the Google Cloud console, go to the **Backups** page.\n\n [Go to Backups](https://console.cloud.google.com/alloydb/backups)\n2. Click **Create backup**.\n3. Select the source cluster you want to back up.\n4. Enter an ID for the backup.\n5. If desired, enter a description to help you identify this backup.\n6. If you want to encrypt this backup using [Customer-managed encryption key (CMEK)](/alloydb/docs/cmek)\n instead of Google-managed encryption, follow these\n additional steps:\n\n 1. Click **Advanced encryption options**.\n 2. Select **Customer-managed encryption key (CMEK)**.\n 3. Select a\n customer-managed key from the menu that appears.\n\n The Google Cloud console limits this list to keys within\n the same Google Cloud project and region as the new\n cluster. To use a key that is not on this list, click\n **Don't see your key? Enter key resource name**,\n and then type the key's resource name into the resulting\n dialog.\n\n Note that using CMEK with AlloyDB requires\n some additional setup. For more information, see [Using CMEK with\n AlloyDB](/alloydb/docs/use-cmek).\n7. Click **Create**.\n\nAlloyDB checks that the source cluster is in the \"Ready\"\nstate and then starts a long-running operation to perform the backup. The\n**Backups** page shows the backup with a status of \"In progress\" until\nthe operation completes.\n\n### gcloud\n\nTo use the gcloud CLI, you can\n[install and initialize](/sdk/docs/install) the Google Cloud CLI, or you\ncan use [Cloud Shell](/shell/docs/using-cloud-shell).\n\nUse the [`gcloud alloydb backups create`](/sdk/gcloud/reference/alloydb/backups/create) command to create an on-demand backup. \n\n```\ngcloud alloydb backups create BACKUP_ID \\\n --cluster=CLUSTER_ID \\\n --region=REGION_ID \\\n --project=PROJECT_ID \\\n --async\n```\n\nThis command returns an operation, whose status you can query using the [`gcloud alloydb operations describe`](/sdk/gcloud/reference/alloydb/operations/describe) command. \n\n```\ngcloud alloydb operations describe OPERATION_ID \\\n --region=REGION_ID \\\n --project=PROJECT_ID\n```\n\n- \u003cvar translate=\"no\"\u003eBACKUP_ID\u003c/var\u003e: The ID for the backup to create. \n To create a backup in a [cross-region location](/alloydb/docs/backup/overview#cross-region-backup-location) using the gcloud CLI, replace with the full backup path in the following format: \n `projects/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`/backups/`\u003cvar translate=\"no\"\u003eBACKUP_ID\u003c/var\u003e \n | Cross-region backups require gcloud CLI version 484.0.0 or higher.\n- \u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e: The ID of the cluster you want to back up.\n- \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: The ID of the region where the cluster is placed.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project where the cluster is placed.\n\nIf you want to encrypt this backup using a [customer-managed encryption key (CMEK)](/alloydb/docs/cmek)\ninstead of the default Google-managed encryption, then you must provide these additional arguments:\n\n- `--kms-key=`\u003cvar translate=\"no\"\u003eKEY_ID\u003c/var\u003e: The ID of the CMEK key to use.\n- `--kms-keyring=`\u003cvar translate=\"no\"\u003eKEYRING_ID\u003c/var\u003e: The ID of the key's keyring.\n- `--kms-location=`\u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: The ID of that keyring's region. Note that it must match the cluster's region.\n- `--kms-project=`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The keyring's project ID.\n\n| Using CMEK with AlloyDB requires some additional setup. For more information, see [Using CMEK with\n| AlloyDB](/alloydb/docs/use-cmek).\n\nWhen you run this command, AlloyDB checks that the source\ncluster is the \"Ready\" state, starts a long-running operation to perform the\nbackup, and displays information about the long-running operation.\n\nYou can track completion of the long-running operation using the\n`operations describe` command: \n\n```\ngcloud alloydb operations describe OPERATION_ID \\\n --region=REGION_ID \\\n --project=PROJECT_ID\n```\n\n\u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: The operation ID reported when you ran the\n`backups create` command."]]