Last active
August 29, 2015 14:15
-
-
Save IcyApril/45b5d8996103b31b7281 to your computer and use it in GitHub Desktop.
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 MySQL datbases. | |
# Change -uroot to -u{username} and -ppassword to -p{password}. | |
# Or remove -ppassword if you don't have one. | |
# If you're running this as a cron, remove the .sh extension before putting it in /etc/cron.daily. | |
# DIRBASE is the folder where the database backups will be stored, they will be stored by day of the month. | |
#!/bin/bash | |
DATED=`date +%d` | |
DIRBASE="/var/www/work/mysqlbackups" | |
mysqldump -uroot -ppassword --all-databases > ${DIRBASE}/${DATED}.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment