[MDEV-14964] mariabackup is creating the target-dir when does not exist but not it's parent dir if not exist Created: 2018-01-16  Updated: 2018-01-16  Resolved: 2018-01-16

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

Type: Bug Priority: Major
Reporter: Zdravelina Sokolovska (Inactive) Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

mariabackup is creating the target-dir when does not exist but not it's parent dir if not exist

it would be expected to create the parent dir(s) from option – target-dir

how to repeat
1. mariabackup -u root -p --backup --target-dir /var/mariadb/backup/ – fails
2. mariabackup -u root -p --backup --target-dir /var/backup – is accepted

mariabackup -u root -p --backup --target-dir /var/mariadb/backup/
180116 15:10:29 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set
Using server version 10.2.12-MariaDB
mariabackup based on MariaDB server 10.2.12-MariaDB Linux (x86_64)
mariabackup: uses posix_fadvise().
mariabackup: cd to /var/lib/mysql/
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 = ./
2018-01-16 15:10:29 140226581018752 [Note] InnoDB: Number of pools: 1
mariabackup: Error: cannot mkdir 2: /var/mariadb/backup/



 Comments   
Comment by Vladislav Vaintroub [ 2018-01-16 ]

mariabackup does not recursively create a backup directory. Neither its precursor xtrabackup has this functionality. This should be fine I guess , as parent directories can already be created by mkdir -p (or mkdir on Windows) with other means. Maybe we should document the behavior? not creating a directory and ending with an error has the advantage of catching typos passed to the mariabackup command.

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