Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

This question already has an answer here:

Is it possible to take backup of certain table in mysql? Suppose I have 10 tables, and I want to take a backup of 8 tables through one command.

How can I do this?

share|improve this question

marked as duplicate by Mat, Paul White, ypercube, Kin, Nick Chammas Sep 30 '13 at 16:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
@Mat - Is mysqldump the only way to backup tables in MySQL? If not, this question should stand as a more general version of what you linked to. –  Nick Chammas Sep 30 '13 at 14:51
    
@NickChammas: that's the "built-in" backup tool that comes with the database itself. (There are of course a host of third-party backup solutions.) –  Mat Sep 30 '13 at 14:54

2 Answers 2

mysqldump -u username -p databasename table1 table2 table3

or

mysqldump --opt -u username -p databasename table1 table2 table3

share|improve this answer

Either you can backup the required tables only in you dump by following command

mysqldump -uuser -ppassword databasename tabletoinclude1 tabletoinclude2... table2include8 > location/fileName.sql

Or you can exclude certain tables from dump by ignore-table option.

mysqldump -uuser -ppassword --ignore-table=db_name.table9 --ignore-table=db_name.table10 db_name > location\fileName.sql
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.