Skip to content

Make a logical backup

Before you start

  1. Install and set up Percona Backup for MongoDB
  2. Check that pbm agent is running with the pbm status command
  3. 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:

Procedure

  1. To make a snapshot-based backup, run the pbm backup command with the type external:

    $ pbm backup -t external 
    

    When 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.

  2. (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.

  3. At this stage, you need to copy the dataDir contents of each node in the <node-list> to the storage / make a snapshot using the technology of your choice.

  4. After the copy/snapshot is complete, run the following command to close the $backupCursor and finish the backup:

    $ pbm backup-finish <backup_name>
    

Next steps

List backups Make a restore

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.


Last update: November 1, 2024
Created: November 1, 2024