Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite wird beschrieben, wie Sie eine detaillierte Wiederherstellung für eine Sicherung in Google Distributed Cloud (GDC) Air-Gap erstellen.
Mit der Funktion zur detaillierten Wiederherstellung können Sie eine Teilmenge von Ressourcen aus einer Sicherung wiederherstellen. Mit dieser Funktion können Sie den im Wiederherstellungsplan definierten Wiederherstellungsbereich flexibel anpassen.
Hinweise
Um eine detaillierte Wiederherstellung für eine Sicherung zu erstellen, benötigen Sie Folgendes:
Administrator für Sicherungen von Nutzerclustern: Verwaltet Sicherungsressourcen wie Sicherungs- und Wiederherstellungspläne in Nutzerclustern. Bitten Sie Ihren IAM-Administrator der Organisation, Ihnen die Rolle „User Cluster Backup Admin“ (user-cluster-backup-admin) zuzuweisen.
Für AO-Nutzer:
Backup Creator: Erstellt manuelle Sicherungen und führt Wiederherstellungen durch. Bitten Sie Ihren Projekt-IAM-Administrator, Ihnen die Rolle „Backup Creator“ (backup-creator) zuzuweisen.
Erstellen Sie eine benutzerdefinierte ManualRestoreRequest-Ressource, um Wiederherstellungen aus einer vorhandenen Backups zu planen. Hier ein Beispiel für eine ManualRestoreRequest:
RESTORE_NAME ist der Name der Wiederherstellung, die Sie erstellen möchten.
PROJECT_NAMESPACE: der Name Ihres GDC-Projekts.
RESTORE_PLAN ist der Name des Wiederherstellungsplans, von dem diese Wiederherstellung abgeleitet wird.
BACKUP_NAME ist die Sicherung, die wiederhergestellt werden soll. Diese Sicherung muss mit dem Sicherungsplan verknüpft sein, auf den sich der Wiederherstellungsplan bezieht. Weitere Informationen finden Sie unter Eine Reihe von Wiederherstellungen planen.
In diesem Beispiel wird eine ConfigMap-Ressource mit dem Namen nginx-vars im Namespace webserver wiederhergestellt. Dazu wird die detaillierte Wiederherstellung inclusionFilters verwendet, um die Ressource auszuwählen. Wenn Sie Ressourcen unter der Kerngruppe auswählen möchten, verwenden Sie einen leeren String für das Feld group.
In diesem Beispiel werden alle verfügbaren Ressourcen mit Ausnahme einer groupKind-Ressource mit dem Namen sc1 wiederhergestellt. Dazu wird die detaillierte Wiederherstellung exclusionFilters verwendet, um die Ressource auszuschließen.
In diesem Beispiel werden Ressourcen mit den Labels key1:value1 und key2:value2 wiederhergestellt. Dazu wird die detaillierte Wiederherstellung inclusionFilters verwendet, um die Ressourcen auszuwählen.
Alle Ressourcen bestimmter GroupKinds ausschließen
In diesem Beispiel werden alle verfügbaren Ressourcen außer den groupKind-Ressourcen von ConfigMap und storage.k8s.io/StorageClass wiederhergestellt. Dazu wird die detaillierte Wiederherstellung exclusionFilters verwendet, um diese beiden GroupKinds auszuschließen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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)"]]