Return of the Blog

It’s back! and now it’s harder to kill!

I’ve implemented a simple backup routine for my blog’s database. A script now runs every day and sends the database dump to an email account on a different server. I may change it to send it somewhere else when the file is bigger but for now it can stay like that.

The script I used looks like this:

#!/bin/bash mysqldump -B my_db --password=my_pass | mail -s "BACKUP MySQL" me@example.com;

To automatically run the script each day I put an entry in the crontab this can be done using the command “crontab -e” and doing the appropriate incantations.

Below is what my crontab entry looks like.

0 12 * * 1-7 ~/bin/db_backup.sh

Comments