1.在线上创建一个与需备份相同表结构的表
create table table_name_temp as select * from table_name where 1=2;
2.在线上创建一个与需备份表数据相同的表
create table table_name_temp as select * from table_name ; ---注意并不会创建索引
3.把备份表的数据写回到原始表
insert into table_name select * from table_name_temp;
enjoy;