mysql innobackupex备份实施
最近用innobackup进行备份测试,我们只备份一个innodb类型的库,数据大小大概50多G,用innobackupex大概用了5个多小时,但是mysqldump只用了大约2个小时,这让我很费解,有哪位知道的同志能够交流下?按理说innobackupex应该快的,还有就是大家在备份时不要放到高峰期,因为innobackupex备份时比较吃系统IO,下面就是我备份脚本,分为全备和增备,使用innobackupex需要安装依赖包:
yum install perl-DBD-MySQL*
一、全备
1、全备脚本
--全备到远程服务器
/data/mysql/bin/innobackupex --defaults-file=/etc/my.cnf --user=root --password="*******" --database=report --stream=tar /data/backup/fullbackup 2>/data/backup/fullbackup/bak.log |gzip| ssh root@192.168.1.1 "cat - > /data/backup/fullbackup/`date +%F_%H-%M-%S`.tar.gz "
--全量备份到本地
/data/mysql/bin/innobackupex --defaults-file=/etc/my.cnf --user=root --password="******" --database=report --stream=tar /data/backup/fullbackup 2>/data/backup/fullbackup/bak.log | gzip > /data/backup/fullbackup/`date +%F_%H-%M-%S`.tar.gz
注意事项:1、--defaults-file参数需要放在第一个位置,否则报错提示,通过这个参数,将数据文件(由cnf里的变量datadir指定)拷贝至备份目录下。备份成功后,将在备份目录下创建一个时间戳目录,在该目录下存放备份文件。
2、--stream=tar表示通过流的方式将文件传送给tar进行归档。
3、还有其他的参数请参考官方文档。
2、全备恢复
--解压
tar -ixvf 2015-10-26_18-11-16.tar.gz -C 2015-10-26_18-11-16
注意事项:需要添加-i参数,否则解压出来的文件不全,通过-C指定目标目录
--全量恢复:假设恢复还原到3307端口的库中
恢复分为两步,第一步需要“prepare”,其实就是xtrabackup应用事务日志,对于已经commit的操作进行前滚,对于rollback的操作进行回滚,这个跟crash recovery类似。
--应用日志:
/data/mysql/bin/innobackupex --apply-log /data/backup/fullbackup/2015-10-26_18-11-16
注意:apply-log后备份目录会出现xtrabackup_binlog_pos_innodb,这个文件记录应用到binlog日志的文件和位置。有时可能会有xtrabackup_binlog_info文件,如果做从库,那么以哪个为准呢?
1 对于纯 InnoDB 操作,备份出来的数据中上述两个文件的内容是一致的
2 对于 InnoDB 和非事务存储引擎混合操作,xtrabackup_binlog_info 中所示的 position 应该会比 xtrabackup_pos_innodb 所示的数值大。此时应以 xtrabackup_binlog_info 为准;
--copy文件
#需先关闭mysql服务
/data/mysql/bin/mysqladmin -S /tmp/mysql3307.sock --user=root --password="*******" shutdown
#删除数据库目录文件和日志
rm -rf /data/mysql/data2/report ib*
#进行文件同步
rsync -avz report ib* /data/mysql/data2
#最后别忘了修改权限
chown -R mysql:mysql /data/mysql/data2/*
注意事项:使用--copy-back,要求data目录下面为空,如不为空,会报错如下Original data directory /data/mysql/data2 is not empty!这种适合备份实例下的所有数据库的情况,这时可以清空data目录。但是不适合只备份特定的某些库,由于我们是备份特定report库,所以这里直接用rsync来同步文件。下面的是官方的copy-back供参考:
/data/mysql/bin/innobackupex --defaults-file=/etc/my_3307.cnf --copy-back /data/backup/fullbackup/2015-10-26_18-11-16
到这里,数据库就恢复还原好了,可以重新启动mysql服务,登录mysql查看数据恢复情况。一般来说全备的恢复比较简单。但是每次备份的数据量比较大,时间也长,大家根据实际情况决定备份方式。
二、增备
增量备份:以某个特定的全备为基础,个人理解可以细分两种:一种是每天都以该全备为基础进行增备。另一种是以前一天的增量为基础进行增量。
/data/mysql/bin/innobackupex --user=root --password="*******" --database=report --incremental --incremental-basedir=/data/backup/fullbackup/2015-10-27_15-27-04 /data/backup/fullbackup
注意事项:--incremental参数指明用增量备份方式;--incremental-basedir参数指定以哪个全备为基础
对于第一种恢复方法:
/data/mysql/bin/innobackupex --apply-log --redo-only /data/backup/fullbackup/2015-10-27_15-27-04 /data/mysql/bin/innobackupex --apply-log /data/backup/fullbackup/2015-10-27_15-27-04 --incremental-dir=/data/backup/fullbackup/2015-10-27_16-28-40
对于第二种恢复方法:
/data/mysql/bin/innobackupex --apply-log --redo-only /data/backup/fullbackup/2015-10-27_14-20-35 /data/mysql/bin/innobackupex --apply-log --redo-only /data/backup/fullbackup/2015-10-27_14-20-37 ......redo每一天的增量 /data/mysql/bin/innobackupex --apply-log /data/backup/fullbackup/2015-10-27_14-20-35 --incremental-dir=/data/backup/fullbackup/2015-10-27_14-35-11
注意事项:
对于第一种方式:由于每次都是以全备为基础增量,所以只需恢复全备和最后一次的增量即可。
对于第二种方式:需要按顺序对全备,第一次增备...第N-1次增备进行应用事务日志文件,最后一次的增量不需要,最终日志都应用到全备中了,故最后只需要将全备文件夹中的文件copy到对应data目录即可。
三、从全备中恢复指定的表
其实,我们很多情况下并不需要恢复整个库,更多的是恢复指定的表,如果用mysqldump备份的就非常蛋疼了,我曾经从一个mysqldump备份的70G文件中抽取恢复一张有2000万记录的表,可想而知,这种方式效率有多低下吧,下面我介绍下应用innobackupex全备情况下,如何恢复还原指定表。
使用innobackupex恢复指定表前提条件:
- 源和目标数据库server需要使用独立表空间,即开启InnoDB_File_Per_Table = ON参数
- 目标数据库需要使用mysql5.6及以上版本或者xtradb引擎,源数据库不作限制
【恢复还原】
1、应用日志,这里需要加上--export参数:
/data/mysql/bin/innobackupex --apply-log --export /data/backup/test
打印应用日志过程如下:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 InnoDB: Table kartriderrushplus3_log/t_order_notify_log in the InnoDB data dictionary has tablespace id 856, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 2 InnoDB: It will be removed from the data dictionary. 3 InnoDB: Please refer to 4 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 5 InnoDB: for how to resolve the issue. 6 InnoDB: Table kartriderrushplus3_log/t_tsi_transaction_sync_error in the InnoDB data dictionary has tablespace id 857, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 7 InnoDB: It will be removed from the data dictionary. 8 InnoDB: Please refer to 9 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 10 InnoDB: for how to resolve the issue. 11 InnoDB: Table kartriderrushplus3_log/t_user_buy_item_count_log in the InnoDB data dictionary has tablespace id 858, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 12 InnoDB: It will be removed from the data dictionary. 13 InnoDB: Please refer to 14 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 15 InnoDB: for how to resolve the issue. 16 InnoDB: Table kartriderrushplus3_log/t_user_kart_log in the InnoDB data dictionary has tablespace id 859, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 17 InnoDB: It will be removed from the data dictionary. 18 InnoDB: Please refer to 19 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 20 InnoDB: for how to resolve the issue. 21 InnoDB: Table kartriderrushplus3_log/t_user_lotto_log in the InnoDB data dictionary has tablespace id 860, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 22 InnoDB: It will be removed from the data dictionary. 23 InnoDB: Please refer to 24 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 25 InnoDB: for how to resolve the issue. 26 InnoDB: Table kartriderrushplus3_log/t_user_lucci_log in the InnoDB data dictionary has tablespace id 861, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 27 InnoDB: It will be removed from the data dictionary. 28 InnoDB: Please refer to 29 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 30 InnoDB: for how to resolve the issue. 31 InnoDB: Table kartriderrushplus3_log/t_user_mall_log in the InnoDB data dictionary has tablespace id 862, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 32 InnoDB: It will be removed from the data dictionary. 33 InnoDB: Please refer to 34 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 35 InnoDB: for how to resolve the issue. 36 InnoDB: Table kartriderrushplus3_log/t_user_oil_log in the InnoDB data dictionary has tablespace id 863, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 37 InnoDB: It will be removed from the data dictionary. 38 InnoDB: Please refer to 39 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 40 InnoDB: for how to resolve the issue. 41 InnoDB: Table kartriderrushplus3_log/t_user_pve_log in the InnoDB data dictionary has tablespace id 900, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 42 InnoDB: It will be removed from the data dictionary. 43 InnoDB: Please refer to 44 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 45 InnoDB: for how to resolve the issue. 46 InnoDB: Table kartriderrushplus3_log/t_user_recharge_log in the InnoDB data dictionary has tablespace id 865, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 47 InnoDB: It will be removed from the data dictionary. 48 InnoDB: Please refer to 49 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 50 InnoDB: for how to resolve the issue. 51 InnoDB: Table kartriderrushplus3_log/t_user_silver_log in the InnoDB data dictionary has tablespace id 866, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 52 InnoDB: It will be removed from the data dictionary. 53 InnoDB: Please refer to 54 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 55 InnoDB: for how to resolve the issue. 56 InnoDB: Table kartriderrushplus3_log/t_user_world_pve_log in the InnoDB data dictionary has tablespace id 908, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 57 InnoDB: It will be removed from the data dictionary. 58 InnoDB: Please refer to 59 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 60 InnoDB: for how to resolve the issue. 61 InnoDB: Table mysql/innodb_index_stats in the InnoDB data dictionary has tablespace id 2, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 62 InnoDB: It will be removed from the data dictionary. 63 InnoDB: Please refer to 64 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 65 InnoDB: for how to resolve the issue. 66 InnoDB: Table mysql/innodb_table_stats in the InnoDB data dictionary has tablespace id 1, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 67 InnoDB: It will be removed from the data dictionary. 68 InnoDB: Please refer to 69 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 70 InnoDB: for how to resolve the issue. 71 InnoDB: Table mysql/slave_master_info in the InnoDB data dictionary has tablespace id 4, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 72 InnoDB: It will be removed from the data dictionary. 73 InnoDB: Please refer to 74 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 75 InnoDB: for how to resolve the issue. 76 InnoDB: Table mysql/slave_relay_log_info in the InnoDB data dictionary has tablespace id 3, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 77 InnoDB: It will be removed from the data dictionary. 78 InnoDB: Please refer to 79 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 80 InnoDB: for how to resolve the issue. 81 InnoDB: Table mysql/slave_worker_info in the InnoDB data dictionary has tablespace id 5, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 82 InnoDB: It will be removed from the data dictionary. 83 InnoDB: Please refer to 84 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 85 InnoDB: for how to resolve the issue. 86 InnoDB: Table test/boxgetitem in the InnoDB data dictionary has tablespace id 868, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 87 InnoDB: It will be removed from the data dictionary. 88 InnoDB: Please refer to 89 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 90 InnoDB: for how to resolve the issue. 91 InnoDB: Table test/cart in the InnoDB data dictionary has tablespace id 869, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 92 InnoDB: It will be removed from the data dictionary. 93 InnoDB: Please refer to 94 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 95 InnoDB: for how to resolve the issue. 96 InnoDB: Table test/dgoldsilversave in the InnoDB data dictionary has tablespace id 870, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 97 InnoDB: It will be removed from the data dictionary. 98 InnoDB: Please refer to 99 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 100 InnoDB: for how to resolve the issue. 101 InnoDB: Table test/getoil in the InnoDB data dictionary has tablespace id 871, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 102 InnoDB: It will be removed from the data dictionary. 103 InnoDB: Please refer to 104 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 105 InnoDB: for how to resolve the issue. 106 InnoDB: Table test/getplayahead in the InnoDB data dictionary has tablespace id 872, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 107 InnoDB: It will be removed from the data dictionary. 108 InnoDB: Please refer to 109 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 110 InnoDB: for how to resolve the issue. 111 InnoDB: Table test/getplayaheadpnum in the InnoDB data dictionary has tablespace id 873, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 112 InnoDB: It will be removed from the data dictionary. 113 InnoDB: Please refer to 114 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 115 InnoDB: for how to resolve the issue. 116 InnoDB: Table test/goldcostitem in the InnoDB data dictionary has tablespace id 874, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 117 InnoDB: It will be removed from the data dictionary. 118 InnoDB: Please refer to 119 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 120 InnoDB: for how to resolve the issue. 121 InnoDB: Table test/goldgetcost in the InnoDB data dictionary has tablespace id 875, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 122 InnoDB: It will be removed from the data dictionary. 123 InnoDB: Please refer to 124 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 125 InnoDB: for how to resolve the issue. 126 InnoDB: Table test/goldsilversave in the InnoDB data dictionary has tablespace id 876, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 127 InnoDB: It will be removed from the data dictionary. 128 InnoDB: Please refer to 129 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 130 InnoDB: for how to resolve the issue. 131 InnoDB: Table test/matchplay in the InnoDB data dictionary has tablespace id 909, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 132 InnoDB: It will be removed from the data dictionary. 133 InnoDB: Please refer to 134 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 135 InnoDB: for how to resolve the issue. 136 InnoDB: Table test/mg_basic_stat in the InnoDB data dictionary has tablespace id 867, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 137 InnoDB: It will be removed from the data dictionary. 138 InnoDB: Please refer to 139 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 140 InnoDB: for how to resolve the issue. 141 InnoDB: Table test/mg_basic_stat_monthly in the InnoDB data dictionary has tablespace id 911, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 142 InnoDB: It will be removed from the data dictionary. 143 InnoDB: Please refer to 144 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 145 InnoDB: for how to resolve the issue. 146 InnoDB: Table test/onlinestatus in the InnoDB data dictionary has tablespace id 879, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 147 InnoDB: It will be removed from the data dictionary. 148 InnoDB: Please refer to 149 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 150 InnoDB: for how to resolve the issue. 151 InnoDB: Table test/pvemodepass in the InnoDB data dictionary has tablespace id 881, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 152 InnoDB: It will be removed from the data dictionary. 153 InnoDB: Please refer to 154 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 155 InnoDB: for how to resolve the issue. 156 InnoDB: Table test/pvepoint in the InnoDB data dictionary has tablespace id 882, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 157 InnoDB: It will be removed from the data dictionary. 158 InnoDB: Please refer to 159 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 160 InnoDB: for how to resolve the issue. 161 InnoDB: Table test/pvepointpasslv in the InnoDB data dictionary has tablespace id 883, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 162 InnoDB: It will be removed from the data dictionary. 163 InnoDB: Please refer to 164 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 165 InnoDB: for how to resolve the issue. 166 InnoDB: Table test/pvplog in the InnoDB data dictionary has tablespace id 884, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 167 InnoDB: It will be removed from the data dictionary. 168 InnoDB: Please refer to 169 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 170 InnoDB: for how to resolve the issue. 171 InnoDB: Table test/shop_log in the InnoDB data dictionary has tablespace id 885, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 172 InnoDB: It will be removed from the data dictionary. 173 InnoDB: Please refer to 174 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 175 InnoDB: for how to resolve the issue. 176 InnoDB: Table test/silvercostitem in the InnoDB data dictionary has tablespace id 886, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 177 InnoDB: It will be removed from the data dictionary. 178 InnoDB: Please refer to 179 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 180 InnoDB: for how to resolve the issue. 181 InnoDB: Table test/silvergetcost in the InnoDB data dictionary has tablespace id 887, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 182 InnoDB: It will be removed from the data dictionary. 183 InnoDB: Please refer to 184 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 185 InnoDB: for how to resolve the issue. 186 InnoDB: Table test/t_conf_user_level_exp in the InnoDB data dictionary has tablespace id 890, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 187 InnoDB: It will be removed from the data dictionary. 188 InnoDB: Please refer to 189 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 190 InnoDB: for how to resolve the issue. 191 InnoDB: Table test/t_monthly_index in the InnoDB data dictionary has tablespace id 891, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 192 InnoDB: It will be removed from the data dictionary. 193 InnoDB: Please refer to 194 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 195 InnoDB: for how to resolve the issue. 196 InnoDB: Table test/userlvnum in the InnoDB data dictionary has tablespace id 888, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 197 InnoDB: It will be removed from the data dictionary. 198 InnoDB: Please refer to 199 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 200 InnoDB: for how to resolve the issue. 201 InnoDB: Table test/userviplevelnum in the InnoDB data dictionary has tablespace id 889, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary. 202 InnoDB: It will be removed from the data dictionary. 203 InnoDB: Please refer to 204 InnoDB: http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html 205 InnoDB: for how to resolve the issue. 206 InnoDB: 128 rollback segment(s) are active. 207 InnoDB: Waiting for purge to start 208 InnoDB: 5.6.24 started; log sequence number 170485894303 209 xtrabackup: export option is specified. 210 xtrabackup: export metadata of table 'KartRiderRushPlus3/connection_log' to file `./KartRiderRushPlus3/connection_log.exp` (1 indexes) 211 xtrabackup: name=PRIMARY, id.low=768, page=3 212 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_buy_egg_log' to file `./KartRiderRushPlus3/t_buy_egg_log.exp` (1 indexes) 213 xtrabackup: name=PRIMARY, id.low=780, page=3 214 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_lotto' to file `./KartRiderRushPlus3/t_user_lotto.exp` (3 indexes) 215 xtrabackup: name=PRIMARY, id.low=870, page=3 216 xtrabackup: name=idx_user_id, id.low=944, page=39 217 xtrabackup: name=key_user_idx, id.low=957, page=1546 218 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_treasure_const' to file `./KartRiderRushPlus3/t_conf_treasure_const.exp` (1 indexes) 219 xtrabackup: name=PRIMARY, id.low=827, page=3 220 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_admin_ptcl_record' to file `./KartRiderRushPlus3/t_admin_ptcl_record.exp` (1 indexes) 221 xtrabackup: name=PRIMARY, id.low=773, page=3 222 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_server_user_status' to file `./KartRiderRushPlus3/t_server_user_status.exp` (1 indexes) 223 xtrabackup: name=PRIMARY, id.low=848, page=3 224 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_session' to file `./KartRiderRushPlus3/t_user_session.exp` (1 indexes) 225 xtrabackup: name=PRIMARY, id.low=891, page=3 226 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_bingo' to file `./KartRiderRushPlus3/t_conf_bingo.exp` (1 indexes) 227 xtrabackup: name=PRIMARY, id.low=786, page=3 228 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_item_count' to file `./KartRiderRushPlus3/t_user_item_count.exp` (2 indexes) 229 xtrabackup: name=PRIMARY, id.low=865, page=3 230 xtrabackup: name=user_idx_item_idx, id.low=866, page=4 231 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_const' to file `./KartRiderRushPlus3/t_conf_const.exp` (1 indexes) 232 xtrabackup: name=PRIMARY, id.low=789, page=3 233 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_lucci_log' to file `./KartRiderRushPlus3/t_user_lucci_log.exp` (1 indexes) 234 xtrabackup: name=PRIMARY, id.low=871, page=3 235 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_challenge' to file `./KartRiderRushPlus3/t_user_challenge.exp` (1 indexes) 236 xtrabackup: name=PRIMARY, id.low=858, page=3 237 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_mark' to file `./KartRiderRushPlus3/t_user_mark.exp` (1 indexes) 238 xtrabackup: name=PRIMARY, id.low=874, page=3 239 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_apple_charge_error_log' to file `./KartRiderRushPlus3/t_apple_charge_error_log.exp` (2 indexes) 240 xtrabackup: name=PRIMARY, id.low=776, page=3 241 xtrabackup: name=user_idx, id.low=777, page=4 242 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_kart_level' to file `./KartRiderRushPlus3/t_conf_kart_level.exp` (1 indexes) 243 xtrabackup: name=PRIMARY, id.low=800, page=3 244 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_game_item' to file `./KartRiderRushPlus3/t_user_game_item.exp` (1 indexes) 245 xtrabackup: name=PRIMARY, id.low=863, page=3 246 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_kart_system_level' to file `./KartRiderRushPlus3/t_conf_kart_system_level.exp` (1 indexes) 247 xtrabackup: name=PRIMARY, id.low=802, page=3 248 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_trace_log_m' to file `./KartRiderRushPlus3/t_trace_log_m.exp` (1 indexes) 249 xtrabackup: name=PRIMARY, id.low=850, page=3 250 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_apple_charge_notify_log' to file `./KartRiderRushPlus3/t_apple_charge_notify_log.exp` (2 indexes) 251 xtrabackup: name=PRIMARY, id.low=778, page=3 252 xtrabackup: name=user_idx, id.low=779, page=4 253 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_mission' to file `./KartRiderRushPlus3/t_conf_mission.exp` (1 indexes) 254 xtrabackup: name=PRIMARY, id.low=808, page=3 255 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_world_pve_point' to file `./KartRiderRushPlus3/t_conf_world_pve_point.exp` (1 indexes) 256 xtrabackup: name=PRIMARY, id.low=948, page=3 257 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_gm_broadcast' to file `./KartRiderRushPlus3/t_gm_broadcast.exp` (1 indexes) 258 xtrabackup: name=PRIMARY, id.low=836, page=3 259 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_pve_clearing' to file `./KartRiderRushPlus3/t_conf_pve_clearing.exp` (1 indexes) 260 xtrabackup: name=PRIMARY, id.low=946, page=3 261 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_cup_rank_award_log' to file `./KartRiderRushPlus3/t_cup_rank_award_log.exp` (1 indexes) 262 xtrabackup: name=PRIMARY, id.low=831, page=3 263 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_item_upgrade' to file `./KartRiderRushPlus3/t_conf_item_upgrade.exp` (1 indexes) 264 xtrabackup: name=PRIMARY, id.low=798, page=3 265 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_world_pve' to file `./KartRiderRushPlus3/t_conf_world_pve.exp` (1 indexes) 266 xtrabackup: name=PRIMARY, id.low=947, page=3 267 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_bingo_treasure' to file `./KartRiderRushPlus3/t_conf_bingo_treasure.exp` (1 indexes) 268 xtrabackup: name=PRIMARY, id.low=787, page=3 269 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_buy_oil_money_log' to file `./KartRiderRushPlus3/t_buy_oil_money_log.exp` (1 indexes) 270 xtrabackup: name=PRIMARY, id.low=781, page=3 271 xtrabackup: export metadata of table 'KartRiderRushPlus3/questionnaire_info' to file `./KartRiderRushPlus3/questionnaire_info.exp` (1 indexes) 272 xtrabackup: name=PRIMARY, id.low=771, page=3 273 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_pve_log' to file `./KartRiderRushPlus3/t_user_pve_log.exp` (1 indexes) 274 xtrabackup: name=PRIMARY, id.low=882, page=3 275 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_decomposition' to file `./KartRiderRushPlus3/t_conf_decomposition.exp` (1 indexes) 276 xtrabackup: name=PRIMARY, id.low=790, page=3 277 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_status_log_m' to file `./KartRiderRushPlus3/t_status_log_m.exp` (1 indexes) 278 xtrabackup: name=PRIMARY, id.low=849, page=3 279 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_login_info_log' to file `./KartRiderRushPlus3/t_login_info_log.exp` (1 indexes) 280 xtrabackup: name=PRIMARY, id.low=839, page=3 281 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_composition' to file `./KartRiderRushPlus3/t_conf_composition.exp` (1 indexes) 282 xtrabackup: name=PRIMARY, id.low=788, page=3 283 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_speed_force' to file `./KartRiderRushPlus3/t_conf_speed_force.exp` (1 indexes) 284 xtrabackup: name=GEN_CLUST_INDEX, id.low=823, page=3 285 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_skill_treasure' to file `./KartRiderRushPlus3/t_conf_skill_treasure.exp` (1 indexes) 286 xtrabackup: name=PRIMARY, id.low=822, page=3 287 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_match_record_log' to file `./KartRiderRushPlus3/t_match_record_log.exp` (1 indexes) 288 xtrabackup: name=PRIMARY, id.low=843, page=3 289 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_achievement_schedule' to file `./KartRiderRushPlus3/t_user_achievement_schedule.exp` (2 indexes) 290 xtrabackup: name=PRIMARY, id.low=856, page=3 291 xtrabackup: name=user_idx_achievement_group_id, id.low=857, page=4 292 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user' to file `./KartRiderRushPlus3/t_user.exp` (3 indexes) 293 xtrabackup: name=PRIMARY, id.low=969, page=3 294 xtrabackup: name=id, id.low=970, page=4 295 xtrabackup: name=key_name, id.low=971, page=5 296 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_achievement' to file `./KartRiderRushPlus3/t_conf_achievement.exp` (1 indexes) 297 xtrabackup: name=PRIMARY, id.low=784, page=3 298 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_pve' to file `./KartRiderRushPlus3/t_conf_pve.exp` (1 indexes) 299 xtrabackup: name=PRIMARY, id.low=952, page=3 300 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_oil_money' to file `./KartRiderRushPlus3/t_conf_oil_money.exp` (1 indexes) 301 xtrabackup: name=PRIMARY, id.low=810, page=3 302 xtrabackup: export metadata of table 'KartRiderRushPlus3/user_extend' to file `./KartRiderRushPlus3/user_extend.exp` (1 indexes) 303 xtrabackup: name=PRIMARY, id.low=897, page=3 304 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_questionnaire' to file `./KartRiderRushPlus3/t_conf_questionnaire.exp` (1 indexes) 305 xtrabackup: name=PRIMARY, id.low=817, page=3 306 xtrabackup: export metadata of table 'KartRiderRushPlus3/face_img' to file `./KartRiderRushPlus3/face_img.exp` (1 indexes) 307 xtrabackup: name=PRIMARY, id.low=769, page=3 308 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_mall' to file `./KartRiderRushPlus3/t_conf_mall.exp` (1 indexes) 309 xtrabackup: name=PRIMARY, id.low=805, page=3 310 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_pve_ai' to file `./KartRiderRushPlus3/t_conf_pve_ai.exp` (1 indexes) 311 xtrabackup: name=PRIMARY, id.low=814, page=3 312 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_world_pve' to file `./KartRiderRushPlus3/t_user_world_pve.exp` (1 indexes) 313 xtrabackup: name=PRIMARY, id.low=964, page=3 314 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_shop' to file `./KartRiderRushPlus3/t_conf_shop.exp` (1 indexes) 315 xtrabackup: name=PRIMARY, id.low=819, page=3 316 xtrabackup: export metadata of table 'KartRiderRushPlus3/status_log' to file `./KartRiderRushPlus3/status_log.exp` (1 indexes) 317 xtrabackup: name=PRIMARY, id.low=772, page=3 318 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_hot_time' to file `./KartRiderRushPlus3/t_conf_hot_time.exp` (1 indexes) 319 xtrabackup: name=PRIMARY, id.low=795, page=3 320 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_pve_award' to file `./KartRiderRushPlus3/t_conf_pve_award.exp` (1 indexes) 321 xtrabackup: name=PRIMARY, id.low=815, page=3 322 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_mail_box' to file `./KartRiderRushPlus3/t_mail_box.exp` (2 indexes) 323 xtrabackup: name=PRIMARY, id.low=840, page=3 324 xtrabackup: name=key_user_idx, id.low=958, page=26 325 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_device' to file `./KartRiderRushPlus3/t_user_device.exp` (2 indexes) 326 xtrabackup: name=PRIMARY, id.low=860, page=3 327 xtrabackup: name=IX_user_device_user_idx, id.low=861, page=4 328 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_item_log' to file `./KartRiderRushPlus3/t_user_item_log.exp` (1 indexes) 329 xtrabackup: name=PRIMARY, id.low=868, page=3 330 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_admin_user_ping_log' to file `./KartRiderRushPlus3/t_admin_user_ping_log.exp` (1 indexes) 331 xtrabackup: name=PRIMARY, id.low=775, page=3 332 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_point_log' to file `./KartRiderRushPlus3/t_user_point_log.exp` (2 indexes) 333 xtrabackup: name=PRIMARY, id.low=878, page=3 334 xtrabackup: name=UN_t_user_point_log_stat_date_user_idx, id.low=879, page=4 335 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_user_level' to file `./KartRiderRushPlus3/t_conf_user_level.exp` (1 indexes) 336 xtrabackup: name=PRIMARY, id.low=829, page=3 337 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_item_skill_upgrade_log' to file `./KartRiderRushPlus3/t_item_skill_upgrade_log.exp` (1 indexes) 338 xtrabackup: name=PRIMARY, id.low=837, page=3 339 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_treasure' to file `./KartRiderRushPlus3/t_conf_treasure.exp` (1 indexes) 340 xtrabackup: name=PRIMARY, id.low=826, page=3 341 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_rp_item' to file `./KartRiderRushPlus3/t_conf_rp_item.exp` (1 indexes) 342 xtrabackup: name=PRIMARY, id.low=818, page=3 343 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_kart_ranking' to file `./KartRiderRushPlus3/t_user_kart_ranking.exp` (1 indexes) 344 xtrabackup: name=PRIMARY, id.low=965, page=3 345 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_composition_log' to file `./KartRiderRushPlus3/t_composition_log.exp` (1 indexes) 346 xtrabackup: name=PRIMARY, id.low=783, page=3 347 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_vip' to file `./KartRiderRushPlus3/t_conf_vip.exp` (1 indexes) 348 xtrabackup: name=PRIMARY, id.low=830, page=3 349 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_prohibit_str' to file `./KartRiderRushPlus3/t_conf_prohibit_str.exp` (1 indexes) 350 xtrabackup: name=PRIMARY, id.low=811, page=3 351 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_pve_point' to file `./KartRiderRushPlus3/t_conf_pve_point.exp` (1 indexes) 352 xtrabackup: name=PRIMARY, id.low=963, page=3 353 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_skill' to file `./KartRiderRushPlus3/t_conf_skill.exp` (1 indexes) 354 xtrabackup: name=PRIMARY, id.low=820, page=3 355 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_notice' to file `./KartRiderRushPlus3/t_conf_notice.exp` (1 indexes) 356 xtrabackup: name=PRIMARY, id.low=809, page=3 357 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_mall' to file `./KartRiderRushPlus3/t_user_mall.exp` (2 indexes) 358 xtrabackup: name=PRIMARY, id.low=872, page=3 359 xtrabackup: name=user_idx_item_idx, id.low=873, page=4 360 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_charge' to file `./KartRiderRushPlus3/t_user_charge.exp` (1 indexes) 361 xtrabackup: name=PRIMARY, id.low=859, page=3 362 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_admin_section_record' to file `./KartRiderRushPlus3/t_admin_section_record.exp` (1 indexes) 363 xtrabackup: name=PRIMARY, id.low=774, page=3 364 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_order' to file `./KartRiderRushPlus3/t_order.exp` (1 indexes) 365 xtrabackup: name=PRIMARY, id.low=846, page=3 366 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_game_item_probability' to file `./KartRiderRushPlus3/t_conf_game_item_probability.exp` (1 indexes) 367 xtrabackup: name=PRIMARY, id.low=793, page=3 368 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_sport' to file `./KartRiderRushPlus3/t_conf_sport.exp` (1 indexes) 369 xtrabackup: name=PRIMARY, id.low=824, page=3 370 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_game_item_treasure_log' to file `./KartRiderRushPlus3/t_game_item_treasure_log.exp` (1 indexes) 371 xtrabackup: name=PRIMARY, id.low=835, page=3 372 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_point' to file `./KartRiderRushPlus3/t_user_point.exp` (2 indexes) 373 xtrabackup: name=PRIMARY, id.low=876, page=3 374 xtrabackup: name=IX_t_user_point_point_last_update_time, id.low=877, page=4 375 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_login_reward' to file `./KartRiderRushPlus3/t_conf_login_reward.exp` (1 indexes) 376 xtrabackup: name=PRIMARY, id.low=803, page=3 377 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_mall_package' to file `./KartRiderRushPlus3/t_conf_mall_package.exp` (1 indexes) 378 xtrabackup: name=PRIMARY, id.low=806, page=3 379 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_order_notify_log' to file `./KartRiderRushPlus3/t_order_notify_log.exp` (1 indexes) 380 xtrabackup: name=PRIMARY, id.low=847, page=3 381 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_item_count_log' to file `./KartRiderRushPlus3/t_user_item_count_log.exp` (1 indexes) 382 xtrabackup: name=PRIMARY, id.low=867, page=3 383 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_egg' to file `./KartRiderRushPlus3/t_user_egg.exp` (1 indexes) 384 xtrabackup: name=PRIMARY, id.low=862, page=3 385 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_item_upgrade_log' to file `./KartRiderRushPlus3/t_item_upgrade_log.exp` (1 indexes) 386 xtrabackup: name=PRIMARY, id.low=838, page=3 387 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_pve_detail' to file `./KartRiderRushPlus3/t_user_pve_detail.exp` (2 indexes) 388 xtrabackup: name=PRIMARY, id.low=881, page=3 389 xtrabackup: name=key_user_idx, id.low=959, page=50 390 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_guide' to file `./KartRiderRushPlus3/t_conf_guide.exp` (1 indexes) 391 xtrabackup: name=PRIMARY, id.low=794, page=3 392 xtrabackup: export metadata of table 'KartRiderRushPlus3/prohibit_str' to file `./KartRiderRushPlus3/prohibit_str.exp` (1 indexes) 393 xtrabackup: name=GEN_CLUST_INDEX, id.low=770, page=3 394 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_decomposition_log' to file `./KartRiderRushPlus3/t_decomposition_log.exp` (1 indexes) 395 xtrabackup: name=PRIMARY, id.low=832, page=3 396 xtrabackup: export metadata of table 'KartRiderRushPlus3/temp_kart_ranking_params' to file `./KartRiderRushPlus3/temp_kart_ranking_params.exp` (2 indexes) 397 xtrabackup: name=PRIMARY, id.low=966, page=3 398 xtrabackup: name=item_idx item_level item_control_level, id.low=967, page=4 399 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_track_definition' to file `./KartRiderRushPlus3/t_conf_track_definition.exp` (1 indexes) 400 xtrabackup: name=PRIMARY, id.low=825, page=3 401 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_kart_system_group' to file `./KartRiderRushPlus3/t_conf_kart_system_group.exp` (1 indexes) 402 xtrabackup: name=PRIMARY, id.low=801, page=3 403 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_silver_log' to file `./KartRiderRushPlus3/t_user_silver_log.exp` (1 indexes) 404 xtrabackup: name=PRIMARY, id.low=892, page=3 405 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_kart_definition' to file `./KartRiderRushPlus3/t_conf_kart_definition.exp` (1 indexes) 406 xtrabackup: name=PRIMARY, id.low=799, page=3 407 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_tsi_transaction_sync_error' to file `./KartRiderRushPlus3/t_tsi_transaction_sync_error.exp` (1 indexes) 408 xtrabackup: name=PRIMARY, id.low=851, page=3 409 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_buy_shop_log' to file `./KartRiderRushPlus3/t_buy_shop_log.exp` (1 indexes) 410 xtrabackup: name=PRIMARY, id.low=782, page=3 411 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_skill_random' to file `./KartRiderRushPlus3/t_conf_skill_random.exp` (1 indexes) 412 xtrabackup: name=PRIMARY, id.low=821, page=3 413 xtrabackup: export metadata of table 'KartRiderRushPlus3/user_login_daily' to file `./KartRiderRushPlus3/user_login_daily.exp` (2 indexes) 414 xtrabackup: name=PRIMARY, id.low=899, page=3 415 xtrabackup: name=user_idx, id.low=900, page=4 416 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_match_item' to file `./KartRiderRushPlus3/t_conf_match_item.exp` (1 indexes) 417 xtrabackup: name=GEN_CLUST_INDEX, id.low=807, page=3 418 xtrabackup: export metadata of table 'KartRiderRushPlus3/cdk' to file `./KartRiderRushPlus3/cdk.exp` (1 indexes) 419 xtrabackup: name=PRIMARY, id.low=767, page=3 420 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_prohibit_str_old' to file `./KartRiderRushPlus3/t_conf_prohibit_str_old.exp` (1 indexes) 421 xtrabackup: name=GEN_CLUST_INDEX, id.low=812, page=3 422 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_egg' to file `./KartRiderRushPlus3/t_conf_egg.exp` (1 indexes) 423 xtrabackup: name=PRIMARY, id.low=791, page=3 424 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_attribute_point' to file `./KartRiderRushPlus3/t_conf_attribute_point.exp` (1 indexes) 425 xtrabackup: name=PRIMARY, id.low=785, page=3 426 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_manager_status_log' to file `./KartRiderRushPlus3/t_manager_status_log.exp` (1 indexes) 427 xtrabackup: name=PRIMARY, id.low=841, page=3 428 xtrabackup: export metadata of table 'KartRiderRushPlus3/users_buy_oil_money_info' to file `./KartRiderRushPlus3/users_buy_oil_money_info.exp` (1 indexes) 429 xtrabackup: name=PRIMARY, id.low=901, page=3 430 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_pvp' to file `./KartRiderRushPlus3/t_user_pvp.exp` (6 indexes) 431 xtrabackup: name=PRIMARY, id.low=885, page=3 432 xtrabackup: name=pvp_point, id.low=886, page=4 433 xtrabackup: name=pvp_point_team, id.low=887, page=5 434 xtrabackup: name=pvp_point_speed, id.low=888, page=6 435 xtrabackup: name=temp_pvp_point_total, id.low=889, page=7 436 xtrabackup: name=pvp_point_total, id.low=890, page=8 437 xtrabackup: export metadata of table 'KartRiderRushPlus3/test' to file `./KartRiderRushPlus3/test.exp` (1 indexes) 438 xtrabackup: name=PRIMARY, id.low=896, page=3 439 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_sport' to file `./KartRiderRushPlus3/t_user_sport.exp` (2 indexes) 440 xtrabackup: name=PRIMARY, id.low=893, page=3 441 xtrabackup: name=user_idx sport_idx, id.low=894, page=4 442 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_pve' to file `./KartRiderRushPlus3/t_user_pve.exp` (2 indexes) 443 xtrabackup: name=PRIMARY, id.low=880, page=3 444 xtrabackup: name=key_user_idx, id.low=961, page=39 445 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_mail' to file `./KartRiderRushPlus3/t_conf_mail.exp` (1 indexes) 446 xtrabackup: name=PRIMARY, id.low=804, page=3 447 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_item' to file `./KartRiderRushPlus3/t_conf_item.exp` (1 indexes) 448 xtrabackup: name=PRIMARY, id.low=945, page=3 449 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_item' to file `./KartRiderRushPlus3/t_user_item.exp` (2 indexes) 450 xtrabackup: name=PRIMARY, id.low=864, page=3 451 xtrabackup: name=key_user_idx, id.low=960, page=39 452 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_match_room_log' to file `./KartRiderRushPlus3/t_match_room_log.exp` (1 indexes) 453 xtrabackup: name=PRIMARY, id.low=844, page=3 454 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_mission' to file `./KartRiderRushPlus3/t_user_mission.exp` (3 indexes) 455 xtrabackup: name=PRIMARY, id.low=875, page=3 456 xtrabackup: name=idx_user_id, id.low=943, page=52 457 xtrabackup: name=key_user_idx, id.low=956, page=16418 458 xtrabackup: export metadata of table 'KartRiderRushPlus3/user_login_continuous' to file `./KartRiderRushPlus3/user_login_continuous.exp` (1 indexes) 459 xtrabackup: name=PRIMARY, id.low=898, page=3 460 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_achievement' to file `./KartRiderRushPlus3/t_user_achievement.exp` (2 indexes) 461 xtrabackup: name=PRIMARY, id.low=854, page=3 462 xtrabackup: name=user_idx_achievement_idx, id.low=855, page=4 463 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_treasure_in_item' to file `./KartRiderRushPlus3/t_conf_treasure_in_item.exp` (1 indexes) 464 xtrabackup: name=PRIMARY, id.low=828, page=3 465 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_friend_info' to file `./KartRiderRushPlus3/t_friend_info.exp` (2 indexes) 466 xtrabackup: name=PRIMARY, id.low=833, page=3 467 xtrabackup: name=user_idx, id.low=834, page=4 468 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_vip' to file `./KartRiderRushPlus3/t_user_vip.exp` (1 indexes) 469 xtrabackup: name=PRIMARY, id.low=895, page=3 470 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_face' to file `./KartRiderRushPlus3/t_conf_face.exp` (1 indexes) 471 xtrabackup: name=PRIMARY, id.low=968, page=3 472 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_match_room_session' to file `./KartRiderRushPlus3/t_match_room_session.exp` (1 indexes) 473 xtrabackup: name=PRIMARY, id.low=845, page=3 474 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_conf_item_fall_address' to file `./KartRiderRushPlus3/t_conf_item_fall_address.exp` (1 indexes) 475 xtrabackup: name=PRIMARY, id.low=797, page=3 476 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_match_player_log' to file `./KartRiderRushPlus3/t_match_player_log.exp` (1 indexes) 477 xtrabackup: name=PRIMARY, id.low=953, page=3 478 xtrabackup: export metadata of table 'KartRiderRushPlus3/users_cdk' to file `./KartRiderRushPlus3/users_cdk.exp` (1 indexes) 479 xtrabackup: name=PRIMARY, id.low=902, page=3 480 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_pve_ranking' to file `./KartRiderRushPlus3/t_user_pve_ranking.exp` (2 indexes) 481 xtrabackup: name=PRIMARY, id.low=883, page=3 482 xtrabackup: name=idx, id.low=884, page=4 483 xtrabackup: export metadata of table 'KartRiderRushPlus3/t_user_item_strengthen_log' to file `./KartRiderRushPlus3/t_user_item_strengthen_log.exp` (1 indexes) 484 xtrabackup: name=PRIMARY, id.low=869, page=3 485 xtrabackup: Last MySQL binlog file position 975078992, file name mysql-bin.000053 486 487 xtrabackup: starting shutdown with innodb_fast_shutdown = 0 488 InnoDB: FTS optimize thread exiting. 489 InnoDB: Starting shutdown... 490 InnoDB: Shutdown completed; log sequence number 170485952319 491 xtrabackup: using the following InnoDB configuration for recovery: 492 xtrabackup: innodb_data_home_dir = ./ 493 xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend 494 xtrabackup: innodb_log_group_home_dir = ./ 495 xtrabackup: innodb_log_files_in_group = 2 496 xtrabackup: innodb_log_file_size = 268435456 497 InnoDB: Using atomics to ref count buffer pool pages 498 InnoDB: The InnoDB memory heap is disabled 499 InnoDB: Mutexes and rw_locks use GCC atomic builtins 500 InnoDB: Memory barrier is not used 501 InnoDB: Compressed tables use zlib 1.2.3 502 InnoDB: Using CPU crc32 instructions 503 InnoDB: Initializing buffer pool, size = 100.0M 504 InnoDB: Completed initialization of buffer pool 505 InnoDB: Setting log file ./ib_logfile101 size to 256 MB 506 InnoDB: Progress in MB: 100 200 507 InnoDB: Setting log file ./ib_logfile1 size to 256 MB 508 InnoDB: Progress in MB: 100 200 509 InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 510 InnoDB: New log files created, LSN=170485952319 511 InnoDB: Highest supported file format is Barracuda. 512 InnoDB: 128 rollback segment(s) are active. 513 InnoDB: Waiting for purge to start 514 InnoDB: 5.6.24 started; log sequence number 170485952524 515 xtrabackup: starting shutdown with innodb_fast_shutdown = 0 516 InnoDB: FTS optimize thread exiting. 517 InnoDB: Starting shutdown... 518 InnoDB: Shutdown completed; log sequence number 170485952534 519 151111 16:04:07 completed OK!
这时,在全备目录下数据库目录中多生成了.cfg和.exp两个文件,如下:
root > ll -rw-r--r-- 1 root root 490 Nov 11 16:04 users_cdk.cfg -rw-r--r-- 1 root root 16384 Nov 11 16:04 users_cdk.exp -rw-rw---- 1 root root 8640 Jul 23 15:57 users_cdk.frm -rw-rw---- 1 root root 98304 Jul 24 16:07 users_cdk.ibd
2、还原指定的t_user_session表数据:
- 需要在目标库中手工建好与源数据库一致的表结构:(省)
- discard t_user_session表空间:
mysql> ALTER TABLE t_user_session DISCARD TABLESPACE; Query OK, 0 rows affected (0.01 sec)
- 从备份目录复制.cfg .ibd文件到目标服务器数据库目录
[root@1.1.1.1]# cp t_user_session.ibd t_user_session.cfg /data/mysql/data/test/ [root@1.1.1.1]#
- 进入到MySQL之后Import表空间
mysql> ALTER TABLE t_user_session import TABLESPACE; ERROR 1815 (HY000): Internal error: Cannot reset LSNs in table '"test"."t_user_session"' : Tablespace not found --该错误是由于数据文件所属权限问题,需要改为mysql用户,比如: -rw-r--r--1 root root 719 Nov 11 16:59 t_user_session.cfg -rw-rw----1 mysql mysql 8792 Nov 11 16:58 t_user_session.frm -rw-r-----1 root root 813694976 Nov 11 16:59 t_user_session.ibd --再次导入表空间 mysql> ALTER TABLE t_user_session import TABLESPACE; Query OK, 0 rows affected (1 min 22.51 sec)
这时数据就还原完成了,比mysqldump抽取大文件快多了吧。
mysql> select * from t_user_session limit 10; +------------------+----------+---------------------+---------------------+-------------+----------------------+ | user_session_idx | user_idx | login_time | logout_time | logout_type | client_ip | +------------------+----------+---------------------+---------------------+-------------+----------------------+ | 1 | 1 | 2015-07-24 16:25:13 | 2015-07-24 16:27:19 | LOGOUT | ******************* | | 2 | 2 | 2015-07-24 16:26:16 | 2015-07-24 16:27:51 | LOGOUT | ******************* | | 3 | 2 | 2015-07-24 16:30:15 | 2015-07-24 16:30:41 | LOGOUT | ******************* | | 4 | 2 | 2015-07-24 16:32:08 | 2015-07-24 16:33:49 | LOGOUT | ******************** | | 5 | 2 | 2015-07-24 16:33:56 | 2015-07-24 16:34:32 | LOGOUT | ******************** | | 6 | 2 | 2015-07-24 16:35:34 | 2015-07-24 16:37:16 | LOGOUT | ******************** | | 7 | 2 | 2015-07-24 16:37:29 | 2015-07-24 16:37:55 | LOGOUT | ******************** | | 8 | 2 | 2015-07-24 16:37:55 | 2015-07-24 16:38:41 | LOGOUT | ******************** | | 9 | 2 | 2015-07-24 16:38:48 | 2015-07-24 16:40:18 | LOGOUT | ******************** | | 10 | 2 | 2015-07-24 16:41:19 | 2015-07-24 16:42:25 | LOGOUT | ******************** | +------------------+----------+---------------------+---------------------+-------------+----------------------+ 10 rows in set (0.00 sec)
【注意点】:
- 在复制备份文件的时候一定要复制后缀cfg文件,否则在Import的时候就会报Warning.例如如下的信息:
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1810 | InnoDB: IO Read error: (2, No such file or directory)
Error opening './test/t.cfg', will attempt to import without schema
verification |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
cfg文件的用处主要是在MySQL5.6执行"Flush Table xxx
Export;"之后使.ibd文件保持一致性,同时这个文件会生成一个.cfg文件,在做Import的时候会对导入过程进行校验,但是在
MySQL5.6.8版本之后也不是必须要有.cfg文件.如果真没有,在导入的时候有可能就会报出上面的错误,所以为了安全还是复制它.
- 如果表有外键在Discard的时候执行如下命令:set FOREIGN_KEY_CHECKS=0; 在Import表之后执行以下命令恢复外键检查:set FOREIGN_KEY_CHECKS=1;
- 从备份目录复制.cfg .ibd文件到目标服务器数据库目录后,别忘了查看文件所属权限,否则报如下错误:ERROR 1815 (HY000): Internal error: Cannot reset LSNs in table '"test"."t_user_session"' : Tablespace not found
四、相关备份脚本
下面提供两个shell写的备份脚本,是转网友的,个人觉得写的挺全的,给大家参考:
1、全备shell脚本
1 #!/bin/bash 2 user='root' 3 passwd='root' 4 database=test 5 my_config='/etc/my.cnf' 6 backup_dir='/data/backup/fullbackup' 7 log=$database-$(date +%Y%m%d%H%M).log 8 str=$database-$(date +%Y%m%d%H%M).tar.gz 9 10 echo "Start to backup at $(date +%Y%m%d%H%M)" >> /data/backup/fullbackup/$log 11 if [ ! -d "$backup_dir" ];then 12 mkdir -p $backup_dir 13 fi 14 /data/mysql/bin/innobackupex --defaults-file=$my_config --user=$user --password=$passwd --database=$database --stream=tar $backup_dir 2>$backup_dir/$log | gzip >$backup_dir/ 15 16 $str 17 if [ $? -eq 0 ];then 18 echo "Backup is finish! at $(date +%Y%m%d%H%M)" >> /data/backup/fullbackup/$log 19 exit 0 20 else 21 echo "Backup is Fail! at $(date +%Y%m%d%H%M)" >> /data/backup/fullbackup/$log 22 exit 1 23 fi
2、全备加增备
1 #!/bin/bash 2 CONFIG_FILE="/etc/my.cnf" 3 BACKUP_USER="backup" 4 BACKUP_PASSWD="123A456" 5 MYSQL_PORT="99523" 6 MYSQL_HOST="127.0.0.1" 7 BACKUP_BASE="/home/xtr_backup" 8 XTR_BACKUPLOG="/tmp/xtr_mysql_backup.log" 9 DATE_DIR=`date +%Y-%m-%d` 10 SUNDAY_DATE=`date -d "Last sunday" +%Y-%m-%d` 11 DATE_WEEK=`date +%w` 12 DATE_TIME=`date +%Y-%m-%d-%H-%M-%S` 13 14 15 #################################################### 16 #全量备份函数 17 #################################################### 18 function Xtr_full_backup () 19 { 20 if [ -d "${BACKUP_BASE}/full/${DATE_DIR}" ] 21 then 22 rm -rf "${BACKUP_BASE}/full/${DATE_DIR}" 23 fi 24 if [ ! -d "${BACKUP_BASE}/full" ] 25 then 26 mkdir -p "${BACKUP_BASE}/full" 27 fi 28 innobackupex --defaults-file=${CONFIG_FILE} --user=${BACKUP_USER} --password=${BACKUP_PASSWD} --port=${MYSQL_PORT} --host=${MYSQL_HOST} --no-lock --no-timestamp 29 30 "${BACKUP_BASE}/full/${DATE_DIR}" 2>"/tmp/$$full_backup.log" 31 STATS_FULL_LOG=`awk '/innobackupex: completed OK\!/ {print $NF}' "/tmp/$$full_backup.log"` 32 if [ "$STATS_FULL_LOG" != "OK!" ] 33 then 34 echo "行号LINENO; 脚本名称(basename $0); 函数名称FUNCNAME; 时间DATE_TIME; Innobackupex Full Backup Is Fail">>"$XTR_BACKUPLOG" 35 exit 1 36 else 37 echo "行号LINENO; 脚本名称(basename $0); 函数名称FUNCNAME; 时间DATE_TIME; Innobackupex Full Backup Is Ok">>"$XTR_BACKUPLOG" 38 rm -rf "/tmp/$$full_backup.log" 39 fi 40 } 41 42 43 #################################################### 44 #增量备份函数 45 #################################################### 46 function Xtr_inc_backup () 47 { 48 if [ -d "${BACKUP_BASE}/inc/${SUNDAY_DATE}/${DATE_DIR}" ] 49 then 50 rm -rf "${BACKUP_BASE}/inc/${SUNDAY_DATE}/${DATE_DIR}" 51 fi 52 if [ ! -d "${BACKUP_BASE}/inc/${SUNDAY_DATE}" ] 53 then 54 mkdir -p "${BACKUP_BASE}/inc/${SUNDAY_DATE}" 55 fi 56 if [ ! -d "${BACKUP_BASE}/full/${SUNDAY_DATE}" ] 57 then 58 echo "行号LINENO; 脚本名称(basename $0); 函数名称:$FUNCNAME; 时间:$DATE_TIME; Innobackupex Full Dir ${BACKUP_BASE}/full/$SUNDAY_DATE No 59 60 Exit">>"$XTR_BACKUPLOG" 61 exit 1 62 fi 63 innobackupex --defaults-file=${CONFIG_FILE} --user=${BACKUP_USER} --password=${BACKUP_PASSWD} --port=${MYSQL_PORT} --host=${MYSQL_HOST} --no-timestamp --parallel=8 64 65 --incremental --incremental-basedir="${BACKUP_BASE}/full/${SUNDAY_DATE}" "${BACKUP_BASE}/inc/${SUNDAY_DATE}/${DATE_DIR}" 2>"/tmp/$$inc_backup.log" 66 STATS_INC_LOG=`awk '/innobackupex: completed OK\!/ {print $NF}' "/tmp/$$inc_backup.log"` 67 if [ "$STATS_INC_LOG" != "OK!" ] 68 then 69 echo "行号:$LINENO; 脚本名称:$(basename $0); 函数名称:$FUNCNAME; 时间:$DATE_TIME; Innobackupex Inc Backup Is Fail">>"$XTR_BACKUPLOG" 70 exit 1 71 else 72 echo "行号:$LINENO; 脚本名称:$(basename $0); 函数名称:$FUNCNAME; 时间:$DATE_TIME; Innobackupex Inc Backup Is Ok">>"$XTR_BACKUPLOG" 73 rm -rf "/tmp/$$inc_backup.log" 74 fi 75 } 76 77 78 #################################################### 79 #主体备份函数 80 #################################################### 81 function Main () 82 { 83 if [ "${DATE_WEEK}" -eq 0 ] 84 then 85 Xtr_full_backup 86 else 87 Xtr_inc_backup 88 fi 89 exit 0 90 } 91 92 93 #################################################### 94 #开始备份 95 #################################################### 96 Main