Bug #59394 ibbackup can't handle different absolute paths in innodb_data_file_path
Submitted: 10 Jan 2011 13:39 Modified: 20 Apr 2011 11:34
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:3.5.1 OS:Any
Assigned to: Ingo Strüwing CPU Architecture:Any

[10 Jan 2011 13:39] Shane Bester
Description:
mysqld/innodb can handle multiple absolute paths in innodb_data_file_path which means that the innodb_data_home_dir can be left blank.  ibbackup still requires innodb_data_home_dir to be set, or else an error happens if it's blank:

ibbackup: Error: '': The system cannot find the path specified..
ibbackup: Error:: Failed to check directories.

if you leave it out totally (and still have datadir):

ibbackup: my.cnf file i:/tmp/my.txt does not contain innodb_data_home_dir.
ibbackup: You have to specify it explicitly in my.cnf if you use ibbackup.

How to repeat:
an example my.ini for mysqld:

[mysqld]
datadir = /mysql/data
innodb_data_home_dir = 
innodb_data_file_path = /mysql/data/ibdata1:10M;/mysql/data2/ibdata02:10M
innodb_log_group_home_dir = /mysql/data
innodb_log_files_in_group=2
innodb_log_file_size=5M

an example backup.ini for ibbackup:

[mysqld]
datadir = /bck/data
innodb_data_home_dir = #what to set here to make it work ???
innodb_data_file_path = /bck/data/ibdata1:10M;/mysql/data2/ibdata02:10M
innodb_log_group_home_dir = /bck/data
innodb_log_files_in_group=2
innodb_log_file_size=5M

ibbackup my.ini backup.ini

Suggested fix:
ibbackup should not require innodb_data_home_dir if datadir is specified.
[13 Jan 2011 19:01] Ingo Strüwing
Patch sent to the team for review.
[14 Jan 2011 16:29] Ingo Strüwing
A possible workaround for UNIX-like platforms could be to set
innodb_data_home_dir=//
Resulting paths would then look like ///abs/path/ibdata1.
This is a valid path on UNIX-like platforms.

Note that a similar workaround is *not* possible on Windows.

BTW, I didn't get absolute paths in innodb_data_file_path to work
on Windows at all. The problem seems to be that InnoDB inserts a
directory delimiter (backslash on Windows) between innodb_data_home_dir
and the paths from innodb_data_file_path. Resulting paths look like:
\C:\abs\path\ibdata1, which is not a valid path on Windows.
[14 Jan 2011 17:32] Ingo Strüwing
Oops, I have to apologize. Please forgot about the "BTW" paragraph of my last comment. I must have had a faulty test.
innodb_data_home_dir="" with absolute paths in innodb_data_file_path
does also work for InnoDB on Windows.

However, there is still no workaround for ibbackup on Windows.
[27 Apr 2011 17:41] John Russell
Added to 3.5.3 changelog:

A blank value for the innodb_data_home_dir configuration option would cause the ibbackup command to fail. This fix allows you to specify multiple directory names in the innodb_data_file configuration option and specify innodb_data_home_dir with a blank value.