Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jvmvl/6a7f93cee8f4e1a0bd396cd7ffd7d845 to your computer and use it in GitHub Desktop.
Save jvmvl/6a7f93cee8f4e1a0bd396cd7ffd7d845 to your computer and use it in GitHub Desktop.
MySQL dump of tables that begin with a given prefix
mysql database_name -u username -pPassWord -N -e 'show tables like "tableprefix\_%"' | xargs mysqldump database_name --u username -pPassWord > prefixedtable_dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment