Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se describe cómo crear una copia de seguridad bajo demanda de los datos de un clúster de AlloyDB.
Cuando creas una copia de seguridad a pedido, AlloyDB verifica que el clúster del que creas la copia de seguridad y su instancia principal estén en el estado "Listo" y, luego, inicia una operación de larga duración para realizar la copia de seguridad de los datos del clúster.
Selecciona Clave de encriptación administrada por el cliente (CMEK).
Selecciona una clave administrada por el cliente en el menú que aparece.
La consola de Google Cloud limita esta lista a las claves que se encuentran dentro del mismo proyecto y región de Google Cloud que el clúster nuevo. Para usar una clave que no está en esta lista, haz clic en
¿No ves tu llave? Ingresa el nombre del recurso de la clave y, luego, escribe el nombre del recurso de la clave en el diálogo resultante.
Ten en cuenta que usar la CMEK con AlloyDB requiere
una configuración adicional. Para obtener más información, consulta Usa CMEK con AlloyDB.
Haz clic en Crear.
AlloyDB verifica que el clúster de origen esté en el estado "Listo" y, luego, inicia una operación de larga duración para realizar la copia de seguridad. En la página Copias de seguridad, se muestra la copia de seguridad con el estado "En curso" hasta que se completa la operación.
BACKUP_ID: Es el ID de la copia de seguridad que se creará.
Para crear una copia de seguridad en una ubicación entre regiones con gcloud CLI, reemplaza la ruta de acceso completa de la copia de seguridad con el siguiente formato: projects/PROJECT_ID/locations/REGION_ID/backups/BACKUP_ID
CLUSTER_ID: Es el ID del clúster del que deseas crear una copia de seguridad.
REGION_ID: Es el ID de la región en la que se coloca el clúster.
PROJECT_ID: Es el ID del proyecto en el que se coloca el clúster.
Si deseas encriptar esta copia de seguridad con una clave de encriptación administrada por el cliente (CMEK) en lugar de la encriptación predeterminada administrada por Google, debes proporcionar estos argumentos adicionales:
--kms-key=KEY_ID: Es el ID de la clave de CMEK que se usará.
--kms-keyring=KEYRING_ID: Es el ID del llavero de la clave.
--kms-location=LOCATION_ID: Es el ID de la región de ese llavero. Ten en cuenta que debe coincidir con la región del clúster.
--kms-project=PROJECT_ID: Es el ID del proyecto del llavero.
Cuando ejecutas este comando, AlloyDB verifica que el clúster de origen esté en el estado "Listo", inicia una operación de larga duración para realizar la copia de seguridad y muestra información sobre la operación de larga duración.
Puedes hacer un seguimiento de la finalización de la operación de larga duración con el comando operations describe:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-03 (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."]]