What would be the most efficient way to automatically back up a MySQL Database, gzip it, and e-mail it to a specific account?
I am a bit paranoid about losing my forum's database and I'm usually busy during the week and often forget to do a weekly backup (instead, doing bi-weekly, or monthly, which isn't too bad, but less frequent than I'd like). Having it set up with a cronjob and an e-mail (or FTP/SFTP as I've just realized one of the databases would be too large to attach in an e-mail) would be a lot easier, as well as less prone to me forgetting.
How I'm looking at it now would be:
mysqldump dbname > YYYY-MM-DD_dbname.sql gzip YYYY-MM-DD_dbname.sql Either send YYYY-MM-DD_dbname.sql.gz as an attachment to an e-mail address or {S,}FTP it to another server and send an e-mail letting me know that the backup and transfer was successful.
Is there a better way to accomplish this? Any examples of how you'd accomplish it?