Uninstall Percona Backup for MongoDB¶
Follow these steps to remove Percona Backup for MongoDB (PBM) from your environment.
Procedure¶
-
Confirm no backups are running
Check that no backup or restore is currently in progress:
pbm listIf an operation is still running, wait for it to finish (or cancel it) before continuing. Removing PBM while an operation is active can leave your backup storage or control collections in an inconsistent state.
-
Disable point in time recovery
If point in time recovery is still enabled, PBM will just start writing new oplog slices again right after cleanup
pbm config --set pitr.enabled=false -
(Optional) Delete backups from remote storage
If you no longer need the backups PBM created, delete them from the remote storage using the
pbm cleanupcommand. For example:pbm cleanup --older-than=0d --yesWarn
If you’re using PBM’s multi-storage feature, you’ll need to repeat the cleanup with –profile
for each storage profile — pbm cleanup only targets the currently active one by default. -
Uninstall the pbm-agent and pbm executables
Run these commands on every node where PBM is installed.
sudo apt remove percona-backup-mongodbsudo yum remove percona-backup-mongodbIf you installed PBM a different way (tarball, source build, Docker), remove the binaries and any systemd service/config files manually instead. See Install Percona Backup for MongoDB for details on how PBM was set up on your system.
-
Drop the PBM control collections
PBM stores its state in a set of collections in the
admindatabase — on the config server replica set for a sharded cluster, or on the replica set itself otherwise. Connect withmongoshand drop them:use admin db.pbmAgents.drop() db.pbmBackups.drop() db.pbmCmd.drop() db.pbmConfig.drop() db.pbmLock.drop() db.pbmLockOp.drop() db.pbmLog.drop() db.pbmOpLog.drop() db.pbmPITR.drop() db.pbmPITRChunks.drop() db.pbmPITRState.drop() db.pbmRestores.drop() db.pbmStatus.drop() -
Drop the PBM database user
Drop the MongoDB user PBM used to authenticate (commonly named
pbmor similar — check what you used when setting up authentication):use admin db.dropUser("pbm")In a sharded cluster, run this same command on each shard’s primary as well as on the config server replica set — dropping the user in one place doesn’t remove it from the others.
Created: July 16, 2026