Skip to content

Instantly share code, notes, and snippets.

@wheresalice
Created October 26, 2011 13:24
Show Gist options
  • Save wheresalice/1316337 to your computer and use it in GitHub Desktop.
Save wheresalice/1316337 to your computer and use it in GitHub Desktop.
Mysqldump of tables with a prefix
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]
@osde8info
Copy link

try -N -e so you dont need grep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment