innobackupex: Backup created in directory '/data/backup/mysql/2012-05-28_19-01-32'
innobackupex: MySQL binlog position: filename 'mysql-bin.000063', position 44718229367
120528 19:07:53 innobackupex: completed OK!
IMPORTANT: Please check that the copy-back run completes successfully.
At the end of a successful copy-back run innobackupex-1.6.4
prints "completed OK!".
Original data directory is not empty! at innobackupex-1.6.4 line 544.
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)
所以Original data directory is not empty应该是正常的!可以把Preparing之后的ibdata1和ib_logfile*文件分别复制到mysql的my.cnf里面配置的innodb_data_home_dir目录和datadir目录,然后启动mysql即可!
在这个bug页面的最下面看到以下内容:
Hello,
partial backup restore is not supported. If you have innodb_file_per_table enabled for tables in these databases - you might want to use --export option to restore data from backup partially.
这里提供了一种partial backup restore的方法。
倒数第二个评论中也提供了怎么部分恢复多个数据库中的若干个的方案。
So, in my understanding, the workround should be: Make sure "ls /var/lib/mysql/mydb01" shows an empty directory OR not existing before running innobackupex --copy-back