Last active
August 11, 2017 08:14
-
-
Save xuyuji9000/0481060c62d3643c9a6466ce21b02859 to your computer and use it in GitHub Desktop.
Make a full backup of a specific database in mysql
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 | |
DATABASE="forward" | |
mysqldump -u mysqlusernamehere -pmysqlpasswordhere $DATABASE > /mnt/mysql/full/$(date +"%d-%b-%Y")_$(echo $DATABASE).sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
crontab cheetsheet
0 0 * * 0 /root/mydatabasebackupscript.sh