Bug #75328 | Binlogs are not backupped | ||
---|---|---|---|
Submitted: | 29 Dec 2014 12:15 | Modified: | 1 Apr 2015 17:24 |
Reporter: | Daniël van Eeden (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Enterprise Backup | Severity: | S3 (Non-critical) |
Version: | 3.11.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Backup, binlog |
[29 Dec 2014 12:15]
Daniël van Eeden
[31 Dec 2014 5:07]
MySQL Verification Team
Thank you for the report. Verified as described start 5.1 (or 5.5 even) with log-bin and log-bin-index and get 141230 23:56:10 mysqlbackup: INFO: Starting to copy all innodb files... mysqlbackup: INFO: Could not find binlog index file. If this is online backup then server may not have started with --log-bin. Hence, binlogs will not be copied for this backup. Point-In-Time-Recovery will not be possible. This is surely because until 5.6 these variables don't exist in global variables that meb probably uses: http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_log_bin_... 5.1... mysql> show global variables like 'log_bin%'; +---------------------------------+-------+ | Variable_name | Value | +---------------------------------+-------+ | log_bin | ON | | log_bin_trust_function_creators | OFF | | log_bin_trust_routine_creators | OFF | +---------------------------------+-------+ 3 rows in set (0.00 sec) 5.6 mysql> show global variables like 'log_bin%'; +---------------------------------+-------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------------------------+-------------------------------------------------------------------------------------+ | log_bin | ON | | log_bin_basename | /usr/local/mysql-advanced-5.6.22-osx10.8-x86_64/data/my-bin | | log_bin_index | /usr/local/mysql-advanced-5.6.22-osx10.8-x86_64/data/my-bin.index | | log_bin_trust_function_creators | OFF | | log_bin_use_v1_row_events | OFF | +---------------------------------+-------------------------------------------------------------------------------------+ 5 rows in set (0.00 sec) MEB should put out a clearer message that if version < 5.6 binlogs won't be copied (or something to that effect)
[5 Jan 2015 10:07]
Daniël van Eeden
I've retried this with MEB 3.11.1 and MySQL 5.1, but now it seems to work. Binlogs are backupped if log-bin-index is specified. However it would be nice to have a message indicating that log-bin-index is required for MySQL 5.1.
[23 Jan 2015 18:12]
MySQL Verification Team
Hi, When you got it to work what was the value of log-bin log-bin-index From my test it only works < 5.6 if log-bin & log-bin-index is blank as it looks like meb since there's no global var for the index in these versions assumes it's the default <hostname>-bin.log 2500 stat64("/usr/local/mysql/data//fedora12vm-relay-bin.index", 0xbff01a28) = -1 ENOENT (No such file or directory) 2500 stat64("/usr/local/mysql/data//fedora12vm-bin.index", 0xbff01a28) = -1 ENOENT (No such file or directory) 2500 write(2, " mysqlbackup: INFO: Could not fi"..., 278) = 278
[23 Jan 2015 18:28]
MySQL Verification Team
Ignore that. How this works is it assumes the default. if they are not found you must pass --log-bin-index=/path/to/log-bin.index in the meb options (not the my.cnf as the error implies)
[23 Jan 2015 19:09]
MySQL Verification Team
IMHO the problem here is the error is not clear it may be interpreted 2 ways mysqlbackup: INFO: Could not find binlog index file. binlogs will not be copied for this backup. Point-In-Time-Recovery will not be possible. If this is online backup then server may not have started with --log-bin. You may specify its location with --log-bin-index option. since log-bin-index is a valid option in any 5.x (just not exposed in global vars until 5.6) there may be confusion if this should be specified in the my.cnf (which is true for 5.6) but < 5.6 MEB needs to be *passed* --log-bin-index = if it's the the default log-bin (which meb looks for datadir/<hostname-bin.index
[1 Apr 2015 17:24]
Daniel So
Edited the MySQL Enterprise Backup 3.11 and 3.12 manuals to clarify on the need to use the --log-bin-index option for older versions of MySQL when the index file is not at its default location: "For MySQL 5.5 and earlier, as well as all offline backups, use the --log-bin-index option to specify the absolute path of the index file on the MySQL server that lists all the used binary log files, if it is different from the default value of the option, for mysqlbackup to find the binary log files and include them in the backups."