zoukankan      html  css  js  c++  java
  • innobackupex per table

    #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;

  • 相关阅读:
    正则表达式和re模块
    面向对象基础
    面向对象高级
    网络编程
    collectiontimeossysjson模块
    继承
    封装
    我在吃饭
    111
    关于羽毛球拍
  • 原文地址:https://www.cnblogs.com/moss_tan_jun/p/9005908.html
Copyright © 2011-2022 走看看