From f56fdab7a9b10309b464eb85fe94d4a75b1a4e93 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 25 Mar 2023 17:08:17 -0700 Subject: [PATCH] Add troubleshooting documentation on PostgreSQL/MySQL authentication errors. --- docs/how-to/backup-your-databases.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/how-to/backup-your-databases.md b/docs/how-to/backup-your-databases.md index 3f819170..af60253c 100644 --- a/docs/how-to/backup-your-databases.md +++ b/docs/how-to/backup-your-databases.md @@ -380,6 +380,23 @@ dumps with any database system. ## Troubleshooting +### PostgreSQL/MySQL authentication errors + +With PostgreSQL and MySQL/MariaDB, if you're getting authentication errors +when borgmatic tries to connect to your database, a natural reaction is to +increase your borgmatic verbosity with `--verbosity 2` and go looking in the +logs. You'll notice however that your database password does not show up in +the logs. This is likely not the cause of the authentication problem unless +you mistyped your password, however; borgmatic passes your password to the +database via an environment variable that does not appear in the logs. + +The cause of an authentication error is often on the database sideā€”in the +configuration of which users are allowed to connect and how they are +authenticated. For instance, with PostgreSQL, check your +[pg_hba.conf](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html) +file for that configuration. + + ### MySQL table lock errors If you encounter table lock errors during a database dump with MySQL/MariaDB,