Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to create a fine-grained restore for a backup in Google Distributed Cloud (GDC) air-gapped.
The fine-grained restore feature lets you restore a subset of resources from a
backup. This feature provides the flexibility
to refine the restore scope defined in the restore plan.
Before you begin
To create a fine-grained restore for a backup, you must have the following:
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.
For AO users:
Backup Creator: creates manual backups and restores. Ask your Project IAM Admin to grant you the Backup Creator (backup-creator) role.
RESTORE_NAME: the name of the restore that you want to create.
PROJECT_NAMESPACE: the name of your GDC project.
RESTORE_PLAN: the name of the restore plan this restore is derived from.
BACKUP_NAME: 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.
The following examples are provided in the YAML format used by Google Cloud CLI.
Restore a single namespace scoped resource
This example restores a ConfigMap resource with the name nginx-vars in the
namespace webserver, using the fine-grained restore inclusionFilters to select
the resource. If you want to choose resources under the core group, use an empty
string for the group field.
This example restores all available resources except for one groupKind
resource with the name sc1, using the fine-grained restore
exclusionFilters to exclude the resource.
This example restores resources which have both labels key1:value1 and
key2:value2, using the fine-grained restore inclusionFilters to select the
resources.
This example restores all available resources except for the groupKind resources of ConfigMap
and storage.k8s.io/StorageClass, using the fine-grained restore exclusionFilters
to exclude these two GroupKinds.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 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)"]]