Skip to content

MongoDB backup prerequisites

Before creating MongoDB backups, make sure to:

  1. Enable Backup Management from Configuration > PMM Settings > Advanced Settings and activate the Backup Management option. This adds the Backup option on the side menu.
  2. Prepare and create a storage location for your backups.
  3. For setups where PMM Server runs as a Docker container, enable backup features at container creation time by adding -e ENABLE_BACKUP_MANAGEMENT=1 to your docker run command.
  4. Check that PMM Client is installed. For creating logical backups, the PMM client should run on at least one node of the replica set. Make sure this is the one that will be used for backup and restore jobs. For physical backups, make sure PMM client runs on all nodes instead.
  5. Check that Percona Backup for MongoDB (PBM) is installed and pbm-agent is running on all MongoDB nodes in the replica set. PMM 2.32 and later require PBM 2.0.1 or newer.
  6. Check that your MongoDB Services are managed as clusters in PMM. Go to PMM Inventory > Services page and make sure that all the services in the table specify a cluster name in the Other Details column. Services that do not specify a cluster name should be removed and re-added using command like the following:

    pmm-admin add mongodb \
       --username=pmm_mongodb --password=password \
       query-source=profiler --cluster=mycluster

  7. Check that MongoDB nodes are members of replica set.

  8. Check that you set the required permissions for creating and restoring MongoDB backups.
  9. Verify the MongoDB supported configurations and limitations.

Important

Never use pbm in manual mode! PMM already takes care of the pbm configuration and any manual intervention can break the state.


Last update: 2023-03-30