Posted on 2012-04-03 13:01
Milo的海域 阅读(684)
评论(0) 编辑 收藏 所属分类:
MySQL
When restore by xtrabackup '--copy-back' with version 1.6.4, you may get error:
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.
when read those lines we found that:
# check that original data directories exist and they are empty
if_directory_exists_and_empty($orig_datadir, "Original data");
if_directory_exists_and_empty($orig_ibdata_dir, "Original InnoDB data");
if_directory_exists_and_empty($orig_iblog_dir, "Original InnoDB log");
Google for reason for this check and find it mentioned in:
http://www.mysqlperformanceblog.com/2011/12/19/percona-xtrabackup-1-6-4/
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)