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/sh | |
## Make a backup of each mysql db into a separate file. | |
## To backup a single database simply add the db name as a parameter (or multiple db's e.g. "sh db_backup.sh dbaname1 dbaname2"). | |
TIMESTAMP=$(date +"%F") | |
USER="root" | |
PASSWORD="root" | |
OUTPUTDIR="/var/www/sites/#db_backups/$TIMESTAMP" | |
MYSQLDUMP="/usr/bin/mysqldump" | |
MYSQL="/usr/bin/mysql" |