Created
June 15, 2011 09:00
-
-
Save abhiomkar/1026741 to your computer and use it in GitHub Desktop.
MySQL Backup/Restore Script
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
# Backup using MySQL Dump | |
mysqldump --user=root --password=very_strong_password --database mydb > ~/backups/mydb_backup_$(date '+%F_%H%M%S').sql | |
# Restore | |
mysql --verbose --user=root --password=very_strong_password mydb < ~/backups/mydb_backup_2011-06-15_085322.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment