[MDEV-18215] mariabackup does not report unknown command line options Created: 2019-01-11  Updated: 2023-09-26  Resolved: 2020-06-14

Status: Closed
Project: MariaDB Server
Component/s: Backup, mariabackup, Scripts & Clients
Affects Version/s: 10.1.37, 10.2.21, 10.3.12
Fix Version/s: 10.5.4, 10.4.14

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Vladislav Lesin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-22353 mariabackup does not complain about u... Closed
Problem/Incident
causes MDEV-22894 Mariabackup should not read [mariadb-... Closed
causes MDEV-23116 mariabackup doesn't recognize encrypt... Stalled
Relates
relates to MDEV-20552 Remove innobackupex mode from Mariaba... Stalled
relates to MDEV-22983 Mariabackup's --help option disappeared Closed
relates to MDEV-23696 mariabackup options processing code r... Open
relates to MDEV-32253 impossible to use --no-timestamp option Open
relates to MDEV-21298 mariabackup doesn't read from the [ma... Closed
relates to MDEV-21301 mariabackup doesn't read [mariadb-bac... Closed

 Description   

E.g. '--no-such-option raises neither an error nor a warning:

/usr/local/mysql-maria-10.1.34/bin/mariabackup --backup --no-such-option
190111 18:34:27 Connecting to MySQL server host: 127.0.0.1, user: root, password: not set, port: not set, socket: not set
Using server version 10.1.34-MariaDB
/usr/local/mysql-maria-10.1.34/bin/mariabackup based on MariaDB server 10.1.34-MariaDB Linux (x86_64) 
mariabackup: uses posix_fadvise().
mariabackup: cd to /usr/local/mysql-maria-10.1.34/var/
mariabackup: open files limit requested 0, set to 1024
mariabackup: using the following InnoDB configuration:
mariabackup:   innodb_data_home_dir = 
mariabackup:   innodb_data_file_path = ibdata1:12M:autoextend
mariabackup:   innodb_log_group_home_dir = ./
mariabackup:   innodb_log_files_in_group = 2
mariabackup:   innodb_log_file_size = 50331648
190111 18:34:27 >> log scanned up to (16343589175)
mariabackup: Generating a list of tablespaces
190111 18:34:27 [01] Copying ibdata1 to /home/hartmut/Downloads/xtrabackup_backupfiles/ibdata1
...

This is especially a problem when trying to use an option that was only added in a later version.



 Comments   
Comment by Geoff Montee (Inactive) [ 2019-01-11 ]

I added a note about this here: https://mariadb.com/kb/en/library/mariabackup-overview/

Comment by Ulrich Moser (Inactive) [ 2020-04-23 ]

Not only does mariabackup not complain about unknown options but shows unpredectable behaviour (see MDEV-22353)

Comment by Hartmut Holzgraefe [ 2020-04-23 ]

The behavior isn't really unpredictable, it is actually perfectly deterministic.

But I agree that this makes typos way too dangerous, and that this behavior is like running with scissors, or like juggling running chain saws ...

The problem is in the "everything that is not a mariabackup option by itself gets passed on to the embedded server instance" approach, where on that level the server option parsing code does not know about the mariabackup specific options. So in both option parsing steps we get to "i don't understand this, but probably the other option parser might, so i can't complain about not understanding this specific parameter" behavior.

So no easy fix here, but I'd not only consider this problem "major", but even "critical" at this point ...

Generated at Thu Feb 08 08:42:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.