Looking at the fix for bug 1511451, I see that both xtrabackup and innobackupex fail with error if --defaults-file isn't first argument on the command line.
Here is the test case for reference
run_cmd_expect_failure ${IB_BIN} \ --datadir=$topdir/data \ --defaults-file=$MYSQLD_VARDIR/my.cnf \ $topdir/backup
run_cmd_expect_failure ${XB_BIN} \ --datadir=$topdir/data \ --defaults-file=$MYSQLD_VARDIR/my.cnf \ --backup \ --target-dir=$topdir/backup
run_cmd_expect_failure ${IB_BIN} \ --datadir=$topdir/data \ --defaults-extra-file=$MYSQLD_VARDIR/my.cnf \ $topdir/backup
run_cmd_expect_failure ${XB_BIN} \ --datadir=$topdir/data \ --defaults-extra-file=$MYSQLD_VARDIR/my.cnf \ --backup \ --target-dir=$topdir/backup
if [ `grep -c 'must be specified first' $OUTFILE` != '4' ] ; then die 'Error message mush be repeated 4 times' fi
Looking at the fix for bug 1511451, I see that both xtrabackup and innobackupex fail with error if --defaults-file isn't first argument on the command line.
Here is the test case for reference
run_cmd_ expect_ failure ${IB_BIN} \ $topdir/ data \ file=$MYSQLD_ VARDIR/ my.cnf \
--datadir=
--defaults-
$topdir/backup
run_cmd_ expect_ failure ${XB_BIN} \ $topdir/ data \ file=$MYSQLD_ VARDIR/ my.cnf \ dir=$topdir/ backup
--datadir=
--defaults-
--backup \
--target-
run_cmd_ expect_ failure ${IB_BIN} \ $topdir/ data \ extra-file= $MYSQLD_ VARDIR/ my.cnf \
--datadir=
--defaults-
$topdir/backup
run_cmd_ expect_ failure ${XB_BIN} \ $topdir/ data \ extra-file= $MYSQLD_ VARDIR/ my.cnf \ dir=$topdir/ backup
--datadir=
--defaults-
--backup \
--target-
if [ `grep -c 'must be specified first' $OUTFILE` != '4' ] ; then
die 'Error message mush be repeated 4 times'
fi