If you want to use mysql dump, including the schema, you can do this by following these steps:
create a temporary table:
create table temp_table like name_of_the_original_table;
data duplication in temp_table:
insert into temp_table select * from name_of_the_original_table;
deleting unnecessary fields:
alter table temp_table drop column somecolumn;
post this, you can start mysqldump by running:
mysqldump -u <username> -p <password> databasename temp_table
If you intend to take a data dump (without a schema), you can run the following command:
select * from sometable into outfile '/tmp/datadump' fields terminated by '\t' lines terminated by '\n';
source share