From f362f0591bd60c3d8b51ef5a16407a5992cf4295 Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:48:03 -0300 Subject: [PATCH 1/9] Revise uninstallation guide for Percona Backup for MongoDB Updated the uninstallation instructions for Percona Backup for MongoDB to clarify steps and improve readability. --- docs/manage/uninstalling.md | 83 ++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 10 deletions(-) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index ad06e807..a9eec772 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -1,19 +1,82 @@ # Uninstall Percona Backup for MongoDB -To uninstall Percona Backup for MongoDB, do the following steps: +Follow these steps to remove Percona Backup for MongoDB (PBM) from your environment. +## 1. Confirm no backups are running -1. Check that no backups are currently in progress in the output of [`pbm list`](../reference/pbm-commands.md#pbm-list). +Check that no backup or restore is currently in progress: -2. Before the next 2 steps, make sure you know where the remote backup storage -is, so you can delete backups made by Percona Backup for MongoDB. If it is an S3-compatible object storage, you will need to use another tool such as Amazon AWS’s “aws s3”, Minio’s `mc`, the web AWS Management Console, etc. to do that once Percona Backup for MongoDB is uninstalled. Don’t forget to note the connection credentials before they are deleted too. +```bash +pbm list +``` -3. Uninstall the **pbm-agent** and `pbm` executables. If you installed using a -package manager, see [Install Percona Backup for MongoDB](../installation.md) for relevant package names and commands for your OS distribution. +If an operation is still running, wait for it to finish (or [cancel it](../reference/pbm-commands.md#pbm-list)) before continuing. Removing PBM while an operation is active can leave your backup storage or control collections in an inconsistent state. -4. Drop the PBM control collections. +## 2. Disable PITR -5. Drop the PBM database user. If this is a cluster, the `dropUser` command will -need to be run on each shard as well as in the config server replica set. +If point in time recovery is still enabled, PBM will just start writing new oplog slices again right after cleanup -6. (Optional) Delete the backups from the remote backup storage. +```bash +pbm config --set pitr.enabled=false +``` + +## 3. (Optional) Delete backups from remote storage + +If you no longer need the backups PBM created, delete them from the remote storage using the `pbm cleanup` command. For example: + +```bash +pbm cleanup --older-than=0d --yes +``` + +!!! info + + 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. + +## 4. Uninstall the pbm-agent and pbm executables + +Run these commands on every node where PBM is installed. + +=== ":material-debian: On Debian and Ubuntu" + +```bash +sudo apt remove percona-backup-mongodb +``` + +=== ":material-redhat: On RHEL and derivatives" + +```bash +sudo yum remove percona-backup-mongodb +``` + +If 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](../installation.md) for details on how PBM was set up on your system. + +## 5. Drop the PBM control collections + +PBM stores its state in a set of collections in the `admin` database — on the config server replica set for a sharded cluster, or on the replica set itself otherwise. Connect with `mongosh` and drop them: + +```javascript +use admin +db.pbmBackups.drop() +db.pbmAgents.drop() +db.pbmConfig.drop() +db.pbmCmd.drop() +db.pbmLock.drop() +db.pbmLockOp.drop() +db.pbmLog.drop() +db.pbmOpLog.drop() +db.pbmPITRChunks.drop() +db.pbmPITRState.drop() +db.pbmRestores.drop() +db.pbmStatus.drop() +``` + +## 6. Drop the PBM database user + +Drop the MongoDB user PBM used to authenticate (commonly named `pbm` or similar — check what you used when [setting up authentication](../install/configure-authentication.md)): + +```javascript +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. From 03f72074b8144dbc70af6c2543bbdb81ab35439b Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:26:36 -0300 Subject: [PATCH 2/9] Revise uninstall instructions for Percona Backup Updated uninstalling instructions for clarity and corrected warning messages. --- docs/manage/uninstalling.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index a9eec772..4df94812 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -2,7 +2,7 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environment. -## 1. Confirm no backups are running +1. Confirm no backups are running Check that no backup or restore is currently in progress: @@ -10,9 +10,9 @@ Check that no backup or restore is currently in progress: pbm list ``` -If an operation is still running, wait for it to finish (or [cancel it](../reference/pbm-commands.md#pbm-list)) before continuing. Removing PBM while an operation is active can leave your backup storage or control collections in an inconsistent state. +If an operation is still running, wait for it to finish (or [cancel it](../reference/pbm-commands.md#pbm-cancel-backup)) before continuing. Removing PBM while an operation is active can leave your backup storage or control collections in an inconsistent state. -## 2. Disable PITR +2. Disable PITR If point in time recovery is still enabled, PBM will just start writing new oplog slices again right after cleanup @@ -20,7 +20,7 @@ If point in time recovery is still enabled, PBM will just start writing new oplo pbm config --set pitr.enabled=false ``` -## 3. (Optional) Delete backups from remote storage +3. (Optional) Delete backups from remote storage If you no longer need the backups PBM created, delete them from the remote storage using the `pbm cleanup` command. For example: @@ -28,29 +28,29 @@ If you no longer need the backups PBM created, delete them from the remote stora pbm cleanup --older-than=0d --yes ``` -!!! info +!!! warn 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. -## 4. Uninstall the pbm-agent and pbm executables +4. Uninstall the pbm-agent and pbm executables Run these commands on every node where PBM is installed. === ":material-debian: On Debian and Ubuntu" -```bash -sudo apt remove percona-backup-mongodb -``` + ```bash + sudo apt remove percona-backup-mongodb + ``` === ":material-redhat: On RHEL and derivatives" -```bash -sudo yum remove percona-backup-mongodb -``` + ```bash + sudo yum remove percona-backup-mongodb + ``` If 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](../installation.md) for details on how PBM was set up on your system. -## 5. Drop the PBM control collections +5. Drop the PBM control collections PBM stores its state in a set of collections in the `admin` database — on the config server replica set for a sharded cluster, or on the replica set itself otherwise. Connect with `mongosh` and drop them: From 7ce9d5eda5945b21faaf9daca591761d12875828 Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:30:58 -0300 Subject: [PATCH 3/9] Revise uninstall instructions for PBM Updated instructions for uninstalling Percona Backup for MongoDB, including clarifications and formatting improvements. --- docs/manage/uninstalling.md | 114 ++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index 4df94812..a15d917b 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -4,79 +4,79 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environm 1. Confirm no backups are running -Check that no backup or restore is currently in progress: + Check that no backup or restore is currently in progress: -```bash -pbm list -``` + ```bash + pbm list + ``` -If an operation is still running, wait for it to finish (or [cancel it](../reference/pbm-commands.md#pbm-cancel-backup)) before continuing. Removing PBM while an operation is active can leave your backup storage or control collections in an inconsistent state. + If an operation is still running, wait for it to finish (or [cancel it](../reference/pbm-commands.md#pbm-cancel-backup)) before continuing. Removing PBM while an operation is active can leave your backup storage or control collections in an inconsistent state. 2. Disable PITR -If point in time recovery is still enabled, PBM will just start writing new oplog slices again right after cleanup - -```bash -pbm config --set pitr.enabled=false -``` - -3. (Optional) Delete backups from remote storage - -If you no longer need the backups PBM created, delete them from the remote storage using the `pbm cleanup` command. For example: - -```bash -pbm cleanup --older-than=0d --yes -``` - -!!! warn - - 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. - -4. Uninstall the pbm-agent and pbm executables - -Run these commands on every node where PBM is installed. - -=== ":material-debian: On Debian and Ubuntu" + If point in time recovery is still enabled, PBM will just start writing new oplog slices again right after cleanup ```bash - sudo apt remove percona-backup-mongodb + pbm config --set pitr.enabled=false ``` -=== ":material-redhat: On RHEL and derivatives" +3. (Optional) Delete backups from remote storage + If you no longer need the backups PBM created, delete them from the remote storage using the `pbm cleanup` command. For example: + ```bash - sudo yum remove percona-backup-mongodb + pbm cleanup --older-than=0d --yes ``` + + !!! warn + + 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. + +4. Uninstall the pbm-agent and pbm executables -If 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](../installation.md) for details on how PBM was set up on your system. + Run these commands on every node where PBM is installed. + + === ":material-debian: On Debian and Ubuntu" + + ```bash + sudo apt remove percona-backup-mongodb + ``` + + === ":material-redhat: On RHEL and derivatives" + + ```bash + sudo yum remove percona-backup-mongodb + ``` + + If 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](../installation.md) for details on how PBM was set up on your system. 5. Drop the PBM control collections -PBM stores its state in a set of collections in the `admin` database — on the config server replica set for a sharded cluster, or on the replica set itself otherwise. Connect with `mongosh` and drop them: - -```javascript -use admin -db.pbmBackups.drop() -db.pbmAgents.drop() -db.pbmConfig.drop() -db.pbmCmd.drop() -db.pbmLock.drop() -db.pbmLockOp.drop() -db.pbmLog.drop() -db.pbmOpLog.drop() -db.pbmPITRChunks.drop() -db.pbmPITRState.drop() -db.pbmRestores.drop() -db.pbmStatus.drop() -``` + PBM stores its state in a set of collections in the `admin` database — on the config server replica set for a sharded cluster, or on the replica set itself otherwise. Connect with `mongosh` and drop them: + + ```javascript + use admin + db.pbmBackups.drop() + db.pbmAgents.drop() + db.pbmConfig.drop() + db.pbmCmd.drop() + db.pbmLock.drop() + db.pbmLockOp.drop() + db.pbmLog.drop() + db.pbmOpLog.drop() + db.pbmPITRChunks.drop() + db.pbmPITRState.drop() + db.pbmRestores.drop() + db.pbmStatus.drop() + ``` ## 6. Drop the PBM database user -Drop the MongoDB user PBM used to authenticate (commonly named `pbm` or similar — check what you used when [setting up authentication](../install/configure-authentication.md)): - -```javascript -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. + Drop the MongoDB user PBM used to authenticate (commonly named `pbm` or similar — check what you used when [setting up authentication](../install/configure-authentication.md)): + + ```javascript + 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. From 5e0552f29039fdd44312c4567d2eaae4d7f4a991 Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:33:38 -0300 Subject: [PATCH 4/9] add power number --- docs/manage/uninstalling.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index a15d917b..55873e27 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -2,6 +2,8 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environment. +## Procedure {.power-number} + 1. Confirm no backups are running Check that no backup or restore is currently in progress: From 1234a6e44925c283edf0109562c243525d7adb31 Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:34:10 -0300 Subject: [PATCH 5/9] Fix formatting for PBM database user section --- docs/manage/uninstalling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index 55873e27..e3f52aa6 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -72,7 +72,7 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environm db.pbmStatus.drop() ``` -## 6. Drop the PBM database user +6. Drop the PBM database user Drop the MongoDB user PBM used to authenticate (commonly named `pbm` or similar — check what you used when [setting up authentication](../install/configure-authentication.md)): From 3a736176162efd8b480e97351df0b8968156f4f8 Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:51:34 -0300 Subject: [PATCH 6/9] Update 'PITR' to 'point in time recovery' in uninstalling.md --- docs/manage/uninstalling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index e3f52aa6..c272bcda 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -14,7 +14,7 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environm If an operation is still running, wait for it to finish (or [cancel it](../reference/pbm-commands.md#pbm-cancel-backup)) before continuing. Removing PBM while an operation is active can leave your backup storage or control collections in an inconsistent state. -2. Disable PITR +2. 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 From 0e27abd75e4a85fcceff96ef283ccde742c7ed91 Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Tue, 14 Jul 2026 07:36:30 -0300 Subject: [PATCH 7/9] Refactor PBM collection drop commands in uninstalling.md Rearranged drop commands for PBM collections and removed some redundant drops. --- docs/manage/uninstalling.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index c272bcda..2a90cf52 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -58,18 +58,17 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environm ```javascript use admin - db.pbmBackups.drop() db.pbmAgents.drop() - db.pbmConfig.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() ``` 6. Drop the PBM database user From 74efab240c930c15746d2bb1fb2b0b9fb5f5163e Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Thu, 16 Jul 2026 09:06:33 -0300 Subject: [PATCH 8/9] add missing collections --- docs/manage/uninstalling.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index 2a90cf52..b8c84bf3 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -68,7 +68,9 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environm db.pbmOpLog.drop() db.pbmPITR.drop() db.pbmPITRChunks.drop() + db.pbmPITRState.drop() db.pbmRestores.drop() + db.pbmStatus.drop() ``` 6. Drop the PBM database user From ad818a3f039854adb38f51caafc4c3fa5148bd4a Mon Sep 17 00:00:00 2001 From: Ivan Groenewold <9805809+igroene@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:52:35 -0300 Subject: [PATCH 9/9] Update docs/manage/uninstalling.md Co-authored-by: Anastasia Alexandrova --- docs/manage/uninstalling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manage/uninstalling.md b/docs/manage/uninstalling.md index b8c84bf3..cfbd2b40 100644 --- a/docs/manage/uninstalling.md +++ b/docs/manage/uninstalling.md @@ -30,7 +30,7 @@ Follow these steps to remove Percona Backup for MongoDB (PBM) from your environm pbm cleanup --older-than=0d --yes ``` - !!! warn + !!! warning 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.