Created
March 20, 2009 03:58
-
-
Save agenteo/82193 to your computer and use it in GitHub Desktop.
mysql database timestamped backup
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_name=$1 | |
date_time=`date +%Y%m%d_%H%M_%S` | |
file_name=${db_name}_${date_time}.sql | |
echo "Dumping the database ${db_name} in ${file_name}..." | |
mysqldump5 ${db_name} --user=root > ${file_name} | |
echo "Sayonara" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment