Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina descrive come creare un repository di backup per i carichi di lavoro del cluster in Google Distributed Cloud (GDC) air-gapped.
Un repository di backup rappresenta una posizione di archiviazione compatibile per i backup. Un repository di backup viene utilizzato anche per archiviare i record di backup, piani di backup, piani di ripristino e ripristini.
Prima di iniziare
Per creare un repository di backup, devi disporre di:
Un endpoint compatibile disponibile.
Un bucket creato in precedenza
da utilizzare come repository di backup.
Amministratore dei backup dell'organizzazione: gestisce le risorse di backup come i piani di backup e ripristino nei cluster utente. Chiedi all'amministratore IAM dell'organizzazione di concederti
il ruolo Amministratore backup organizzazione (organization-backup-admin). Per ulteriori informazioni, consulta Definizioni dei ruoli.
Crea un repository
Crea un repository utilizzando la console GDC o l'API.
Console
Accedi alla console GDC.
Nel menu di navigazione, fai clic su Backup per i cluster. Assicurati che nessun progetto
sia selezionato nel selettore dei progetti.
Fai clic su Crea repository.
Inserisci un nome per il repository. La descrizione è facoltativa.
Nell'elenco Cluster principale (lettura/scrittura), scegli un cluster.
Nell'elenco Cluster collegati (sola lettura), scegli i cluster collegati.
Nel campo Endpoint URI S3, inserisci un endpoint contenente il nome di dominio completo del tuo sito di archiviazione degli oggetti.
Nel campo Nome bucket, inserisci il nome completo del bucket, che puoi trovare nello stato della risorsa personalizzata del bucket GDC.
Nel campo Regione bucket, inserisci la regione in cui è stato creato il bucket.
Nell'elenco ID chiave di accesso, inserisci l'ID chiave di accesso.
Nel campo Chiave di accesso, inserisci la chiave di accesso.
Fai clic su Crea.
API
Per utilizzare le API di backup e ripristino, devi configurare una risorsa personalizzata
ClusterBackupRepository valida come posizione dei backup e fornire le credenziali richieste.
Aggiungi una risorsa personalizzata ClusterBackupRepository per utilizzare queste credenziali
e applica la nuova risorsa al server API Management.
I repository di backup hanno ambito cluster:
Un NamespacedName che fa riferimento al secret che contiene
le credenziali di accesso per endpoint.
endpoint
Il nome di dominio completo del sistema di archiviazione.
type
Il tipo di repository di backup. È supportato solo il tipo S3.
s3Options
La configurazione dell'endpoint S3. Questo campo è obbligatorio se type è
S3.
bucket: il nome completo del bucket, che può essere trovato nello stato della risorsa personalizzata del bucket GDC.
region: la regione dell'endpoint specificato. La regione è
specifica per il sistema di archiviazione.
forcePathStyle: questa opzione determina se forzare gli URL in stile percorso per gli oggetti.
importPolicy
Imposta uno dei seguenti valori:
ReadWrite: questo repository può essere utilizzato per pianificare
o creare backup, piani di backup e ripristini.
ReadOnly: Questo repository può essere utilizzato solo per importare
e visualizzare i backup. In questo repository non è possibile creare nuovi backup o risorse, ma i ripristini possono utilizzare e fare riferimento ai backup di sola lettura per il ripristino. Non esiste alcuna limitazione alla frequenza con cui un
repository di backup può essere utilizzato come ReadOnly.
Policy di importazione del repository di backup
Tutti i cluster devono avere almeno un repository ReadWrite per utilizzare correttamente le funzionalità di backup e ripristino. I repository ReadOnly sono facoltativi, non hanno limiti e vengono utilizzati per ottenere visibilità su altri backup del cluster per i ripristini tra cluster.
I repository ReadOnly non possono essere utilizzati come posizioni di archiviazione per backup aggiuntivi o per piani di backup all'interno del cluster in cui sono stati importati.
L'importazione di un repository come ReadWrite rivendica il repository per quel cluster,
impedendo ad altri cluster di importare lo stesso repository come
ReadWrite. Dopo aver importato un repository ReadWrite, tutti i record di backup, piani di backup e ripristini precedenti nel repository vengono importati nel cluster di destinazione come risorse personalizzate locali.
L'importazione di un repository come ReadOnly non rivendica il repository, ma importa solo i backup, i piani di backup, i ripristini e i piani di ripristino. I piani di backup nei repository di sola lettura non pianificano i backup, ma esistono per fornire visibilità sui piani di backup esistenti nel cluster da cui stai importando. La rimozione di un repository ReadOnly pulisce tutte le risorse importate dal cluster e non ha alcun effetto sulle risorse nella posizione di archiviazione, poiché non vengono eseguite operazioni di scrittura nell'object storage per i repository di sola lettura.
Quando un repository ReadWrite viene rimosso dal cluster:
Tutte le risorse personalizzate locali associate a quel repository, come backup
e ripristini, vengono rimosse dal cluster corrente.
La rivendicazione del cluster sul repository viene rimossa, consentendo l'utilizzo del repository
come ReadWrite da parte di un altro cluster. Tuttavia, queste risorse non vengono rimosse dall'endpoint di archiviazione.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)"]]