From 62f60da2d617b9cb61be222d67f23d1b21056624 Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Tue, 11 Jun 2024 15:01:36 +0300 Subject: [PATCH 1/2] Adde troubleshooting cases --- docs/pmm.md | 3 +++ docs/troubleshoot/faq.md | 7 +++++++ docs/troubleshoot/pbm-pmm.md | 9 +++++++++ docs/usage/restore.md | 9 ++++++--- mkdocs-base.yml | 1 + 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 docs/troubleshoot/pbm-pmm.md diff --git a/docs/pmm.md b/docs/pmm.md index 22f8d9a1..0253a22d 100644 --- a/docs/pmm.md +++ b/docs/pmm.md @@ -7,5 +7,8 @@ Check PMM documentation for the following guides: * [How to configure PMM to monitor MongoDB :octicons-link-external-16:](https://docs.percona.com/percona-monitoring-and-management/setting-up/client/mongodb.html) * [Backup management for MongoDB in PMM :octicons-link-external-16:](https://docs.percona.com/percona-monitoring-and-management/get-started/backup/backup_mongo.html). +Having issues with backups? Check the [Troubleshoot backup management via Percona Monitoring and Management](troubleshoot/pbm-pmm.md) for help. + + diff --git a/docs/troubleshoot/faq.md b/docs/troubleshoot/faq.md index 771d267a..76568e2a 100644 --- a/docs/troubleshoot/faq.md +++ b/docs/troubleshoot/faq.md @@ -42,3 +42,10 @@ Yes. The preconditions for both Point-in-Time Recovery restore and regular resto You cannot install PBM on MacBook using the package manager. PBM packages are available and tested for Linux distributions only. However, you can run PBM on MacBook as a Docker container. See the [Run in Docker](../install/docker.md) guide for guidelines. +## Can I connect PBM to MongoDB with disabled authorization? + +While we **don’t recommend** disabling authorization for MongoDB due to security considerations, there might be scenarios (such as testing environments) where you need to connect PBM (Percona Backup Manager) to a MongoDB instance without authentication. Follow these steps to ensure a successful setup: + +1. If you’ve set the [`bindIP` :octicons-link-external-16:](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-net.bindIp) configuration parameter for your `mongod` or `mongos` processes, ensure that the `localhost` value is included in the list of allowed IP addresses. The `pbm-agent` process connects to its local MongoDB node using a standalone type of connection. +2. Make sure the MongoDB connection URI string for pbm-agents includes `localhost` as part of the host information. +3. In the MongoDB connection URI string for the PBM CLI, exclude the `authSource` parameter as it otherwise enforces authorization. diff --git a/docs/troubleshoot/pbm-pmm.md b/docs/troubleshoot/pbm-pmm.md new file mode 100644 index 00000000..389a3eca --- /dev/null +++ b/docs/troubleshoot/pbm-pmm.md @@ -0,0 +1,9 @@ +# Troubleshoot backup management via Percona Monitoring and Management + +If you are facing issues with physical backups and restores via PMM, follow these troubleshooting steps: + +1. Ensure that the user running the `pmm` process has sufficient permissions within PBM. You can find detailed instructions in the [PMM documentation :octicons-link-external-16:](https://docs.percona.com/percona-monitoring-and-management/setting-up/client/mongodb.html#create-pmm-account-and-set-permissions). +2. Make sure you have specified the user from step 1 in the MongoDB connection URI string for `pbm-agent` processes. +3. Confirm that the system user who runs the `pbm-agent` process (by default, `mongod`) has the read / write access to both the MongoDB dbpath and the backup storage location. +4. Examine the `systemd` restart policy for the user mentioned in step 4. Ensure it is not set to `always` or `on-success`. During physical restores, the database must not be automatically restarted as this is controlled by the `pbm-agent`. + diff --git a/docs/usage/restore.md b/docs/usage/restore.md index e18f591c..5c54b321 100644 --- a/docs/usage/restore.md +++ b/docs/usage/restore.md @@ -37,12 +37,15 @@ To restore a backup, use the [`pbm restore`](../reference/pbm-commands.md#pbm-re 2. Shut down all `mongos` nodes to stop clients from accessing the database while restore is in progress. This ensures that the final restored data doesn’t differ from the backed-up data. - 3. For PBM version 2.3.1 and earlier, manually disable point-in-time recovery if it is enabled. To learn more about point-in-time recovery, see [Point-in-time recovery](../features/point-in-time-recovery.md). + 3. Shut down all `pmm-agent` and other clients that can do the write operations to the database. This is required to ensure data consistency after the restore. + + 4. For PBM version 2.3.1 and earlier, manually disable point-in-time recovery if it is enabled. To learn more about point-in-time recovery, see [Point-in-time recovery](../features/point-in-time-recovery.md). === ":material-database-refresh-outline: Physical" 1. Shut down all `mongos` nodes as the database won't be available while the restore is in progress. - 2. Stop the arbiter nodes manually since there's no `pbm-agent` on these nodes to do that automatically. + 2. Shut down all `pmm-agent` and other clients that can do the write operations to the database. This is required to ensure data consistency after the restore. + 3. Stop the arbiter nodes manually since there's no `pbm-agent` on these nodes to do that automatically. === ":material-select-multiple: Selective" @@ -50,7 +53,7 @@ To restore a backup, use the [`pbm restore`](../reference/pbm-commands.md#pbm-re === ":simple-databricks: Incremental" - Before you start, shut down all `mongos` nodes as the database won’t be available while the restore is in progress. + Before you start, shut down all `mongos` nodes, `pmm-agent` processes and clients that can do writes to the database as it won’t be available while the restore is in progress. ## Restore a database diff --git a/mkdocs-base.yml b/mkdocs-base.yml index f31af1b8..accb4114 100644 --- a/mkdocs-base.yml +++ b/mkdocs-base.yml @@ -200,6 +200,7 @@ nav: - Overview: troubleshoot/index.md - 'Diagnose PBM': 'troubleshoot/troubleshooting.md' - 'Check status': 'troubleshoot/status.md' + - 'Troubleshoot backup management via PMM': 'troubleshoot/pbm-pmm.md' - troubleshoot/faq.md - Release notes: - "Release notes index": "release-notes.md" From 9e61efe2a8f2c8f0daf583a85911f831cfa75866 Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Tue, 11 Jun 2024 15:23:53 +0300 Subject: [PATCH 2/2] Added troubleshooting cases --- docs/troubleshoot/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/troubleshoot/index.md b/docs/troubleshoot/index.md index ef30c4c1..c40f2999 100644 --- a/docs/troubleshoot/index.md +++ b/docs/troubleshoot/index.md @@ -4,5 +4,6 @@ If you encounter issues when working with Percona Backup for MongoDB, consult th - [Diagnose PBM](troubleshooting.md) - [Check PBM status](status.md) +- [Troubleshoot backup management via Percona Monitoring and Management](pbm-pmm.md) - [FAQ](faq.md)