Created
March 6, 2011 03:12
-
-
Save loopj/856993 to your computer and use it in GitHub Desktop.
Script to create mysql backups which will restore quickly
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 | |
echo "SET autocommit=0; | |
SET unique_checks=0; | |
SET foreign_key_checks=0;" > backup.sql | |
mysqldump -u myuser --password=mypassword mydatabase >> backup.sql | |
echo "COMMIT;" >> backup.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment