Created
June 5, 2015 21:24
-
-
Save wesliel/49615abcc44e809a2968 to your computer and use it in GitHub Desktop.
Dump DB, add to Git, then commit and push
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
#!/bin/bash | |
DB_FILE=db_name_$(date +%s).sql | |
echo "Dumping DB..." | |
mysqldump DB_NAME -u DB_USER -pDB_PASSWORD > $DB_FILE | |
echo "done" | |
echo "Adding db to git" | |
git add $DB_FILE | |
git commit "add db dump" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment