Bug #60898 MEB on Windows can not properly process full pathname to my.ini with spaces
Submitted: 17 Apr 2011 9:48 Modified: 17 Apr 2011 10:51
Reporter: Valeriy Kravchuk Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S2 (Serious)
Version:3.5.2 OS:Windows
Assigned to: CPU Architecture:Any

[17 Apr 2011 9:48] Valeriy Kravchuk
Description:
On Windows my.ini is located in Program Files subdirectory by default (when .msi is used). But there is no way to refer to it in mysqlbackup command line using full pathname. Any attempt to do that leads to error with code 2:

C:\Program Files\MySQL\MySQL Enterprise Backup 3.5.2>mysqlbackup.exe --user=root
 --password=root "c:\Program Files\MySQL\MySQL Server 5.1\my.ini" d:\Backups
mysqlbackup: Starting mysqlbackup with following arguments:
mysqlbackup.exe --user=root --password=root c:\Program Files\MySQL\MySQL Server
5.1\my.ini d:\Backups
mysqlbackup: The unique backup id generated for the current backup operation is
13030331075657544

mysqlbackup: IMPORTANT: Please check that backup run completes successfully.
            At the end of a successful 'backup' run mysqlbackup
            prints "mysqlbackup completed OK!".

mysqlbackup: Created backup directory 'd:\Backups\2011-04-17_12-38-27'
mysqlbackup: Using ibbackup version 3.5.2 MySQL Enterprise Backup version 3.5.2
mysqlbackup: Using MySQL client version: 5.1.53
mysqlbackup: Checking a connection to MySQL Server with parameters:
mysqlbackup: user=root, port=3306,
mysqlbackup: Using MySQL server version: 5.1.56-community

110417 12:38:29 mysqlbackup: Starting ibbackup binary with args:

ibbackup.exe --suspend-at-end c:\Program Files\MySQL\MySQL Server 5.1\my.ini d:\
Backups\2011-04-17_12-38-27\backup-my.cnf
mysqlbackup: Waiting for ibbackup process to suspend
mysqlbackup: Suspend file 'd:\Backups\2011-04-17_12-38-27\ibbackup_suspended'
ibbackup version 3.5.2 MySQL Enterprise Backup version 3.5.2
Copyright (c) 2002, 2010, Oracle and/or its affiliates.
Run 'ibbackup --help' for help and 'ibbackup --version' for version info.

ibbackup: Error: extraneous argument Server.
ibbackup: Run 'ibbackup --help' for help.
mysqlbackup: Error: ibbackup process has died
mysqlbackup: Error: mysqlbackup "backup" failed
mysqlbackup: Warning: Backup Logging: The LSN fields from ibbackup cannot be log
ged. Cannot open ibbackup_export_variables.txt file to read  No such file or dir
ectory: (Errcode: 2)
mysqlbackup: Warning: Backup Logging: The fields start_lsn, incremental_base_lsn
, end_lsn will be zeros.

Looks like mysqlbackup do not quote pathname to my.ini properly when calling ibbackup exe:

ibbackup.exe --suspend-at-end c:\Program Files\MySQL\MySQL Server 5.1\my.ini d:\
Backups\2011-04-17_12-38-27\backup-my.cnf

so it reports "extra argument" and fails.

How to repeat:
Just to use mysqlbackup as described in the manual on Windows. See above.

As a workaround one can try to cd to the directory with my.ini or copy my.ini to some directory without spaces in the full pathname or to current directory:

C:\Program Files\MySQL\MySQL Enterprise Backup 3.5.2>copy "c:\Program Files\MySQ
L\MySQL Server 5.1\my.ini" .
        1 file(s) copied.

C:\Program Files\MySQL\MySQL Enterprise Backup 3.5.2>mysqlbackup.exe --user=root
 --password=root my.ini d:\Backups
mysqlbackup: Starting mysqlbackup with following arguments:
mysqlbackup.exe --user=root --password=root my.ini d:\Backups
mysqlbackup: The unique backup id generated for the current backup operation is
13030334986733096

mysqlbackup: IMPORTANT: Please check that backup run completes successfully.
            At the end of a successful 'backup' run mysqlbackup
            prints "mysqlbackup completed OK!".

mysqlbackup: Created backup directory 'd:\Backups\2011-04-17_12-44-58'
mysqlbackup: Using ibbackup version 3.5.2 MySQL Enterprise Backup version 3.5.2
mysqlbackup: Using MySQL client version: 5.1.53
mysqlbackup: Checking a connection to MySQL Server with parameters:
mysqlbackup: user=root, port=3306,
mysqlbackup: Using MySQL server version: 5.1.56-community

