Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara membuat repositori cadangan
untuk virtual machine (VM) di Google Distributed Cloud (GDC) yang terisolasi.
Sebelum membuat cadangan atau snapshot, Anda harus menentukan setidaknya satu repositori cadangan yang dapat dibagikan di antara beberapa cadangan atau snapshot. Repositori cadangan memberi tahu sistem pencadangan tempat menyimpan atau mengambil cadangan.
Repositori cadangan untuk VM dibatasi ke server Management API.
Sebelum memulai
Untuk membuat repositori cadangan, Anda harus memiliki:
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 cadangan
Buat repositori menggunakan konsol GDC atau API.
Konsol
Login ke konsol GDC.
Di menu navigasi, klik Backup for Virtual Machines > Repositories.
Klik Buat repositori.
Masukkan nama repositori dan deskripsi opsional.
Di kolom Endpoint URI S3, masukkan endpoint dengan nama domain yang sepenuhnya memenuhi syarat dari situs penyimpanan objek Anda.
Di kolom Bucket name, masukkan nama bucket.
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
Buat resource kustom ClusterBackupRepository menggunakan kredensial Anda.
Tambahkan kredensial (access-key dan access-key-id) ke server Management API sebagai secret untuk berkomunikasi dengan bucket penyimpanan yang dapat Anda gunakan untuk mencadangkan dan memulihkan banyak VM yang berbeda. Secret ini ditambahkan ke server Management API untuk mengotomatiskan operasi pencadangan dan pemulihan. Secret ini tidak ada di dalam VM yang dicadangkan atau dipulihkan. Kredensial harus terlihat seperti contoh berikut:
STORAGE_NAMESPACE: namespace untuk secret yang berisi kredensial akses untuk endpoint, seperti object-storage-secret-ns.
STORAGE_NAME: nama secret yang berisi kredensial akses untuk endpoint, seperti object-storage-secret.
ENDPOINT: nama domain yang sepenuhnya memenuhi syarat untuk sistem penyimpanan, seperti https://objectstorage.google.gdch.test. Untuk kolom type, hanya nilai S3 yang didukung
BUCKET_NAME: nama bucket.
REGION: region tempat bucket dibuat.
FORCE_PATH_STYLE: Gunakan kolom forcePathStyle untuk menerapkan URL gaya jalur untuk objek. Kolom ini harus memiliki nilai true atau false.
IMPORT_POLICY: 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 seberapa sering repositori cadangan dapat digunakan sebagai ReadOnly.
ClusterBackupRepository membuat resource BackupRepository yang diaktifkan untuk baca-tulis di server Management API yang memiliki nama yang sama.
[[["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 page details the process of creating a backup repository for virtual machines (VMs) within Google Distributed Cloud (GDC) air-gapped environments.\u003c/p\u003e\n"],["\u003cp\u003eCreating a backup repository is a prerequisite for initiating any VM backups or snapshots, serving as the designated storage location.\u003c/p\u003e\n"],["\u003cp\u003eUsers can create a backup repository either through the GDC console or by utilizing the API, requiring specific storage bucket and S3 credentials.\u003c/p\u003e\n"],["\u003cp\u003eThe API method involves adding storage access credentials as a secret to the Management API server and then creating a \u003ccode\u003eClusterBackupRepository\u003c/code\u003e with endpoint, bucket, and region details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eimportPolicy\u003c/code\u003e field in the API allows for defining the repository's access as either \u003ccode\u003eReadWrite\u003c/code\u003e, allowing backups and restores, or \u003ccode\u003eReadOnly\u003c/code\u003e, allowing only viewing backups and restoring from them.\u003c/p\u003e\n"]]],[],null,["# Create a backup repository\n\nThis page describes how to create a backup repository\nfor virtual machines (VMs) in Google Distributed Cloud (GDC) air-gapped.\n\nBefore creating backups or snapshots, you must define at least one\nbackup repository that can be shared among several backups or snapshots. A\nbackup repository tells the backup system where to store or retrieve backups.\nBackup repositories for VMs are restricted to Management API server.\n\nBefore you begin\n----------------\n\nTo create a backup repository, you must have the following:\n\n- [A storage bucket and S3 credentials](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-storage-buckets) for the 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 backup repository\n--------------------------\n\nCreate a repository using the GDC console or the API. \n\n### Console\n\n1. Sign into the GDC console.\n2. In the navigation menu, click **Backup for Virtual Machines \\\u003e Repositories**.\n3. Click **Create repository**.\n4. Enter a repository name and an optional description.\n5. In the **S3 URI endpoint** field, enter an endpoint with the fully-qualified domain name of your object storage site.\n6. In the **Bucket name** field, enter the name of the bucket.\n7. In the **Bucket region** field, enter the region where the bucket was created.\n8. In the **Access Key ID** list, enter the access key ID.\n9. In the **Access key** field, enter the access key.\n10. Click **Create**.\n\n### API\n\n\nCreate a `ClusterBackupRepository` custom resource using your credentials.\n\n1. Add the credentials (`access-key` and `access-key-id`) to the Management API server as a secret to communicate with a storage bucket that you can\n use to backup and restore many different VMs. This secret is added\n to the Management API server to automate backup and restore operations. This secret\n doesn't exist inside any of the VMs being backed up or restored. The credentials must look like the following example:\n\n apiVersion: v1\n kind: Namespace\n metadata:\n name: \"s3-secret-ns\"\n labels:\n name: \"s3-secret-ns\"\n ---\n apiVersion: v1\n kind: Secret\n metadata:\n namespace: \"s3-secret-ns\"\n name: \"s3-secret\"\n type: Opaque\n data:\n access-key-id: YWNjZXNzS2V5MQ== # echo -n accessKey1 | base64 -w0\n access-key: dmVyeVNlY3JldEtleTE= # echo -n verySecretKey1 | base64 -w0\n\n2. Create a `ClusterBackupRepository` directly in the Management API server:\n\n apiVersion: backup.gdc.goog/v1\n kind: ClusterBackupRepository\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eREPOSITORY_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n secretReference:\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eSTORAGE_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eSTORAGE_NAME\u003c/span\u003e\u003c/var\u003e\n endpoint: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eENDPOINT\u003c/span\u003e\u003c/var\u003e\n type: \"S3\"\n s3Options:\n bucket: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n region: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eREGION\u003c/span\u003e\u003c/var\u003e\n forcePathStyle: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eFORCE_PATH_STYLE\u003c/span\u003e\u003c/var\u003e\n importPolicy: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eIMPORT_POLICY\u003c/span\u003e\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eREPOSITORY_NAME\u003c/var\u003e: the name of the backup repository.\n - \u003cvar translate=\"no\"\u003eSTORAGE_NAMESPACE\u003c/var\u003e: the namespace for the secret that contains access credentials for the endpoint, such as `object-storage-secret-ns`.\n - \u003cvar translate=\"no\"\u003eSTORAGE_NAME\u003c/var\u003e: the name of the secret that contains access credentials for the endpoint, such as `object-storage-secret`.\n - \u003cvar translate=\"no\"\u003eENDPOINT\u003c/var\u003e: the fully qualified domain name for the storage system, such as `https://objectstorage.google.gdch.test`. For the `type` field, only a value of `S3` is supported\n - \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e: the name of the bucket.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region where the bucket was created.\n - \u003cvar translate=\"no\"\u003eFORCE_PATH_STYLE\u003c/var\u003e: Use the `forcePathStyle` field to force path style URLs for objects. This field must have a value of `true` or `false`.\n - \u003cvar translate=\"no\"\u003eIMPORT_POLICY\u003c/var\u003e: Set to one of the following:\n - `ReadWrite`: This repository can be used to schedule or create backups, backup plans, and restores.\n - `ReadOnly`: This repository can only be used to import and view backups. No new backups or resources can be created in this repository, but restores can use and reference read-only backups for restoration. There is no restriction on how often a backup repository can be used as ReadOnly.\n\n The `ClusterBackupRepository` creates a read-write enabled `BackupRepository` resource in the Management API server that has the same name.\n\nWhat's next\n-----------\n\n- [Manage a backup repository](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/vm-backup/manage-backup-repository)"]]