[MDEV-12813] mariabackup does not complain on bad backup-dir Created: 2017-05-16  Updated: 2017-05-16  Resolved: 2017-05-16

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.1.23
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: Vladislav Vaintroub
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Linux Ubuntu 14.04



 Description   

When a bad --backup-dir location is choosen mariabackup does not complain but just falls back to default $HOME/xtrabackup_backupfiles

This is IMHO a bad behaviour for Enterprise Class systems and against the fail-fast approach.

shell> mariabackup --user=root --backup-dir=/tmp/backup/full --backup
Using server version 10.1.23-MariaDB
mariabackup based on MariaDB server 10.1.23-MariaDB Linux (x86_64)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /home/mysql/data/mariadb-101/
xtrabackup: open files limit requested 0, set to 16384
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 16777216
170516 14:47:04 >> log scanned up to (5297301595)
xtrabackup: Generating a list of tablespaces
170516 14:47:04 [01] Copying ./ibdata1 to /home/mysql/xtrabackup_backupfiles/ibdata1
...
170516 14:48:40 Backup created in directory '/home/mysql/xtrabackup_backupfiles/'
MySQL binlog position: filename 'laptop4_mariadb-10.000047', position '5908951', GTID of the last change '0-3306-3180130'
170516 14:48:40 [00] Writing backup-my.cnf
170516 14:48:40 [00] ...done
170516 14:48:40 [00] Writing xtrabackup_info
170516 14:48:40 [00] ...done
xtrabackup: Transaction log of lsn (5292811958) to (5300480729) was copied.
170516 14:48:42 completed OK!



 Comments   
Comment by Vladislav Vaintroub [ 2017-05-16 ]

There is no --backup-dir parameter. It is called --target-dir

Comment by Oli Sennhauser [ 2017-05-16 ]

<shinguz> wlad, sorry I do not agree MDEV 12813
<shinguz> wlad, this is a bug in getopts! If I enter an non existing option an application has to complain and abort. not to silently continue working...
<shinguz> wlad, this is very very bad behaviour

Comment by Vladislav Vaintroub [ 2017-05-16 ]

well, this is Percona xtrabackup behavior, https://bugs.launchpad.net/percona-xtrabackup/+bug/1645533. xtrabackup reads
[mysqld] section of my.cnf, but cannot meaningfully handle every parameter that mysqld understands.

That behavior is since the inception of xtrabackup/innobackupex, 2009. The behavior should be very well known by now.
But I do not understand "disagree". "bad backup-dir" (as in bug report) implies valid parameter name and bad value. Not "bad parameter name"

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