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 service account
-
add keys for the service account:
- add the GCS configuration to PBM
Create a bucket¶
-
Install and configure the gcloud CLI
-
Create a bucket
$ gcloud storage buckets create my-gcs-bucket --location=US
-
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:
- Change the
storage.type
froms3
togcs
. - Change the
storage.s3
section tostorage.gcs
and adjust the parameters accordingly. See the Configuration example above. Select the option depending on the authentication method you use.
Created: May 29, 2025