Import backup repository for Database Services

This page describes how to import backup repositories for Database Services (DBS). You must do this for each Organization you want to restore DBClusters in.

Before you begin

Before using backup and restore services for gdcloud CLI 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.

    To import backup repositories for DBS, follow the proceeding steps:

Import backup repository DBS

  1. On the system cluster of the target gdcloud CLI instance, create a B4GDC Backup Repository resource which points to the same bucket used to store DBS backups in the sources gdcloud CLI instance:

      cat << EOF > backup_repo_plan.yaml
      apiVersion: backup.gdc.goog/v1
      kind: BackupRepository
      metadata:
        name: dbs-backup-repository
      spec:
        secretReference:
          namespace: dbs-dr
          name: secret
        endpoint: ENDPOINT
        type: S3
        s3Options:
          bucket: ORGNAME-dbs-bucket
          region: REGION
          forcePathStyle: true
        importPolicy: ReadWrite
      EOF
      kubectl apply -f backup_repo_plan.yaml
    
  2. Verify backups are successfully imported to the Org admin cluster of the target gdcloud CLI instance:

    kubectl get backups.gdc.goog -n dbs-dr
    

    Successful backups are imported and have a Succeeded state.