Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos como criar uma restauração refinada para um backup no Google Distributed Cloud (GDC) isolado por air-gap.
O recurso de restauração detalhada permite restaurar um subconjunto de recursos de um
backup. Esse recurso oferece a flexibilidade
de refinar o escopo de restauração definido no plano de restauração.
Antes de começar
Para criar uma restauração detalhada de um backup, você precisa ter o seguinte:
Administrador de backup de cluster de usuário: gerencia recursos de backup, como planos de backup e
restauração em clusters de usuário. Peça ao administrador do IAM da organização para conceder a você o papel de administrador de backup do cluster de usuário (user-cluster-backup-admin).
Para usuários do AO:
Criador de backup: cria backups e restaurações manuais. Peça ao administrador do IAM do projeto para conceder a você o papel de criador de backup (backup-creator).
RESTORE_NAME: o nome da restauração que você
quer criar.
PROJECT_NAMESPACE: o nome do seu projeto do GDC.
RESTORE_PLAN: o nome do plano de restauração de origem da restauração.
BACKUP_NAME: o backup a ser restaurado. Ele precisa estar associado ao plano de backup a que o plano de restauração se refere. Para mais informações, consulte Planejar um conjunto de restaurações.
Os exemplos a seguir são fornecidos no formato YAML usado pela Google Cloud CLI.
Restaurar um único recurso com escopo de namespace
Este exemplo restaura um recurso ConfigMap com o nome nginx-vars no
namespace webserver, usando a restauração detalhada inclusionFilters para selecionar
o recurso. Se quiser escolher recursos no grupo principal, use uma string vazia no campo group.
Este exemplo restaura todos os recursos disponíveis, exceto um recurso groupKind
com o nome sc1, usando a restauração detalhada
exclusionFilters para excluir o recurso.
Este exemplo restaura recursos que têm os rótulos key1:value1 e
key2:value2, usando a restauração detalhada inclusionFilters para selecionar os
recursos.
Este exemplo restaura todos os recursos disponíveis, exceto os recursos groupKind de ConfigMap
e storage.k8s.io/StorageClass, usando a restauração detalhada exclusionFilters
para excluir esses dois GroupKinds.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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)"]]