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 restablecimiento detallado para una copia de seguridad en Google Distributed Cloud (GDC) aislado.
La función de restablecimiento detallado te permite restablecer un subconjunto de recursos desde una copia de seguridad. Esta función proporciona la flexibilidad necesaria para definir mejor el alcance del restablecimiento definido en el plan de restablecimiento.
Antes de comenzar
Para crear un restablecimiento detallado de una copia de seguridad, debes tener lo siguiente:
Administrador de copias de seguridad de clústeres de usuario: 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 clústeres de usuarios (user-cluster-backup-admin).
Para usuarios de AO:
Backup Creator: Crea copias de seguridad y restablecimientos manuales. Pídele al administrador de IAM del proyecto que te otorgue el rol de creador de copias de seguridad (backup-creator).
Crea un recurso personalizado ManualRestoreRequest para planificar restablecimientos a partir de un recurso Backups existente. Este es un ejemplo de ManualRestoreRequest:
RESTORE_NAME: Es el nombre del restablecimiento que deseas crear.
PROJECT_NAMESPACE: Es el nombre de tu proyecto de GDC.
RESTORE_PLAN: Es el nombre del plan de restablecimiento del que deriva el restablecimiento.
BACKUP_NAME: Es la copia de seguridad que se debe restablecer. Esta copia de seguridad debe estar asociada al plan de copia de seguridad al que hace referencia el plan de restablecimiento. Para obtener más información, consulta Planifica un conjunto de restablecimientos.
Los siguientes ejemplos se proporcionan en el formato YAML que usa Google Cloud CLI.
Restablece un solo recurso con permiso de espacio de nombres
En este ejemplo, se restablece un recurso ConfigMap con el nombre nginx-vars en el espacio de nombres webserver, con el restablecimiento detallado inclusionFilters para seleccionar el recurso. Si deseas elegir recursos del grupo principal, usa una cadena vacía para el campo group.
Cómo excluir un solo recurso con permiso de clúster
En este ejemplo, se restablecen todos los recursos disponibles, excepto un recurso groupKind con el nombre sc1, usando el objeto exclusionFilters de restablecimiento detallado para excluir el recurso.
En este ejemplo, se restablecen los recursos que tienen las etiquetas key1:value1 y key2:value2, con el restablecimiento detallado inclusionFilters para seleccionar los recursos.
En este ejemplo, se restablecen todos los recursos disponibles, excepto los recursos groupKind de ConfigMap y storage.k8s.io/StorageClass, con el restablecimiento detallado exclusionFilters para excluir estos dos GroupKinds.
[[["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 guide outlines the process of creating a fine-grained restore for a backup in Google Distributed Cloud (GDC) air-gapped environments, allowing for the restoration of specific subsets of resources.\u003c/p\u003e\n"],["\u003cp\u003eFine-grained restores require an existing backup and the appropriate identity and access management (IAM) roles, such as User Cluster Backup Admin or Backup Creator, depending on the user type.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating fine-grained restore filters using YAML, specifying resources to be included or excluded based on group, kind, name, namespace, or labels.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eManualRestoreRequest\u003c/code\u003e custom resource must be created, defining the \u003ccode\u003erestoreName\u003c/code\u003e, \u003ccode\u003ePROJECT_NAMESPACE\u003c/code\u003e, \u003ccode\u003erestorePlanName\u003c/code\u003e, \u003ccode\u003ebackupName\u003c/code\u003e, and the fine-grained restore filters.\u003c/p\u003e\n"],["\u003cp\u003eThe guide offers examples of fine-grained restore filters in YAML format, demonstrating how to restore resources based on various criteria like namespace, group, name, or label.\u003c/p\u003e\n"]]],[],null,["# Create a fine-grained restore\n\nThis page describes how to create a fine-grained restore for a backup in Google Distributed Cloud (GDC) air-gapped.\n\nThe fine-grained restore feature lets you restore a subset of resources from a\nbackup. This feature provides the flexibility\nto refine the restore scope defined in the restore plan.\n\nBefore you begin\n----------------\n\nTo create a fine-grained restore for a backup, you must have the following:\n\n- An existing backup. For more information, see [Plan a set of backups](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/cluster-backup/plan-backups).\n- The necessary identity and access role:\n\n - For PA users:\n - User Cluster Backup Admin: manages backup resources such as backup and restore plans in user clusters. Ask your Organization IAM Admin to grant you the User Cluster Backup Admin (`user-cluster-backup-admin`) role.\n - For AO users:\n - Backup Creator: creates manual backups and restores. Ask your Project IAM Admin to grant you the Backup Creator (`backup-creator`) role.\n - For more information, see [Role definitions](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/role-definitions).\n\nCreate a fine-grained restore\n-----------------------------\n\nTo create a restore with a fine-grained filter, follow these steps:\n\n1. Create the fine-grained restore filters. You can use the following YAML\n example.\n\n inclusionFilters:\n - groupKind:\n group: foo.io\n kind: Bar\n name: name1\n namespace: ns1\n exclusionFilters:\n - labels:\n key1: value1\n key2: value2\n\n2. Create a `ManualRestoreRequest` custom resource to plan restores from\n an existing `Backups`. Here's an example of a `ManualRestoreRequest`:\n\n apiVersion: backup.gdc.goog/v1\n kind: ManualRestoreRequest\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRESTORE_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n spec:\n restoreName: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRESTORE_NAME\u003c/span\u003e\u003c/var\u003e\n restorePlanName: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRESTORE_PLAN\u003c/span\u003e\u003c/var\u003e\n backupName: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBACKUP_NAME\u003c/span\u003e\u003c/var\u003e\n filter:\n \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eFINE_GRAINED_RESTORE_FILTERS\u003c/span\u003e\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eRESTORE_NAME\u003c/var\u003e: the name of the restore that you want to create.\n- \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: the name of your GDC project.\n- \u003cvar translate=\"no\"\u003eRESTORE_PLAN\u003c/var\u003e: the name of the restore plan this restore is derived from.\n- \u003cvar translate=\"no\"\u003eBACKUP_NAME\u003c/var\u003e: the backup to restore. This backup must be associated with the backup plan to which the restore plan refers to. For more information, see [Plan a set of restores](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/cluster-backup/plan-restores#create-restore-plan).\n- \u003cvar translate=\"no\"\u003eFINE_GRAINED_RESTORE_FILTER\u003c/var\u003e: the fine-grained restore filters. For examples, see [Fine-grained restore filter\n examples](#fine-grained-restore-filter-examples).\n\nFine-grained restore filter examples\n------------------------------------\n\nThe following examples are provided in the YAML format used by Google Cloud CLI.\n\n### Restore a single namespace scoped resource\n\nThis example restores a `ConfigMap` resource with the name `nginx-vars` in the\nnamespace `webserver`, using the fine-grained restore `inclusionFilters` to select\nthe resource. If you want to choose resources under the core group, use an empty\nstring for the `group` field. \n\n filter:\n inclusionFilters:\n - groupKind:\n kind: ConfigMap\n name: nginx-vars\n namespace: webserver\n\n### Exclude a single cluster scoped resource\n\nThis example restores all available resources except for one `groupKind`\nresource with the name `sc1`, using the fine-grained restore\n`exclusionFilters` to exclude the resource. \n\n filter:\n exclusionFilters:\n - groupKind:\n group: storage.k8s.io\n kind: StorageClass\n name: sc1\n\n### Restore resources with two labels\n\nThis example restores resources which have both labels `key1:value1` and\n`key2:value2`, using the fine-grained restore `inclusionFilters` to select the\nresources. \n\n filter:\n inclusionFilters:\n - labels:\n key1: value1\n key2: value2\n\n### Exclude all resources of some GroupKinds\n\nThis example restores all available resources except for the `groupKind` resources of `ConfigMap`\nand `storage.k8s.io/StorageClass`, using the fine-grained restore `exclusionFilters`\nto exclude these two GroupKinds. \n\n filter:\n exclusionFilters:\n - groupKind:\n kind: ConfigMap\n - groupKind:\n group: storage.k8s.io\n kind: StorageClass\n\nWhat's next\n-----------\n\n- [View and delete a restore](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/cluster-backup/view-and-delete-restore)"]]