Make a physical backup¶
Before you start¶
- Install and set up Percona Backup for MongoDB
- Check that
pbm agent
is running with thepbm status
command -
Check that all
pbm-agents
and 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 status
to check the version of pbm-agentspbm version
to check the version of PBM CLI.
Procedure¶
Version added: 1.7.0
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.
Next steps¶
List backups Make a restore Make a point-in-time recovery
Useful links¶
Created: April 11, 2025