Stay organized with collections
Save and categorize content based on your preferences.
This 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.
You have the option to set up a backup repository through the B4GDC UI or manually.
Before you begin
Before using backup and restore services for gdcloud CLI Database Services (DBS), you must:
Be a Platform Administrator (PA).
Have the necessary identity and access role:
DR Backup Admin: performs disaster recovery backups. Ask your Organization IAM Admin to grant you the DR Backup Admin (dr-backup-admin) cluster role.
This section assumes that you already have an S3-compatible endpoint available
and that you have created a bucket to use as the backup repository. See Create bucket on the backup site. You must also have an existing object storage secret. For more information, see Obtain bucket access credentials. Then follow these steps:
If you followed the steps listed at Obtain bucket access
credentials,
this command returns a value of object-storage-key-sysstd-sa-id.
Create a BackupRepository named dbs-backup-repository in the
Management API server and supply the object storage key value from the previous step. Replace the placeholder values with your values:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 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."]]