Make a physical backup¶
Before you start¶
Before taking a backup, verify PBM is installed and running.
- Install and set up Percona Backup for MongoDB
- Check that
pbm agentis running with thepbm statuscommand -
Check that all
pbm-agentsand PBM CLI have the same version. Otherwise we cannot guarantee successful backups and data consistency in them.To check the version, run the following commands:
pbm statusto check the version of pbm-agentspbm versionto check the version of PBM CLI.
Procedure¶
During a physical backup, Percona Backup for MongoDB copies the contents of the dbpath directory (data and metadata files, indexes, journal and logs) from every shard and config server replica set to the backup storage.
To start a backup, run the following command:
pbm backup --type=physical
Warning
During the period the backup cursor is open, database checkpoints can be created, but no checkpoints can be deleted. This may result in significant file growth.
Starting with 2.4.0, PBM doesn’t stop point-in-time recovery oplog slicing, if it’s enabled, but runs it in parallel. This ensures point-in-time recovery to any timestamp if it takes too long (e.g. hours) to make a backup snapshot.
Parallel file copy for filesystem storage¶
For physical backups stored on a filesystem, you can control how many files PBM processes in parallel during the backup operation. Increasing parallelism can improve performance by allowing multiple files to be copied simultaneously.
To copy files in parallel, set backup.numParallelFiles in the PBM configuration:
backup:
numParallelFiles: 4
Or pass --num-parallel-files:
pbm backup --type=physical --num-parallel-files=4
Note
Parallel file copy applies to physical backups and incremental physical backups stored on filesystem only. It has no effect on logical backups or on any S3-compatible storage, regardless of backup type.
Next steps¶
List backups Make a restore Make a point-in-time recovery
Useful links¶
Created: June 11, 2026