이 페이지에서는 복원 작업 중에 Backup for GKE가 서로 다른 GroupKinds를 복원하는 순서를 지정하는 방법을 설명합니다.
개요
기본적으로 Backup for GKE는 리소스 간의 종속 항목 요구 사항을 충족하는 순서대로 잘 알려진 GroupKind를 복원합니다. 그러나 특정 순서로 복원해야 하는 추가 리소스가 있는 경우 복원 순서 기능을 사용하여 영향을 받는 리소스 간에 종속 항목을 정의하여 필요한 순서를 지정할 수 있습니다.
복원 계획 만들기 또는 업데이트 작업 중에 커스텀 GroupKind 종속 항목 목록을 지정할 수 있습니다. 두 커스텀 리소스 간의 종속 항목을 표시하려면 다음 두 GroupKinds를 지정합니다.
충족 GroupKind: 이 GroupKind는 종속 항목을 충족하며 필요 GroupKind보다 앞에 복원되어야 합니다. Google Cloud 콘솔에서는 이 GroupKind를 1차 API 그룹 및 1차 객체 종류 필드라고 합니다.
필요 GroupKind: 이 GroupKind는 먼저 복원할 충족 GroupKind에 따라 달라집니다. Google Cloud 콘솔에서는 이 GroupKind를 2차 API 그룹 및 2차 객체 종류 필드라고 합니다.
Backup for GKE는 커스텀 종속 항목 목록과 기본 종속 항목을 가져와 결합하여 GroupKind 복원 순서를 생성합니다.
기본 종속 항목
다음 표에는 충족 및 필요 GroundKind 리소스 사이의 기본 페어링 종속 항목이 나와 있습니다. 복원 순서를 정의할 때 Backup for GKE는 필요 GroupKinds 전에 모든 충족 GroundKind를 복원합니다.
예를 들어, Backup for GKE는 항상 PersistentVolumeClaims에 앞서 모든 storage.k8s.io/StorageClass를 복원합니다.
또한, 기본 복원 순서는 모든 네임스페이스 범위 리소스보다 먼저 네임스페이스를 복원하고 CustomResources보다 먼저 CustomResourceDefinitions을 복원하는 등의 기본 사례도 처리합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Specify resource restore ordering during restoration\n\nAutopilot Standard\n\n*** ** * ** ***\n\nThis page describes how to specify the order in which Backup for GKE\nshould restore different GroupKinds during a restore operation.\n\nOverview\n--------\n\nBy default, Backup for GKE restores well-known GroupKinds in an order that\nfulfills dependency requirements among resources. However, if there are additional\nresources that need restoring in a specific order, you can use the restore ordering\nfeature to specify the required order by defining dependencies between the affected\nresources.\n\nDuring a restore plan create or update operation, you can specify a list of\ncustom GroupKind dependencies. To represent a dependency between two custom\nresources, specify the following two GroupKinds:\n\n- Satisfying GroupKind: this GroupKind satisfies the dependencies and must be restored before the requiring GroupKind. In the Google Cloud console, this GroupKind is termed as the **First API group** and **First object kind** fields.\n- Requiring GroupKind: this GroupKind depends on the satisfying GroupKind to be restored first. In the Google Cloud console, this GroupKind is termed as the **Second API group** and **Second object kind** fields.\n\nBackup for GKE takes a list of custom dependencies and the\n[default dependencies](#default) and combines them to generate a GroupKind restore order.\n\nDefault dependencies\n--------------------\n\nThe following table lists the default pairing dependencies between satisfying\nand requiring GroundKind resources. When defining a restoring order,\nBackup for GKE restores all satisfying GroundKinds before Requiring GroupKinds.\nFor example, Backup for GKE always restores all `storage.k8s.io/StorageClass`\nbefore `PersistentVolumeClaims`.\n\nThe default restore ordering also handles basic cases, such as restoring\nnamespaces before all namespaced resources and restoring `CustomResourceDefinitions`\nbefore any `CustomResources`.\n\nDefine resource restore ordering\n--------------------------------\n\nUse the following instructions to add custom GroupKind dependencies to a restore plan.\nRefer to the list of [default dependencies](#default) for all GroupKind dependencies\nthat are already handled by Backup for GKE and don't need to be specified. \n\n### gcloud\n\n1. Create a YAML file to define restore order. You can use the following YAML example.\n\n The following example indicates that `stable.example.com/First` must be\n restored before `stable.example.com/Second` and that `stable.example.com/Second`\n must be restored before `stable.example.com/Third`. \n\n restoreOrder:\n groupKindDependencies:\n - satisfying:\n resourceGroup: stable.example.com\n resourceKind: First\n requiring:\n resourceGroup: stable.example.com\n resourceKind: Second\n - satisfying:\n resourceGroup: stable.example.com\n resourceKind: Second\n requiring:\n resourceGroup: stable.example.com\n resourceKind: Third\n\n2. Define a restore order using the restore order file you created.\n\n gcloud beta container backup-restore restore-plans update \u003cvar translate=\"no\"\u003eRESTORE_PLAN\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e \\\n --restore_order_file=\u003cvar translate=\"no\"\u003eRESTORE_ORDER_FILE\u003c/var\u003e\n\n Replace the following:\n\n- \u003cvar translate=\"no\"\u003eRESTORE_PLAN\u003c/var\u003e: the name of the restore plan that you want to update.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the compute region of the parent restore plan.\n- \u003cvar translate=\"no\"\u003eRESTORE_ORDER_FILE\u003c/var\u003e: the path to the YAML file containing the GroupKind dependencies, as shown in the earlier example.\n\n### Console\n\nUse the following instructions to add order to an existing restore plan in the Google Cloud console:\n\n1. In the Google Cloud console, go to the **Google Kubernetes Engine** page.\n\n [Go to Google Kubernetes Engine](https://console.cloud.google.com/kubernetes/list)\n2. In the navigation menu, click **Backup for GKE**.\n\n3. Click the **Restore plans** tab.\n\n4. Click the restore plan name.\n\n5. Click the **Details** tab.\n\n6. Click **Edit** that is next to the **Restore order**.\n\n7. Click **Add order set**.\n\n8. In the Item 1 section, enter **First API group 1** and **First object kind 1**\n followed by **Second API group 2** and **Second object kind 2** the order\n in which the resources to be restored.\n\n9. Click **Save changes**.\n\nWhat's next\n-----------\n\n- Learn more about [restoring a backup](/kubernetes-engine/docs/add-on/backup-for-gke/how-to/restore)."]]