Skip to content

For help, click the link below to get free database assistance or contact our experts for personalized support.

Google Cloud Storage (GCS)

You can use Google Cloud Storage (GCS) as a remote backup storage for Percona Backup for MongoDB.

Starting from version 2.10.0, PBM uses the Google Cloud SDK instead of AWS SDK. See how to adjust your PBM configuration to use GCS after the upgrade.

PBM supports communication with GCS via the JSON API and XML API. The preferred approach is to use the JSON API with a service account. HMAC keys are mainly useful for compatibility with S3-style APIs.

To use GCS, you need the following:

Create a bucket

  1. Install and configure the gcloud CLI

  2. Create a bucket

    $ gcloud storage buckets create my-gcs-bucket --location=US
    
  3. Verify the bucket creation

    $ gcloud storage buckets list
    

After the bucket is created, apply the proper permissions for PBM to use the bucket.

Configuration example

storage:
 type: gcs
 gcs:
     bucket: pbm-testing
     chunkSize: 16777216
     prefix: pbm/test
     endpointUrl: https://storage.googleapis.com
     credentials:
       projectId: <your-google-cloud-project-id-here>
       privateKey: <your-private-key-here>
storage:
 type: gcs
 gcs:
     bucket: pbm-testing
     chunkSize: 16777216
     prefix: pbm/test
     endpointUrl: https://storage.googleapis.com
     credentials:
       HMACAccessKey: <your-access-key-id-here>
       HMACSecret: <your-secret-key-here>

Adjust PBM configuration to use GCS

Starting with version 2.10.0, PBM uses the Google Cloud SDK instead of AWS SDK. If you are upgrading from an earlier version, you need to adjust your PBM configuration as follows:

  1. Change the storage.type from s3 to gcs.
  2. Change the storage.s3 section to storage.gcs and adjust the parameters accordingly. See the Configuration example above. Select the option depending on the authentication method you use.

Last update: May 29, 2025
Created: May 29, 2025