Analytic

Tuesday, July 2, 2013

Mysqldump only tables with certain prefix / Mysqldump wildcards

This commans will dump the tables with prefix PREFIX:

mysql DATABASE -u USERNAME -p -e 'show tables like "PREFIX%"' | grep -v Tables_in | xargs mysqldump DATABASE -u USERNAME -p > DUMP.sql

No comments: