partial table dump using mysqldump

There are times when you only want to take partial dump of a mysql table. You can use mysqldump command with one extra option “–where”. You will have to provide your where clause (partial dump condition) in the “–” where option.

Below is the command to take a partial dump of a table.

mysqldump -u [username] -p  [databasename] [mytablename] --where  " mycolumn = 'somevalue' " > filename.sql

Related Posts:
1. MySQL dump in XML format.
2. MySQL general query logs.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s