110417 12:44:58 mysqlbackup: Starting ibbackup binary with args:

ibbackup.exe --suspend-at-end my.ini d:\Backups\2011-04-17_12-44-58\backup-my.cn
f
mysqlbackup: Waiting for ibbackup process to suspend
mysqlbackup: Suspend file 'd:\Backups\2011-04-17_12-44-58\ibbackup_suspended'
ibbackup version 3.5.2 MySQL Enterprise Backup version 3.5.2
Copyright (c) 2002, 2010, Oracle and/or its affiliates.
Run 'ibbackup --help' for help and 'ibbackup --version' for version info.

Contents of my.ini:
innodb_data_home_dir got value C:/Documents and Settings/All Users/Application D
ata/MySQL/MySQL Server 5.1/Data/
innodb_data_file_path got value ibdata1:10M:autoextend
datadir got value C:/Documents and Settings/All Users/Application Data/MySQL/MyS
QL Server 5.1/Data/
innodb_log_group_home_dir got value C:/Documents and Settings/All Users/Applicat
ion Data/MySQL/MySQL Server 5.1/Data/
innodb_log_files_in_group got value 2
innodb_log_file_size got value 10485760

Contents of d:\Backups\2011-04-17_12-44-58\backup-my.cnf:
innodb_data_home_dir got value d:\Backups\2011-04-17_12-44-58
innodb_data_file_path got value ibdata1:10M:autoextend
datadir got value d:\Backups\2011-04-17_12-44-58
innodb_log_group_home_dir got value d:\Backups\2011-04-17_12-44-58
innodb_log_files_in_group got value 2
innodb_log_file_size got value 10485760

ibbackup: System tablespace file format is Antelope.
ibbackup: Found checkpoint at lsn 54023.
ibbackup: Starting log scan from lsn 53760.
110417 12:44:59  ibbackup: Copying log...
110417 12:44:59  ibbackup: Log copied, lsn 54023.
ibbackup: We wait 1 second before starting copying the data files...
110417 12:45:00  ibbackup: Copying C:\Documents and Settings\All Users\Applicati
on Data\MySQL\MySQL Server 5.1\Data\ibdata1 (Antelope file format).

ibbackup: You specified the option --suspend-at-end.
110417 12:45:00  ibbackup: Suspending the backup procedure to wait
ibbackup: until you delete the marker file d:\Backups\2011-04-17_12-44-58\ibback
up_suspended.

110417 12:45:00 mysqlbackup: Continuing after ibbackup has suspended

110417 12:45:00 mysqlbackup: Starting to lock all the tables....

110417 12:45:00 mysqlbackup: All tables are locked and flushed to disk
mysqlbackup: Opening backup source directory 'C:\Documents and Settings\All User
s\Application Data\MySQL\MySQL Server 5.1\Data\'

110417 12:45:00 mysqlbackup: Starting to backup all files in subdirectories of '
C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\Data
\'
mysqlbackup: Backing up the database directory 'mysql'
mysqlbackup: Backing up the database directory 'test'
mysqlbackup: Resuming ibbackup

110417 12:45:02  ibbackup: Suspension ends. Continuing the backup procedure.

110417 12:45:02  ibbackup: Copying of the last data file is close to ending...
ibbackup: We still once copy the latest flushed log to ibbackup_logfile.
ibbackup: A copied database page was modified at 54023.
ibbackup: Scanned log up to lsn 55702.
ibbackup: Was able to parse the log up to lsn 55702.
ibbackup: Maximum page number for a log record 51
110417 12:45:02  ibbackup: Full backup completed!

110417 12:45:02 mysqlbackup: All tables unlocked
mysqlbackup: All MySQL tables were locked for 2.112 seconds
mysqlbackup: start_lsn: 53760
mysqlbackup: incremental_base_lsn: 54023
mysqlbackup: end_lsn: 55702

110417 12:45:03 mysqlbackup: mysqlbackup completed OK!
[17 Apr 2011 9:49] Valeriy Kravchuk
Verified on Windows XP.
[17 Apr 2011 10:51] Valeriy Kravchuk
Actually this is a duplicate of Bug #57824.
[17 Apr 2011 10:51] Valeriy Kravchuk
Actually this is a duplicate of Bug #57824.