Restoring a Full Backup with innobackupex


Restoring a Full Backup with innobackupex

For convenience, innobackupex has a --copy-back option, which performs the restoration of a backup to the server’sdatadir

$ innobackupex --copy-back /path/to/BACKUP-DIR

It will copy all the data-related files back to the server’s datadir, determined by the server’s my.cnf configuration file. You should check the last line of the output for a success message:

innobackupex: Finished copying back files.

111225 01:08:13  innobackupex: completed OK!

Note

 

The datadir must be empty; Percona XtraBackup innobackupex --copy-back option will not copy over existing files. Also it’s important to note that MySQL server needs to be shut down before restore is performed. You can’t restore to a datadir of a running mysqld instance (except when importing a partial backup).

As files’ attributes will be preserved, in most cases you will need to change the files’ ownership to mysql before starting the database server, as they will be owned by the user who created the backup:

$ chown -R mysql:mysql /var/lib/mysql

Also note that all of these operations will be done as the user calling innobackupex, you will need write permissions on the server’s datadir.



备注:该篇技术文档是与MySQL数据库中的“备份恢复”主题相关的技术主题。


本文转载自:http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/restoring_a_backup_ibk.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值