Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
23.08.11, 24.02.7, 25.01.4
-
None
-
MXS-SPRINT-246
Description
If the user who takes the backup does not have the correct permissions on the database server, the backup will fail but it does not indicate this being a permission issue in any way. There is one message about output from the command on the info level:
2025-07-11 14:09:57 notice : [mariadbmon] Backup transferred to SRV
|
2025-07-11 14:09:57 info : [mariadbmon] Backup send error output from SRV: [00] 2025-07-11 14:09:54 Connecting to MariaDB server host: localhost, user: foobar, password: set, port: 3306, socket: /var/run/mysqld/mysqld.sock\n[00] 2025-07-11 14:09:54 Failed to connect to MariaDB server: Access denied for user 'foobar'@'localhost' (using password: YES).\n
|
2025-07-11 14:09:57 error : [mariadbmon] Directory '/var/lib/mysql' on SRV does not contain file 'backup-my.cnf'. Transfer must have failed.
|
Checking the error output for Access denied and logging the output as a warning/error would help resolve these sorts of errors a lot quicker.
Comments:
This situation is improved in MaxScale 25.10. If, for example, the monitor user cannot access the server locally, MaxScale log reads:
2025-10-23 12:04:50 notice : [mariadbmon] Backup transferred to server4.
2025-10-23 12:04:50 error : [mariadbmon] Backup send failure on server2. Error 1. Additional details follow.
2025-10-23 12:04:50 error : [mariadbmon] mariabackup: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-backup' instead
2025-10-23 12:04:50 error : [mariadbmon] [00] 2025-10-23 12:04:48 Connecting to MariaDB server host: localhost, user: rebuild_user, password: set, port: not set, socket: not set
2025-10-23 12:04:50 error : [mariadbmon] [00] 2025-10-23 12:04:48 Failed to connect to MariaDB server: Access denied for user 'rebuild_user'@'localhost'.
2025-10-23 12:04:50 error : [mariadbmon] Directory '/var/lib/mysql' on server4 does not contain file 'backup-my.cnf'. Transfer must have failed.
Also, the "fetch-cmd-status"-command shows all available logs from Mariabackup:
maxctrl call command mariadbmon fetch-cmd-status monitor=MyMonitor
.
.
.
{
"errors": [
{
"detail": "Backup send failure on server2. Error 1.",
"meta": {
"errors": [
"mariabackup: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-backup' instead",
"[00] 2025-10-23 14:00:35 Connecting to MariaDB server host: localhost, user: rebuild_user, password: set, port: not set, socket: not set",
"[00] 2025-10-23 14:00:35 Using server version 11.4.8-MariaDB-log",