The easiest way to provide remote backup storage configuration is to specify it in a YAML config file and upload this file to Percona Backup for MongoDB using pbm CLI.
The storage configuration itself is out of scope of the present document. We assume that you have configured one of the supported remote backup storages and provisioned access keys with the proper permissions for PBM. See Remote Backup Storage for more details.
Percona Backup for MongoDB needs its own dedicated S3 bucket exclusively for backup-related files. Ensure that this bucket is created and managed solely by PBM.
-
Create a config file (e.g.
pbm_config.yaml). You can use the template configuration file :octicons-link-external-16: and modify it as needed.=== ":material-aws: Amazon AWS"
```yaml storage: type: s3 s3: region: us-west-2 bucket: pbm-test-bucket prefix: data/pbm/backup credentials: access-key-id: <your-access-key-id-here> secret-access-key: <your-secret-key-here> ```=== ":simple-minio: S3-compatible (MinIO)"
```yaml storage: type: minio minio: endpoint: minio.example.com:9000 bucket: pbm-test-bucket prefix: data/pbm/backup credentials: access-key-id: <your-access-key-id-here> secret-access-key: <your-secret-key-here> ```=== ":material-google-cloud: GCS (SA)"
```yaml storage: type: gcs gcs: bucket: pbm-testing chunkSize: 16777216 prefix: pbm/test credentials: clientEmail: <your-service-account-email> privateKey: <your-service-account-private-key-here> ```=== ":material-google-cloud: GCS (HMAC) (deprecated)"
```yaml storage: type: gcs gcs: bucket: pbm-testing prefix: pbm/test credentials: hmacAccessKey: <your-access-key-id-here> hmacSecret: <your-secret-key-here> ```=== ":material-microsoft-azure: Microsoft Azure Blob Storage"
```yaml storage: type: azure azure: account: <your-account> container: <your-container> prefix: pbm credentials: key: <your-access-key> ```=== "Alibaba Cloud Storage"
```yaml storage: type: oss oss: region: eu-central-1 bucket: your-bucket-name endpointUrl: https://oss-eu-central-1.aliyuncs.com credentials: accessKeyID: "STS.****************" accessKeySecret: "3dZn*******************************************" ```=== ":material-file-tree: Shared local filesystem"
```yaml storage: type: filesystem filesystem: path: /data/local_backups ```Navigate to every storage page for a detailed example configuration file.
-
Apply the config file to PBM
pbm config --file pbm_config.yaml
To learn more about Percona Backup for MongoDB configuration, see Percona Backup for MongoDB configuration in a cluster (or non-sharded replica set).
Start pbm-agent :material-arrow-right:{.md-button}