Writing to log file fails if output directory does not exist

Bug #1269464 reported by Scott Gamble
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Data Dumper
Triaged
Low
Max Bubenick

Bug Description

This may fall under the category of just don't do that but I thought I would report it just in case as it caught me by surprise.
Obvious easy work around for me is to create the directory ahead of time or write the log to a directory that already exists.

If the output directory does not exist when mydumper is executed it is created. However I was trying to write the log to the same directory as the backup was in and that failed immediately.

ls -l /home/mysql/backup_test
ls: cannot access /home/mysql/backup_test: No such file or directory

mydumper -o /home/mysql/backup_test -u xxxx -p ppppp -L /home/mysql/backup_test/backup.log
** (mydumper:11322): CRITICAL **:: Could not open log file '/home/mysql/backup_test/backup.log' for writing: 2

Remove the -L (path) and it works perfectly. The log is just written ahead of the directory which again may be something not worth fixing since there is an obvious and easy work around. The only reason I was trying to do that is we are going to date/timestamp the directory name and I was thinking of putting the log output for that backup in the same directory and since mydumper creates the output directory I figured it would work.

Changed in mydumper:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Max Bubenick (max-bubenick)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.