Created
August 30, 2013 22:04
-
-
Save jbonney/6394749 to your computer and use it in GitHub Desktop.
MySQL dump to export data only (no DB schema nor table instructions). Particularly useful when exporting a Rails DB to re-import it afterwards in a DB that has been created through `rake db:drop db:create db:migrate`.
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
mysqldump --user="username" --password="password" --skip-triggers --compact --no-create-info --ignore-table="database_name.schema_migrations" --ignore-table="database_name.table_populated_through_migration" "database_name" > "dump.sql" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably also add
--ignore-table="database_name.ar_internal_metadata"
these days.