With MySQL 5.6, innobackex isn't detecting xtrabackup properly

Bug #968449 reported by Cormac
This bug report is a duplicate of:  Bug #1062553: xtrabackup to support MySQL 5.6. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Triaged
Wishlist
Unassigned

Bug Description

O/S: Scientific Linux release 6.1 (Carbon)

MySQL Details:
MySQL-devel-5.6.4_m7-1.el6.x86_64
MySQL-shared-compat-5.6.4_m7-1.el6.x86_64
MySQL-server-5.6.4_m7-1.el6.x86_64
MySQL-client-5.6.4_m7-1.el6.x86_64
MySQL-shared-5.6.4_m7-1.el6.x86_64

XtraBackup Version:
xtrabackup-1.6.5-328.rhel6.x86_64

This is the problem we hit:
# /usr/bin/innobackupex-1.5.1 --defaults-file=/etc/mysql/mysql.cnf /backup

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2012. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

120329 17:22:57 innobackupex-1.5.1: Starting mysql with options: --defaults-file='/etc/mysql/mysql.cnf' --unbuffered --
120329 17:22:57 innobackupex-1.5.1: Connected to database with mysql child process (pid=1131)
120329 17:23:03 innobackupex-1.5.1: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex-1.5.1
           prints "completed OK!".

innobackupex-1.5.1: Using mysql Ver 14.14 Distrib 5.6.4-m7, for Linux (x86_64) using readline 5.1
innobackupex-1.5.1: Using mysql server version Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

sh: --: invalid option
Usage: sh [GNU long option] [option] ...
 sh [GNU long option] [option] script-file ...
GNU long options:
 --debug
 --debugger
 --dump-po-strings
 --dump-strings
 --help
 --init-file
 --login
 --noediting
 --noprofile
 --norc
 --posix
 --protected
 --rcfile
 --rpm-requires
 --restricted
 --verbose
 --version
Shell options:
 -irsD or -c command or -O shopt_option (invocation only)
 -abefhkmnptuvxBCHP or -o option
innobackupex-1.5.1: fatal error: no 'mysqld' group in MySQL options
innobackupex-1.5.1: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options

This is the contents of mysql.cnf:

# cat /etc/mysql/mysql.cnf
[client]
user = username
password = xxxxxxxxxx
socket = /var/lib/mysql/mysql.sock
host = localhost
##datadir=/srv/data/mysql

[mysqld]
user=mysql
port=3306
basedir=/usr
datadir=/srv/data/mysql
tmpdir=/dev/shm
pid-file=/var/run/mysql/mysqld.pid
socket=/var/lib/mysql/mysql.sock
character-set-server=utf8

# This must match your current log file size if these logs
# already exist.
innodb_log_file_size=1900M
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=2

I re-ran the backup and traced what perl was doing, using this line:

env PERLDB_OPTS="NonStop=1 AutoTrace=1 frame=2" perl -dS /usr/bin/innobackupex-1.5.1 --defaults-file=/etc/mysql/mysql.cnf /backup

(several hundred lines snipped):

2174: if ($option_defaults_file) {
2175: $options = $options . " --defaults-file=\"$option_defaults_file\" ";
2178: $options = $options . "--print-param";
2183: $cmdline = "$option_ibbackup_binary $options";
2184: @lines = `$cmdline`;
sh: --: invalid option
Usage: sh [GNU long option] [option] ...
sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--rpm-requires
--restricted
--verbose
--version
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option

The cause seems to be in "sub read_config_file" where it goes:
$cmdline = "$option_ibbackup_binary $options";

@lines = `$cmdline`;

Without specifying the --ibbinary $cmdline shows:
--defaults-file="/etc/mysql/mysql.cnf" --print-param

So its trying to exec "--defaults-file="/etc/mysql/mysql.cnf" --print-param" and throwing a sh error as a result.

When you add the --ibbackup=xtrabackup the backup then proceeds as normal.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Thank you for the bug report.

I see the problem now -- XtraBackup does not support MySQL 5.6 yet. Fixing version detection is of course easy -- but there may be other compatibility issues, so we have a number of things to do, including testing, before we can support 5.6.

Changed in percona-xtrabackup:
status: New → Confirmed
Stewart Smith (stewart)
summary: - innobackex isn't detecting xtrabackup properly
+ With MySQL 5.6, innobackex isn't detecting xtrabackup properly
Changed in percona-xtrabackup:
importance: Undecided → Wishlist
status: Confirmed → Triaged
tags: added: innobackupex mysql56
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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