Tag Archives: Automatically Backup

#!/bin/bash # sonia 16-nov-05 # backup each mysql db into a different file, rather than one big file # as with –all-databases – will make restores easier OUTPUTDIR=”/var/lib/backup” MYSQLDUMP=”/usr/bin/mysqldump” MYSQL=”/usr/bin/mysql” # clean up any old backups – save space rm “$OUTPUTDIR/*bak” > /dev/null 2>&1 # get a list of databases databases=`$MYSQL -e “SHOW DATABASES;” | […]