Skip to content

Instantly share code, notes, and snippets.

@mrpatrick
Created October 28, 2016 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrpatrick/d3725335c1294cfef42a0779e63c8ff1 to your computer and use it in GitHub Desktop.
Save mrpatrick/d3725335c1294cfef42a0779e63c8ff1 to your computer and use it in GitHub Desktop.
mysqldump tabels with regex. This is useful if you want to ONLY dump wp_* tables within a larger database. From: http://stackoverflow.com/questions/5268936/mysqldump-only-tables-with-certain-prefix-mysqldump-wildcards
mysql -N -uroot -e 'show tables like "wp\_%"' mydb | xargs mysqldump -uroot mydb > /tmp/wp_tables_prod.20161028.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment