Dumping a mysql database excluding one or several tables

If we need to dump a MySQL database and want to exclude table(s) we should use the option:

--ignore-table=db_name.tbl_name

Do not dump the given table, which must be specified using both the database and table names. To ignore multiple tables, use this option multiple times. This option also can be used to ignore views. Citation.

Example:

mysqldump --ignore-table=cars.brands cars > cars.dump

References


Posted

in

by

Tags: