innobackupex don't take the default datadir
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Medium
|
Alexey Kopytov | ||
2.1 |
Won't Fix
|
Undecided
|
Unassigned | ||
2.2 |
Fix Released
|
Medium
|
Alexey Kopytov |
Bug Description
If you don't have any "datadir" option on you mysqld section of your my.cnf, the server start fine and use /var/lib/mysql as a default but innobackupex don't
[root@repmaster ~]# innobackupex backups/
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.
120220 09:58:49 innobackupex: Starting mysql with options: --unbuffered --
120220 09:58:49 innobackupex: Connected to database with mysql child process (pid=2448)
120220 09:58:55 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
xtrabackup: Error: Please set parameter 'datadir'
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options
[root@repmaster ~]# cat /etc/my.cnf | grep -v ^#
[client]
port = 3306
socket = /var/lib/
[mysqld]
port = 3306
socket = /var/lib/
server-id = 1
log-bin=mysql-bin
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout
[root@repmaster ~]# rpm -qa | grep xtra
xtrabackup-
[root@repmaster ~]# cat /etc/issue
CentOS release 6.2 (Final)
[root@repmaster ~]# rpm -qa | grep -i percona
Percona-
Percona-
percona-
Percona-
Percona-
Related branches
- Sergei Glushchenko (community): Approve
-
Diff: 875 lines (+385/-197)8 files modifiedstorage/innobase/xtrabackup/innobackupex.pl (+182/-136)
storage/innobase/xtrabackup/src/xtrabackup.cc (+106/-48)
storage/innobase/xtrabackup/test/run.sh (+2/-6)
storage/innobase/xtrabackup/test/t/bug1062684.sh (+6/-6)
storage/innobase/xtrabackup/test/t/bug1334062.sh (+24/-0)
storage/innobase/xtrabackup/test/t/bug1343722.sh (+18/-0)
storage/innobase/xtrabackup/test/t/bug766305.sh (+1/-1)
storage/innobase/xtrabackup/test/t/xb_print_param.sh (+46/-0)
Changed in percona-xtrabackup: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Valentine Gostev (longbow) |
tags: | added: innobackupex |
Changed in percona-xtrabackup: | |
assignee: | Valentine Gostev (longbow) → nobody |
status: | Confirmed → Triaged |
tags: | added: i42483 |
Can you try using:
innobackupex --ibbackup= xtrabackup backups/
I've found this and it's not picking the binary up correctly on Centos 6
Testing using: OPTS="NonStop= 1 AutoTrace=1 frame=2" perl -dS /usr/bin/ innobackupex --defaults- file=/etc/ my.cnf /backup
env PERLDB_
This happens (several hundred lines snipped): defaults_ file) { file=\" $option_ defaults_ file\" "; ibbackup_ binary $options";
2174: if ($option_
2175: $options = $options . " --defaults-
2178: $options = $options . "--print-param";
2183: $cmdline = "$option_
2184: @lines = `$cmdline`;
It ended up execing:
--defaults- file="/ etc/mysql/ bluebox. cnf" --print-param
and threw this error.
The problem can be found in sub read_config_file where it's not correctly picking up the binary properly.