Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara membuat repositori cadangan untuk workload cluster di Google Distributed Cloud (GDC) yang terisolasi.
Repositori cadangan merepresentasikan lokasi penyimpanan yang kompatibel untuk cadangan Anda. Repositori cadangan juga digunakan untuk menyimpan catatan pencadangan, rencana pencadangan, rencana pemulihan, dan pemulihan.
Sebelum memulai
Untuk membuat repositori cadangan, Anda harus memiliki:
Endpoint yang kompatibel tersedia.
Bucket yang dibuat sebelumnya
untuk digunakan sebagai repositori cadangan.
Admin Pencadangan Organisasi: mengelola resource pencadangan seperti rencana pencadangan dan pemulihan di cluster pengguna. Minta Admin IAM Organisasi Anda untuk memberi Anda peran Organization Backup Admin (organization-backup-admin). Untuk mengetahui informasi
selengkapnya, lihat Definisi
peran.
Membuat repositori
Buat repositori menggunakan konsol GDC atau API.
Konsol
Login ke konsol GDC.
Di menu navigasi, klik Backup for Clusters. Pastikan tidak ada project yang dipilih di pemilih project.
Klik Buat repositori.
Masukkan nama repositori. Deskripsi bersifat opsional.
Di daftar Main cluster (read/write), pilih cluster.
Di daftar Linked clusters (read only), pilih cluster tertaut.
Di kolom Endpoint URI S3, masukkan endpoint yang berisi nama domain yang sepenuhnya memenuhi syarat dari situs penyimpanan objek Anda.
Di kolom Nama bucket, masukkan nama bucket yang sepenuhnya memenuhi syarat, yang dapat ditemukan dari status resource kustom bucket GDC.
Di kolom Bucket region, masukkan region tempat bucket dibuat.
Di daftar Access Key ID, masukkan ID kunci akses.
Di kolom Access key, masukkan kunci akses.
Klik Buat.
API
Untuk menggunakan API pencadangan dan pemulihan, Anda harus mengonfigurasi resource kustom ClusterBackupRepository yang valid sebagai lokasi pencadangan, dan memberikan kredensial yang diperlukan.
Tambahkan resource kustom ClusterBackupRepository untuk menggunakan kredensial ini
dan terapkan resource baru ke server Management API.
Repositori cadangan memiliki cakupan cluster:
NamespacedName yang mereferensikan secret yang berisi
kredensial akses untuk endpoint.
endpoint
Nama domain yang sepenuhnya memenuhi syarat untuk sistem penyimpanan.
type
Jenis repositori cadangan. Hanya jenis S3 yang
didukung.
s3Options
Konfigurasi untuk endpoint S3. Hal ini diperlukan jika type adalah
S3.
bucket: nama bucket yang sepenuhnya memenuhi syarat, yang dapat ditemukan dari status resource kustom bucket GDC.
region: region endpoint tertentu. Region ini khusus untuk sistem penyimpanan.
forcePathStyle: opsi ini menentukan apakah akan memaksakan URL gaya jalur untuk
objek.
importPolicy
Tetapkan ke salah satu opsi berikut:
ReadWrite: Repositori ini dapat digunakan untuk menjadwalkan
atau membuat cadangan, rencana cadangan, dan pemulihan.
ReadOnly: Repositori ini hanya dapat digunakan untuk mengimpor
dan melihat cadangan. Tidak ada cadangan atau resource baru yang dapat dibuat di repositori ini, tetapi pemulihan dapat menggunakan dan mereferensikan cadangan hanya baca untuk pemulihan. Tidak ada batasan frekuensi penggunaan repositori cadangan sebagai ReadOnly.
Kebijakan impor repositori cadangan
Semua cluster harus memiliki setidaknya satu repositori ReadWrite agar dapat berhasil menggunakan fitur pencadangan dan pemulihan. Repositori ReadOnly bersifat opsional, tidak memiliki
batas, dan digunakan untuk mendapatkan visibilitas ke cadangan cluster lain untuk
pemulihan lintas-cluster.
Repositori ReadOnly tidak dapat digunakan sebagai lokasi penyimpanan untuk pencadangan tambahan atau untuk rencana pencadangan dalam cluster tempat repositori tersebut diimpor.
Mengimpor repositori sebagai ReadWrite mengklaim repositori untuk cluster tersebut,
mencegah cluster lain mengimpor repositori yang sama sebagai
ReadWrite. Setelah mengimpor repositori ReadWrite, semua catatan pencadangan, rencana pencadangan, dan pemulihan sebelumnya di repositori tersebut akan diimpor ke cluster target sebagai resource kustom lokal.
Mengimpor repositori sebagai ReadOnly tidak mengklaim repositori, tetapi hanya mengimpor cadangan, rencana pencadangan, pemulihan, dan rencana pemulihan. Rencana pencadangan di repositori hanya baca tidak menjadwalkan pencadangan, tetapi ada untuk memberikan visibilitas ke rencana pencadangan yang ada di cluster yang Anda impor. Menghapus repositori ReadOnly akan membersihkan semua resource yang diimpor dari cluster dan tidak memengaruhi resource di lokasi penyimpanan karena tidak ada operasi tulis yang terjadi pada penyimpanan objek untuk repositori hanya baca.
Saat repositori ReadWrite dihapus dari cluster:
Semua resource kustom lokal yang terkait dengan repositori tersebut, seperti pencadangan dan pemulihan, akan dihapus dari cluster saat ini.
Klaim cluster tersebut pada repositori dihapus, sehingga repositori dapat digunakan sebagai ReadWrite oleh cluster lain. Namun, resource ini tidak dihapus dari endpoint penyimpanan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eThis guide details the process of creating a backup repository in Google Distributed Cloud (GDC) air-gapped environments for storing cluster workload backups and related records.\u003c/p\u003e\n"],["\u003cp\u003eCreating a backup repository requires a compatible endpoint, a pre-existing object storage bucket, granted access to the bucket, and the appropriate identity and access role, like the Organization Backup Admin.\u003c/p\u003e\n"],["\u003cp\u003eRepositories can be created through either the GDC console, involving the input of the main cluster, linked cluster(s), fully qualified domain name, bucket name, region, access key ID and access key; or via API, where a \u003ccode\u003eClusterBackupRepository\u003c/code\u003e custom resource is defined with the relevant credentials and storage details.\u003c/p\u003e\n"],["\u003cp\u003eBackup repositories have two import policies, \u003ccode\u003eReadWrite\u003c/code\u003e for creating new backups and resources, and \u003ccode\u003eReadOnly\u003c/code\u003e for viewing backups without the ability to create new ones, with \u003ccode\u003eReadWrite\u003c/code\u003e repositories being unique to a single cluster, and \u003ccode\u003eReadOnly\u003c/code\u003e available to many.\u003c/p\u003e\n"],["\u003cp\u003eRemoving a \u003ccode\u003eReadWrite\u003c/code\u003e repository from a cluster removes the associated custom resources from the cluster and releases the claim on the repository, while removing a \u003ccode\u003eReadOnly\u003c/code\u003e repository only removes imported resources without affecting the storage location.\u003c/p\u003e\n"]]],[],null,["# Add a backup repository\n\nThis page describes how to create a backup repository for cluster workloads in Google Distributed Cloud (GDC) air-gapped.\n\nA backup repository represents a compatible storage location for your\nbackups. A backup repository is also used to store records of\nbackups, backup plans, restore plans, and restores.\n\nBefore you begin\n----------------\n\nTo create a backup repository, you must have the following:\n\n\u003cbr /\u003e\n\n- A compatible endpoint available.\n- A previously [created bucket](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-storage-buckets) to use as the backup repository.\n- You have [granted access](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access) for the object storage bucket.\n- The necessary identity and access role:\n\n - Organization Backup Admin: manages backup resources such as backup and restore plans in user clusters. Ask your Organization IAM Admin to grant you the Organization Backup Admin (`organization-backup-admin`) role. For more information, see [Role\n definitions](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/role-definitions).\n\nCreate a repository\n-------------------\n\nCreate a repository by using the GDC console or the API. \n\n### Console\n\n1. Sign in to the GDC console.\n2. In the navigation menu, click **Backup for Clusters**. Ensure no project is selected in the project selector.\n3. Click **Create repository**.\n4. Enter a repository name. The description is optional.\n5. In the **Main cluster (read/write)** list, choose a cluster.\n6. In the **Linked clusters (read only)** list, choose the linked clusters.\n7. In the **S3 URI endpoint** field, enter an endpoint containing the fully-qualified domain name of your object storage site.\n8. In the **Bucket name** field, enter the name of the fully qualified name of the bucket, which can be found from the status of the GDC bucket custom resource.\n9. In the **Bucket region** field, enter the region where the bucket was created.\n10. In the **Access Key ID** list, enter the access key ID.\n11. In the **Access key** field, enter the access key.\n12. Click **Create**.\n\n### API\n\n\nTo use the backup and restore APIs, you must configure a valid\n`ClusterBackupRepository` custom resource to be the location of your\nbackups, and supply the required credentials.\n\n1. Fetch the secret generated in [Grant and obtain storage bucket access](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access#getting_bucket_access_credentials).\n\n2. Add a `ClusterBackupRepository` custom resource to use these credentials\n and apply the new resource to the Management API server.\n Backup repositories are cluster-scoped:\n\n apiVersion: backup.gdc.goog/v1\n kind: ClusterBackupRepository\n metadata:\n name: user-1-user\n namespace: user-1-user-cluster\n spec:\n secretReference:\n namespace: \"object-storage-secret-ns\"\n name: \"object-storage-secret\"\n endpoint: \"https://objectstorage.google.gdch.test\"\n type: \"S3\"\n s3Options:\n bucket: \"fully-qualified-bucket-name\"\n region: \"us-east-1\"\n forcePathStyle: true\n importPolicy: \"ReadWrite\"\n\n This example includes the following values:\n\nBackup repository import policies\n---------------------------------\n\nAll clusters must have at least one `ReadWrite` repository to successfully use backup and restore features. `ReadOnly` repositories are optional, have no\nlimit, and are used to gain visibility into other cluster backups for\ncross-cluster restores.\n\n`ReadOnly` repositories cannot be used as storage locations for additional\nbackups or for backup plans within the cluster they were imported.\n\nImporting a repository as `ReadWrite` claims the repository for that cluster,\npreventing other clusters from importing the same repository as\n`ReadWrite`. After importing a `ReadWrite` repository, all records of previous\nbackups, backup plans, and restores in that repository are imported into the\ntarget cluster as local custom resources.\n\nImporting a repository as `ReadOnly` does not claim the repository, it only\nimports the backups, backup plans, restores, and restore plans. Backup plans in read-only repositories don't schedule backups,\nthey exist to provide visibility into what backup plans exist in the cluster you are importing from. Removing a `ReadOnly` repository cleans up any imported resources from\nthe cluster and has no effect on the resources in the storage location as no write operations occur to object storage for read-only repositories.\n\nWhen a `ReadWrite` repository is removed from the cluster:\n\n- All local custom resources associated with that repository, such as backups and restores, are removed from the current cluster.\n- That cluster's claim on the repository is removed, allowing the repository to be used as `ReadWrite` by another cluster. However, these resources are not removed from the storage endpoint.\n\nWhat's next\n-----------\n\n- [Customize backup and restore for an application](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/cluster-backup/customize-backup-restore)\n- [Plan a set of backups](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/cluster-backup/plan-backups)"]]