Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se describe cómo crear un repositorio de copias de seguridad para máquinas virtuales (VM) en Google Distributed Cloud (GDC) aislado.
Antes de crear copias de seguridad o instantáneas, debes definir al menos un repositorio de copias de seguridad que se pueda compartir entre varias copias de seguridad o instantáneas. Un repositorio de copia de seguridad le indica al sistema de copia de seguridad dónde almacenar o recuperar las copias de seguridad.
Los repositorios de copias de seguridad para VMs están restringidos al servidor de la API de Management.
Antes de comenzar
Para crear un repositorio de copias de seguridad, debes tener lo siguiente:
Administrador de copias de seguridad de la organización: Administra recursos de copias de seguridad, como planes de copias de seguridad y restablecimiento en clústeres de usuario. Pídele al administrador de IAM de la organización que te otorgue el rol de administrador de copias de seguridad de la organización (organization-backup-admin). Para obtener más información, consulta Definiciones de roles.
Crea un repositorio de copias de seguridad
Crea un repositorio con la consola de GDC o la API.
Console
Accede a la consola de GDC.
En el menú de navegación, haz clic en Copia de seguridad para máquinas virtuales > Repositorios.
Haz clic en Crear repositorio.
Ingresa un nombre de repositorio y una descripción opcional.
En el campo Extremo del URI de S3, ingresa un extremo con el nombre de dominio completamente calificado de tu sitio de almacenamiento de objetos.
En el campo Nombre del bucket, ingresa el nombre del bucket.
En el campo Región del bucket, ingresa la región en la que se creó el bucket.
En la lista ID de clave de acceso, ingresa el ID de la clave de acceso.
En el campo Clave de acceso, ingresa la clave de acceso.
Haz clic en Crear.
API
Crea un recurso personalizado ClusterBackupRepository con tus credenciales.
Agrega las credenciales (access-key y access-key-id) al servidor de la API de Management como un secreto para comunicarse con un bucket de almacenamiento que puedes usar para crear copias de seguridad y restablecer muchas VMs diferentes. Este secreto se agrega al servidor de la API de Management para automatizar las operaciones de copia de seguridad y restablecimiento. Este secreto no existe en ninguna de las VMs de las que se crea una copia de seguridad o que se restablecen. Las credenciales deben verse como en el siguiente ejemplo:
REPOSITORY_NAME: Es el nombre del repositorio de copias de seguridad.
STORAGE_NAMESPACE: Es el espacio de nombres del secreto que contiene las credenciales de acceso para el extremo, como object-storage-secret-ns.
STORAGE_NAME: Es el nombre del secreto que contiene las credenciales de acceso para el extremo, como object-storage-secret.
ENDPOINT: Es el nombre de dominio completamente calificado del sistema de almacenamiento, como https://objectstorage.google.gdch.test. Para el campo type, solo se admite el valor S3.
BUCKET_NAME: el nombre del bucket.
REGION: Es la región en la que se creó el bucket.
FORCE_PATH_STYLE: Usa el campo forcePathStyle para forzar URLs con estilo de ruta de acceso para los objetos. Este campo debe tener un valor de true o false.
IMPORT_POLICY: Se establece en uno de los siguientes valores:
ReadWrite: Este repositorio se puede usar para programar o crear copias de seguridad, planes de copias de seguridad y restablecimientos.
ReadOnly: Este repositorio solo se puede usar para importar y ver copias de seguridad. No se pueden crear copias de seguridad ni recursos nuevos en este repositorio, pero los restablecimientos pueden usar y hacer referencia a copias de seguridad de solo lectura para el restablecimiento. No hay restricciones sobre la frecuencia con la que se puede usar un repositorio de copias de seguridad como ReadOnly.
El comando ClusterBackupRepository crea un recurso BackupRepository habilitado para lectura y escritura en el servidor de la API de Management que tiene el mismo nombre.
[[["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-04 (UTC)"],[[["\u003cp\u003eThis page details the process of creating a backup repository for virtual machines (VMs) within Google Distributed Cloud (GDC) air-gapped environments.\u003c/p\u003e\n"],["\u003cp\u003eCreating a backup repository is a prerequisite for initiating any VM backups or snapshots, serving as the designated storage location.\u003c/p\u003e\n"],["\u003cp\u003eUsers can create a backup repository either through the GDC console or by utilizing the API, requiring specific storage bucket and S3 credentials.\u003c/p\u003e\n"],["\u003cp\u003eThe API method involves adding storage access credentials as a secret to the Management API server and then creating a \u003ccode\u003eClusterBackupRepository\u003c/code\u003e with endpoint, bucket, and region details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eimportPolicy\u003c/code\u003e field in the API allows for defining the repository's access as either \u003ccode\u003eReadWrite\u003c/code\u003e, allowing backups and restores, or \u003ccode\u003eReadOnly\u003c/code\u003e, allowing only viewing backups and restoring from them.\u003c/p\u003e\n"]]],[],null,["# Create a backup repository\n\nThis page describes how to create a backup repository\nfor virtual machines (VMs) in Google Distributed Cloud (GDC) air-gapped.\n\nBefore creating backups or snapshots, you must define at least one\nbackup repository that can be shared among several backups or snapshots. A\nbackup repository tells the backup system where to store or retrieve backups.\nBackup repositories for VMs are restricted to Management API server.\n\nBefore you begin\n----------------\n\nTo create a backup repository, you must have the following:\n\n- [A storage bucket and S3 credentials](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-storage-buckets) for the bucket.\n- The necessary identity and access role:\n\n - Organization Backup Admin: manages backup resources such as backup and restore plans in user clusters. Ask your Organization IAM Admin to grant you the Organization Backup Admin (`organization-backup-admin`) role. For more information, see [Role\n definitions](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/role-definitions).\n\nCreate a backup repository\n--------------------------\n\nCreate a repository using the GDC console or the API. \n\n### Console\n\n1. Sign into the GDC console.\n2. In the navigation menu, click **Backup for Virtual Machines \\\u003e Repositories**.\n3. Click **Create repository**.\n4. Enter a repository name and an optional description.\n5. In the **S3 URI endpoint** field, enter an endpoint with the fully-qualified domain name of your object storage site.\n6. In the **Bucket name** field, enter the name of the bucket.\n7. In the **Bucket region** field, enter the region where the bucket was created.\n8. In the **Access Key ID** list, enter the access key ID.\n9. In the **Access key** field, enter the access key.\n10. Click **Create**.\n\n### API\n\n\nCreate a `ClusterBackupRepository` custom resource using your credentials.\n\n1. Add the credentials (`access-key` and `access-key-id`) to the Management API server as a secret to communicate with a storage bucket that you can\n use to backup and restore many different VMs. This secret is added\n to the Management API server to automate backup and restore operations. This secret\n doesn't exist inside any of the VMs being backed up or restored. The credentials must look like the following example:\n\n apiVersion: v1\n kind: Namespace\n metadata:\n name: \"s3-secret-ns\"\n labels:\n name: \"s3-secret-ns\"\n ---\n apiVersion: v1\n kind: Secret\n metadata:\n namespace: \"s3-secret-ns\"\n name: \"s3-secret\"\n type: Opaque\n data:\n access-key-id: YWNjZXNzS2V5MQ== # echo -n accessKey1 | base64 -w0\n access-key: dmVyeVNlY3JldEtleTE= # echo -n verySecretKey1 | base64 -w0\n\n2. Create a `ClusterBackupRepository` directly in the Management API server:\n\n apiVersion: backup.gdc.goog/v1\n kind: ClusterBackupRepository\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eREPOSITORY_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n secretReference:\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eSTORAGE_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eSTORAGE_NAME\u003c/span\u003e\u003c/var\u003e\n endpoint: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eENDPOINT\u003c/span\u003e\u003c/var\u003e\n type: \"S3\"\n s3Options:\n bucket: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n region: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eREGION\u003c/span\u003e\u003c/var\u003e\n forcePathStyle: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eFORCE_PATH_STYLE\u003c/span\u003e\u003c/var\u003e\n importPolicy: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eIMPORT_POLICY\u003c/span\u003e\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eREPOSITORY_NAME\u003c/var\u003e: the name of the backup repository.\n - \u003cvar translate=\"no\"\u003eSTORAGE_NAMESPACE\u003c/var\u003e: the namespace for the secret that contains access credentials for the endpoint, such as `object-storage-secret-ns`.\n - \u003cvar translate=\"no\"\u003eSTORAGE_NAME\u003c/var\u003e: the name of the secret that contains access credentials for the endpoint, such as `object-storage-secret`.\n - \u003cvar translate=\"no\"\u003eENDPOINT\u003c/var\u003e: the fully qualified domain name for the storage system, such as `https://objectstorage.google.gdch.test`. For the `type` field, only a value of `S3` is supported\n - \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e: the name of the bucket.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region where the bucket was created.\n - \u003cvar translate=\"no\"\u003eFORCE_PATH_STYLE\u003c/var\u003e: Use the `forcePathStyle` field to force path style URLs for objects. This field must have a value of `true` or `false`.\n - \u003cvar translate=\"no\"\u003eIMPORT_POLICY\u003c/var\u003e: Set to one of the following:\n - `ReadWrite`: This repository can be used to schedule or create backups, backup plans, and restores.\n - `ReadOnly`: This repository can only be used to import and view backups. No new backups or resources can be created in this repository, but restores can use and reference read-only backups for restoration. There is no restriction on how often a backup repository can be used as ReadOnly.\n\n The `ClusterBackupRepository` creates a read-write enabled `BackupRepository` resource in the Management API server that has the same name.\n\nWhat's next\n-----------\n\n- [Manage a backup repository](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/vm-backup/manage-backup-repository)"]]