0

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?

2
  • @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. Commented Sep 30, 2013 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
    Commented Sep 30, 2013 at 14:54

2 Answers 2

0
mysqldump -u username -p databasename table1 table2 table3

or

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

0

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

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