Last active
December 22, 2015 06:59
-
-
Save alancoleman/6435250 to your computer and use it in GitHub Desktop.
Simple method for backing up and restoring a database using bash
This file contains hidden or 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 mysqldump | |
mysqldump my_database > database_backups/my_database_backup.dump; | |
// Restore using mysql | |
mysql> create database my_database_restore; | |
mysql> use my_database_restore; | |
mysql> source database_backups/my_database_backup.dump; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment