mysqldump multiple/selected tables

June 23, 2009 at 4:27 am (mysql) (, , , , )

This post explains how to dump selected tables only.
The actual syntax being:
mysqldump [ -u ] DATABASE_NAME [TABLES_LIST] > FILE_NAME

So, to dump the entire database use,
mysqldump -u USER_NAME DATABASE_NAME > FILE_NAME

To dump only selected tables use,
mysqldump -u USER_NAME DATABASE_NAME TABLE_1 TABLE_3 TABLE_4 TABLE_9 > FILE_NAME

Advertisements

Permalink 1 Comment