Skip to content

Instantly share code, notes, and snippets.

@branquito
Created January 28, 2013 01:52
Show Gist options
  • Save branquito/4652199 to your computer and use it in GitHub Desktop.
Save branquito/4652199 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo 'Importing *.sql into database..'
mysql -u user -ppassword dbname < /path/to/site/dbname-git.sql
echo '..done!'
#!/bin/sh
echo 'Dumping of database started..'
mysqldump -u user -ppassword --skip-extended-insert dbname > /path/to/site/dbname-git.sql
echo '..changing into server folder.'
cd /path/to/site/
echo 'git adding *.sql file..'
git add dbname-git.sql
echo '..done!'
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment