Primary: Percona Backup for MongoDB (PBM)
PBM is the backup tool built into the Percona Operator. It supports on-demand and scheduled logical and physical backups and point-in-time recovery to an external object store (Amazon S3, Azure Blob Storage, Google Cloud Storage, or any S3-compatible store).
The chart with Percona Operator 1.23.0 ships PBM 2.15.0. Backups remain disabled by default. Configure them in your Helm values with
perconaServerMongoDB.backup, including enabled, storage, schedules, retention, and point-in-time recovery (PITR). Configure the database Kubernetes service account through perconaServerMongoDB.serviceAccount. The chart renders these settings into the Percona resources.
Keep backup settings in the values used for subsequent Helm upgrades. If you previously edited
spec.backup directly, carry those settings into perconaServerMongoDB.backup before applying the new chart. Do not rely on custom-resource edits as the source of configuration for future upgrades.
For an existing deployment on operator 1.20.1, first complete the stepwise upgrade to 1.23.
Follow the Percona Operator backup documentation for the authoritative reference:
-
Backups overview: https://docs.percona.com/percona-operator-for-mongodb/backups.html
-
Configure storage: https://docs.percona.com/percona-operator-for-mongodb/backups-storage.html
-
On-demand backups: https://docs.percona.com/percona-operator-for-mongodb/backups-ondemand.html
-
Scheduled backups: https://docs.percona.com/percona-operator-for-mongodb/backups-scheduled.html
Example: enable PBM and back up to Amazon S3
This worked example follows the Percona Operator storage guide. Replace
<release> with your SecurSpaces Helm release name and <namespace> with your SecurSpaces namespace. Run kubectl get psmdb -n <namespace> to confirm your cluster name — for SecurSpaces it is <release>-psmdb-db.
1. Create a Secret with your S3 credentials. Save as
backup-s3-secret.yaml (the values are base64-encoded automatically when you use stringData):
apiVersion: v1
kind: Secret
metadata:
name: sds-backup-s3
type: Opaque
stringData:
AWS_ACCESS_KEY_ID: "<your-access-key-id>"
AWS_SECRET_ACCESS_KEY: "<your-secret-access-key>"kubectl apply -f backup-s3-secret.yaml -n <namespace>
2. Enable backups and define the storage in your Helm values. Add the following to the values file used for your deployment. The storage entry references the Secret created above:
perconaServerMongoDB:
backup:
enabled: true
storages:
s3-primary:
type: s3
s3:
bucket: <your-backup-bucket>
region: <your-region> # for example, eu-central-1
prefix: sds/strong-network # optional sub-folder in the bucket
credentialsSecret: sds-backup-s3
Apply the values using your normal Helm upgrade command and the same chart version. For example:
helm upgrade <release> ./ninjahchart-<version>.tgz -n <namespace> -f <your-values.yaml>
Note On AWS EKS you can grant bucket access with an IAM role for the service account (IRSA) and omit
credentialsSecret. For Azure Blob or Google Cloud Storage, use the azure or gcs storage type instead of s3. For keyless GCS access, see GCS Workload Identity.
3. Take an on-demand backup. Create a
PerconaServerMongoDBBackup resource that references your cluster and storage. Save as sds-backup.yaml:
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDBBackup
metadata:
name: sds-backup-2026-07-02
namespace: <namespace>
spec:
clusterName: <release>-psmdb-db
storageName: s3-primary
type: logical # logical is the default; physical is also supportedkubectl apply -f sds-backup.yaml
4. Verify the backup completed. Track the backup resource until
STATUS is ready:
kubectl get psmdb-backup -n <namespace>NAME CLUSTER STORAGE DESTINATION TYPE STATUS AGE
sds-backup-2026-07-02 <release>-psmdb-db s3-primary s3://<bucket>/sds/strong-network/… logical ready 2m
5. (Recommended) Add a schedule and point-in-time recovery. For ongoing protection, add a backup task and enable PITR in the same
perconaServerMongoDB.backup section of your values file. Keep the storage definition from the previous step:
perconaServerMongoDB:
backup:
enabled: true
pitr:
enabled: true # continuous point-in-time recovery
tasks:
- name: daily-s3
enabled: true
schedule: "0 2 * * *" # every day at 02:00 (cron)
storageName: s3-primary
retention:
type: count
count: 7 # retain the 7 most recent scheduled backups
deleteFromStorage: true
Apply the updated values with your Helm upgrade command and confirm new backups appear on schedule. As a best practice, store backups in a different failure domain from the cluster — a separate cloud region or account — so that a cluster or region failure does not also destroy your backups.
Note Reapplying the same Helm values preserves the backup configuration. In GKE validation, a second Helm upgrade with unchanged values caused no restarts and backups continued.