mysqldump命令恢复单个表,例如:
mysql> show tables;
+-------------------------+ | Tables_in_loldbrtmp10 | +-------------------------+ | b****e | | champion_analyze | | championcombat | | rt***at | | rt***dto | | rt****dto | | rt***aries | | rt***ner | | rt***to | | rt***dto | | s** | | v***olo | +-------------------------+ 12 rows in set (0.00 sec)
mysqldump文件中就是按照上面的表来排序的!
mysql> select count(*) from champion_analyze; ##查看该表的记录数,为了和后面恢复单表做对比,如果记录数一致,说明恢复正常。
+----------+ | count(*) | +----------+ | 75562 | +----------+ 1 row in set (0.18 sec)
说明: awk '/^-- Table structure for table `champion_analyze`/,/^-- Table structure for table `championcombat`/{print}' loldbrtmp10_20130924.sql > /home/liuxiaojie/loldbrtmp10_champion_analyze.sql
[root@jbxue liuxiaojie]# du -sh loldbrtmp10_champion_analyze.sql
导入后核实,表的记录数! 显然记录数一致,则表示恢复正常! (责任编辑:IT) |