MongoDB backup prerequisites¶
Before creating MongoDB backups, make sure to:
- Enable Backup Management from Configuration > PMM Settings > Advanced Settings and activate the Backup Management option. This adds the Backup option on the side menu.
- Prepare and create a storage location for your backups.
- For setups where PMM Server runs as a Docker container, enable backup features at container creation time by adding
-e ENABLE_BACKUP_MANAGEMENT=1to your
- 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.
- Check that Percona Backup for MongoDB (PBM) is installed and
pbm-agentis running on all MongoDB nodes in the replica set. PMM 2.32 and later require PBM 2.0.1 or newer.
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
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.
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