首页 > 其他 > 详细

innobackupex per table

时间:2018-05-08 00:37:05      阅读:255      评论:0      收藏:0      [点我收藏+]

 

#innobackupex export table
innobackupex --defaults-file=/etc/my.cnf --sock=/data/3306/mysql_3306.sock --user=root \
--password=oldboy123 --include=‘tpcc.item‘ --slave-info --safe-slave-backup /data/backup

#innobackupex --apply-log and export cfg and ibd
innobackupex --apply-log --export /data/backup/2018-04-15_04-51-46

#create table item
CREATE TABLE `item` (
`i_id` int(11) NOT NULL,
`i_im_id` int(11) DEFAULT NULL,
`i_name` varchar(24) DEFAULT NULL,
`i_price` decimal(5,2) DEFAULT NULL,
`i_data` varchar(50) DEFAULT NULL,
PRIMARY KEY (`i_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

# discard tablespace
alter table item discard tablespace;

#cp cfg and ibd
cp /data/backup/2018-04-15_04-51-46/tpcc/{item.cfg,item.ibd} /data/3306/data/d3307

#chowm mysql
chown mysql:mysql item.*

#import tablespace
alter table item import tablespace;

innobackupex per table

原文:https://www.cnblogs.com/moss_tan_jun/p/9005908.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!