[root@localhost mysql]# innobackupex --copy-back /backup/xtrabackup/full/2015-11-06_11-29-51/ --user=bkpuser --password=digdeep
151106 15:10:23 innobackupex: Starting the copy-back operation
IMPORTANT: Please check that the copy-back run completes successfully.
At the end of a successful copy-back run innobackupex
prints "completed OK!".
innobackupex version 2.3.2 based on MySQL server 5.6.24 Linux (i686) (revision id: 306a2e0)
151106 15:10:23 [01] Copying ibdata1 to /var/lib/mysql/ibdata1
151106 15:10:28 [01] ...done
151106 15:10:28 [01] Copying ./xtrabackup_info to /var/lib/mysql/xtrabackup_info
151106 15:10:28 [01] ...done
[... ...]
151106 15:10:41 [01] ...done
151106 15:10:41 [01] Copying ./t/db.opt to /var/lib/mysql/t/db.opt
151106 15:10:41 [01] ...done
151106 15:10:41 [01] Copying ./t/t.frm to /var/lib/mysql/t/t.frm
151106 15:10:41 [01] ...done
151106 15:10:42 completed OK!
修改权限:
chown -R mysql:mysql /var/lib/mysql
启动:mysqld_safe --user=mysql &
最后验证还原成功。
用XtraBackup实现MySQL的主从复制快速部署【主不锁表】
安装和使用 Percona 推出的 Xtrabackup 备份 MySQL