Configurer un dépôt de sauvegarde pour les services de base de données
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment configurer un B4GDC BackupRepository nommé dbs-backup-repository sur le serveur de l'API Management pour l'utiliser comme cible pour vos sauvegardes.
Vous pouvez configurer un dépôt de sauvegarde via l'UI B4GDC ou manuellement.
Avant de commencer
Avant d'utiliser les services de sauvegarde et de restauration pour les services de base de données (DBS) de la gcloud CLI, vous devez :
être administrateur de plate-forme.
Disposez du rôle d'identité et d'accès nécessaire :
Administrateur DR Backup : effectue des sauvegardes pour la reprise après sinistre. Demandez à votre administrateur IAM de l'organisation de vous accorder le rôle de cluster Administrateur des sauvegardes de reprise après sinistre (dr-backup-admin).
Configurer manuellement le dépôt de sauvegarde DBS
Cette section suppose que vous disposez déjà d'un point de terminaison compatible S3 et que vous avez créé un bucket à utiliser comme dépôt de sauvegarde. Consultez Créer un bucket sur le site de sauvegarde. Vous devez également disposer d'un secret de stockage d'objets existant. Pour en savoir plus, consultez Obtenir des identifiants d'accès aux buckets. Ensuite, procédez comme suit :
Créez un BackupRepository nommé dbs-backup-repository sur le serveur de l'API Management et fournissez la valeur de la clé de stockage d'objets de l'étape précédente. Remplacez les valeurs d'espace réservé par les vôtres :
OBJECT_STORAGE_KEY_SECRET : nom du secret obtenu à la première étape.
ENDPOINT : point de terminaison de votre stockage d'objets.
BUCKET_NAME : nom de votre bucket.
REGION : région de votre bucket.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/02 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/02 (UTC)."],[[["\u003cp\u003eBackups for gdcloud CLI Database Services (DBS) can be set up through the B4GDC UI or manually.\u003c/p\u003e\n"],["\u003cp\u003eTo use backup and restore services, you must be a Platform Administrator (PA) and have the DR Backup Admin (\u003ccode\u003edr-backup-admin\u003c/code\u003e) cluster role.\u003c/p\u003e\n"],["\u003cp\u003eA valid \u003ccode\u003eB4GDC BackupRepository\u003c/code\u003e named \u003ccode\u003edbs-backup-repository\u003c/code\u003e must be set up in the Management API server for storing backups.\u003c/p\u003e\n"],["\u003cp\u003eManual setup requires an existing S3-compatible endpoint, a designated bucket, and a valid object storage secret.\u003c/p\u003e\n"],["\u003cp\u003eAn existing object storage key must be obtained and used during the creation of the \u003ccode\u003eBackupRepository\u003c/code\u003e in the Management API server, ensuring it references the correct namespace and secret name.\u003c/p\u003e\n"]]],[],null,["# Set up backup repository for database services\n\nThis page provides instructions for how to set up a `B4GDC BackupRepository` named `dbs-backup-repository` in the Management API server to use as the target for your backups.\n\nYou have the option to set up a backup repository through the B4GDC UI or manually.\n\nBefore you begin\n----------------\n\nBefore using backup and restore services for gdcloud CLI Database Services (DBS), you must:\n\n- Be a Platform Administrator (PA).\n- Have the necessary identity and access role:\n - DR Backup Admin: performs disaster recovery backups. Ask your Organization IAM Admin to grant you the DR Backup Admin (`dr-backup-admin`) cluster role.\n- Have an existing object storage secret. For more information, see [Obtain bucket access credentials](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access#getting_bucket_access_credentials).\n\nSet up DBS backup repository manually\n-------------------------------------\n\nThis section assumes that you already have an S3-compatible endpoint available\nand that you have created a bucket to use as the backup repository. See [Create bucket on the backup site](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/configure-disaster-recovery#create-bucket-on-backup-site). You must also have an existing object storage secret. For more information, see [Obtain bucket access credentials](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access#getting_bucket_access_credentials). Then follow these steps:\n\n1. Get the existing object storage key:\n\n kubectl get secret -n dr-system | grep object-storage-key\n\n If you followed the steps listed at [Obtain bucket access\n credentials](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access#getting_bucket_access_credentials),\n this command returns a value of `object-storage-key-sysstd-sa-id`.\n2. Create a `BackupRepository` named `dbs-backup-repository` in the\n Management API server and supply the object storage key value from the previous step. Replace the placeholder values with your values:\n\n apiVersion: backup.gdc.goog/v1\n kind: BackupRepository\n metadata:\n name: dbs-backup-repository\n spec:\n secretReference:\n namespace: \"dr-system\"\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eOBJECT_STORAGE_KEY_SECRET\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: true\n importPolicy: \"ReadWrite\"\n force: true\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eOBJECT_STORAGE_KEY_SECRET\u003c/var\u003e: the secret name you obtained in the first step.\n- \u003cvar translate=\"no\"\u003eENDPOINT\u003c/var\u003e: the endpoint of your object storage.\n- \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e: the name of your bucket.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region of your bucket."]]