Back up your mySQL database with Perl and sendmail
I just wrote a Perl script to make backups of a mySQL database and email them to me whenever the content of the database changes. This ought to be useful for websites where the database doesn’t change too often. If you use a cron job to run this script once every 24 hours, then it will email you a backup copy of your database whenever anything has changed.
This script stores a gzipped dump of your database in a private folder which should only be accessible to you (If you don’t have a private folder, you can make one by CHMODding a folder with permissions of 700).
You might also find this to be a useful example of how to use Perl and sendmail to send an attachment by email.