innobackupex-1.5.1: Too many command line arguments

来源:互联网 发布:美工组是干什么的 编辑:程序博客网 时间:2024/06/07 06:34

[root@xxxxxxopt]# /usr/bin/innobackupex-1.5.1 –-apply-log /opt/back_data/ --defaults-file=/opt/mysql/product/mysql/etc/my.cnf


innobackupex-1.5.1: Too many command line arguments

 

还没有找到问题所在, 去官网 http://www.percona.com/doc/percona-xtrabackup/howtos/recipes_ibkx_local.html  看到如此例子:

 

$ innobackupex --use-memory=4G --apply-log /data/backups/2010-03-13_02-42-44/

 

我加了一个--use-memory=4G 参数 ,就OK了:

[root@xxxxxxopt]# innobackupex --use-memory=4G --apply-log /opt/back_data/ --defaults-file=/opt/mysql/product/mysql/etc/my.cnf

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.

IMPORTANT: Please check that the apply-log run completes successfully.
           At the end of a successful apply-log run innobackupex
           prints "completed OK!".

 

130407 14:45:07  innobackupex: Starting ibbackup with command: xtrabackup  --defaults-file="/opt/mysql/product/mysql/etc/my.cnf" --prepare --target-dir=/opt/back_data --use-memory=4G

....................................................... 省略N多吧!

[notice (again)]
  If you use binary log and don't use any hack of group commit,
  the binary log position seems to be:
InnoDB: Last MySQL binlog file position 0 55881164, file name /mysqldata/data/mysql-bin.004217

xtrabackup: starting shutdown with innodb_fast_shutdown = 1
130407 14:45:29  InnoDB: Starting shutdown...
130407 14:45:29  InnoDB: Shutdown completed; log sequence number 247276497420
130407 14:45:29  innobackupex: completed OK!

 

 

[root@xxxxx  mysqldata]# innobackupex --copy-back  /opt/back_data --defaults-file=/opt/mysql/product/mysql/etc/my.cnf

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.

IMPORTANT: Please check that the copy-back run completes successfully.
           At the end of a successful copy-back run innobackupex
           prints "completed OK!".

Original InnoDB log directory is not empty! at /usr/bin/innobackupex line 568.

 

Original data directory is not empty! at /usr/local/xtrabackup/bin/innobackupex line 538. 经查官网,这是xtrabackup的一个BUG。
innobackupex did not check that MySQL datadir was empty before –copy-back was run. With this bug fix, innobackupex will now error out of the –copy-back operation if the destination is not empty, avoiding potential data loss or a strang combination of a restored backup and previous data. Bug Fixed: #737569 (Valentine Gostev)
 
[OK]:直接手动copy过来到data目录即可。
 
 

 


 

 

原创粉丝点击