Created
October 28, 2016 15:15
-
-
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
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 -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