Configurar um repositório de backup para serviços de banco de dados
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Esta página fornece instruções sobre como configurar um B4GDC BackupRepository chamado dbs-backup-repository no servidor da API Management para usar como destino dos seus backups.
É possível configurar um repositório de backup pela UI do B4GDC ou manualmente.
Antes de começar
Antes de usar os serviços de backup e restauração para os serviços de banco de dados (DBS) da CLI gdcloud, você precisa:
Ser um administrador da plataforma (PA, na sigla em inglês).
Ter o papel de identidade e acesso necessário:
Administrador de backup de DR: realiza backups de recuperação de desastres. Peça ao administrador do IAM da organização para conceder a você o papel de Administrador de backup de DR (dr-backup-admin) do cluster.
Configurar manualmente o repositório de backup do DBS
Esta seção pressupõe que você já tenha um endpoint compatível com S3 disponível
e que tenha criado um bucket para usar como repositório de backup. Consulte Criar um bucket no local do backup. Você também precisa ter um Secret de armazenamento de objetos. Para mais informações, consulte Receber credenciais de acesso ao bucket. Em seguida:
Extraia a chave de armazenamento de objetos atual:
Crie um BackupRepository chamado dbs-backup-repository no
servidor da API Management e forneça o valor da chave de armazenamento de objetos da etapa anterior. Substitua os valores de marcador pelos seus:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-05 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."]]