Make an snapshot-based backup¶
Before you start¶
- 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¶
-
To make a snapshot-based backup, run the
pbm backupcommand with the typeexternal:$ pbm backup -t externalWhen executing the command, PBM does the following:
- opens the
$backupCursor - prepares the database for file copy
- stores the backup metadata on the storage and adds it to the files to copy
- prints the prompt similar to the following:
Ready to copy data from: <node-list>You also see the backup name.
- opens the
-
(Optional) You can check the backup progress with the
pbm describe-backup. The command output provides the backup state and what nodes are running backup. -
At this stage, you need to copy the
dataDircontents of each node in the<node-list>to the storage / make a snapshot using the technology of your choice. -
After the copy/snapshot is complete, run the following command to close the
$backupCursorand finish the backup:$ pbm backup-finish <backup_name>
Next steps¶
Useful links¶
Created: October 23, 2025