Send Database Backup to Your Mailbox with Backup2Mail

Important: This article is outdated. Backup2Mail is moved to its own web site —

Backup and downloading a web site’s database can be really annoying sometimes. It’s something we don’t want to miss, yet we often do. I never lost any of my databases, but I know some guys who unfortunately did.

This PHP script will – with a help of Cron Jobs – backup your MySQL database and send it to specified e-mail address. I suggest creating a separate account, for example, which will be accessed via web mail if needed. If you have really big database, you wouldn’t want to download it every day (or few times a day). Gmail will do in case you don’t have overly sensitive data.

So, without further ado, I’m releasing this life-saving piece of code. Download Backup2Mail. Instructions included.

If you are adventurous type, uncomment the last line in the config.php and feel free to report errors. Also ask in the comments if you run into a trouble.

Marko Dugonjić is a designer specialized in user experience design, web typography and web standards. He runs a nanoscale user interface studio Creative Nights and organizes FFWD.PRO, a micro-conference and workshops for web professionals.

Interested in more content like this?