Created
June 21, 2018 08:09
-
-
Save mathieuthollet/35740f37a9e855aca17337e4adb1f77e to your computer and use it in GitHub Desktop.
How to do a mysql dump of table filtered by 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 -u {username} -p{password} -N -e 'show tables like "{prefix}\_%"' {dbname} | xargs mysqldump -u {username} --password={password} --single-transaction {dbname} > {filename}.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment