Bug #64903 Ordering of command line options needed with--defaults-file
Submitted: 8 Apr 2012 0:30 Modified: 9 Apr 2012 14:58
Reporter: Ronald Bradford Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:3.7.0 OS:Linux (Ubuntu 11.10 64bit)
Assigned to: CPU Architecture:Any

[8 Apr 2012 0:30] Ronald Bradford
When running a copy-back, the --defaults-file option fails if not specified prior to other options.

How to repeat:
$ ls -l /etc/mysql/my.cnf
-rw-r--r-- 1 root root 3565 2012-04-03 04:32 /etc/mysql/my.cnf

$ /opt/meb/bin/mysqlbackup --backup-dir=/mysql/backup/meb/first --defaults-file=/etc/mysql/my.cnf copy-back
MySQL Enterprise Backup version 3.7.0 [2011/12/19] 

mysqlbackup: unknown variable 'defaults-file=/etc/mysql/my.cnf'

$ /opt/meb/bin/mysqlbackup --defaults-file=/etc/mysql/my.cnf --backup-dir=/mysql/backup/meb/first copy-back
MySQL Enterprise Backup version 3.7.0 [2011/12/19] 
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All Rights Reserved.

Error: Server innodb_log_files_in_group is missing or invalid
 mysqlbackup: ERROR: Server repository configuration problem found.

Suggested fix:
Either document restriction of enable options in any order.
[8 Apr 2012 9:12] Valeriy Kravchuk
mysqlbackup --help --verbose clearly says:

"The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read."

Please, check. As far as I remember this is the same for all mysql programs. So, where is the bug here?
[9 Apr 2012 14:57] Ronald Bradford
You are right.  I had not seen this in the online documentation however when I re-read it does clearly state "When present, they must be specified ahead of any other mysqlbackup options."


I would say however, that just because it must be specified before other options, the fact the error message states the option is invalid is a little misleading to the untrained eye.
[9 Apr 2012 14:58] Ronald Bradford
[2 Oct 2014 16:26] I88.CA IT
This bug applies to mysqlbackup version 3.11. But it is not critical. Just move the option to the first. commented by http://it.i88.ca