Skip to content

Instantly share code, notes, and snippets.

@wrburgess
Created April 20, 2012 16:43
Show Gist options
  • Save wrburgess/2430228 to your computer and use it in GitHub Desktop.
Save wrburgess/2430228 to your computer and use it in GitHub Desktop.
Backup MySQL database and restore updated version

Backup current db

Terminal command:

backup db

Terminal command:

mysqldump -u root -p vibes2 > [filename].sql

Restore new db

Terminal command to pull in code updates:

git pull
Terminal command to pull in new db:
mysql -u root -p vibes2 < thesqlname.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment