Last active
January 28, 2016 02:49
-
-
Save suxiaogang/a6ed82128534ca5751f8 to your computer and use it in GitHub Desktop.
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
| #!/bin/sh | |
| #================================================ | |
| # backup mysql | |
| #================================================ | |
| # set up all the mysqldump options | |
| FILE=backup_`date +"%Y%m%d_%H_%M"`_structure.sql | |
| DATABASE=DBNAME | |
| USER=root | |
| PASS=root | |
| # set up mysqldump | |
| mysqldump --user=${USER} --password=${PASS} -d --database ${DATABASE} > /mysql_bak/${FILE} | |
| echo "Successfully ~;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment