MongoDB backup prerequisites¶
PBM version compatibility
PMM requires Percona Backup for MongoDB (PBM) 2.0.1 or later. Check the PBM compatibility matrix to select a PBM version that supports your MongoDB or Percona Server for MongoDB version.
Before creating MongoDB backups, make sure to:
- Check that Backup Management is enabled and the Backup option is available on the side menu. If Backup Management has been disabled on your instance, go to Configuration > Settings > Advanced Settings, re-enable Backup Management then click Apply changes.
- Prepare and create a storage location for your backups.
- Check that PMM Client is installed and running on all MongoDB nodes in the cluster.
-
Check that Percona Backup for MongoDB (PBM) is installed and
pbm-agentis running on all MongoDB nodes in the replica set. Make sure to configure the MongoDB connection URI for pbm-agent on all nodes.Let PMM manage PBM
PMM configures PBM for you. Run
pbmcommands yourself only for tasks that PMM can’t do, such as restoring a sharded cluster backup. Changing the PBM configuration manually can break PMM backups. -
Check that installed mongod binary is added to PATH variable of the user under which PMM client is running, and that mongod is controlled as a service by systemctl. PMM only works with a single mongod installed on a node.
-
Check that your MongoDB Services are managed as clusters in PMM. Go to Inventory > Services, turn on Organize by Clusters, and make sure that none of your MongoDB services appear under Non-clustered services. Services that do not specify a cluster name should be removed and re-added using commands like the following:
pmm-admin add mongodb \ --username=pmm_mongodb --password=password \ query-source=profiler --cluster=mycluster -
Check that MongoDB nodes are members of replica set.
- Check that you set the required permissions for creating and restoring MongoDB backups.
- Verify the MongoDB supported configurations and limitations.