Created
October 26, 2011 13:24
-
-
Save wheresalice/1316337 to your computer and use it in GitHub Desktop.
Mysqldump of tables with a prefix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql databasename -u [root] -p[password] -e 'show tables like "wp_153_%"' | grep -v Tables_in | |
| xargs mysqldump [databasename] -u [root] -p[password] > [target_file] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try -N -e so you dont need grep