xtrabackup: Error: Please set parameter 'datadir',innobackupex: fatal error: no 'mysqld' group in My

-- 报错:
[root@5.5.25a]#  innobackupex  --rsync --user=backupusertmp --password=backupusertmp  /mysqldata/shared/tmpbackup

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.

130716 10:38:27  innobackupex: Starting mysql with options:  --password=xxxxxxxx --user='backupusertmp' --unbuffered --
130716 10:38:27  innobackupex: Connected to database with mysql child process (pid=6083)
130716 10:38:33  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.25a, 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

解决办法: 添加--defaults-file=/opt/mysql/product/5.5.25a/my.cnf参数


[root@5.5.25a]#  innobackupex  --rsync --user=backupusertmp --password=backupusertmp --defaults-file=/opt/mysql/product/5.5.25a/my.cnf  /mysqldata/shared/tmpbackup

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.

130716 10:44:29  innobackupex: Starting mysql with options:  --defaults-file='/opt/mysql/product/5.5.25a/my.cnf' --password=xxxxxxxx --user='backupusertmp' --unbuffered --
130716 10:44:29  innobackupex: Connected to database with mysql child process (pid=6595)
130716 10:44:35  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.25a, 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.

innobackupex: Error: Failed to create backup directory /mysqldata/shared/tmpbackup/2013-07-16_10-44-35: No such file or directory at /usr/bin/innobackupex line 371.

看到文件目录不存在,所以mkdir目录
[root@5.5.25a]# mkdir /mysqldata/shared/tmpbackup/
[root@5.5.25a]#  innobackupex  --rsync --user=backupusertmp --password=backupusertmp --defaults-file=/opt/mysql/product/5.5.25a/my.cnf  /mysqldata/shared/tmpbackup

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.

130716 10:46:24  innobackupex: Starting mysql with options:  --defaults-file='/opt/mysql/product/5.5.25a/my.cnf' --password=xxxxxxxx --user='backupusertmp' --unbuffered --
130716 10:46:24  innobackupex: Connected to database with mysql child process (pid=6780)
130716 10:46:30  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.25a, 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.

开始复制进行
.................

 

PS:有些情况是需要把innobackupex设置到linux系统的PATH环境中去。

 

innobackupex 中的--rsync 参数可以记录下复制的binlog位置.

innobackupex  --help 中看不到rsync的注释,要去官网上面看

参考: http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/innobackupex_option_reference.html?id=percona-xtrabackup:innobackupex:option_reference

--rsync

Uses the rsync utility to optimize local file transfers. When this option is specified, innobackupex uses rsyncto copy all non-InnoDB files instead of spawning a separate cp for each file, which can be much faster for servers with a large number of databases or tables. This option cannot be used together with --stream.

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值