I have been using several mysql backup and syncing scripts now for different applications. I decided to combine a few and create a sort of all-in-one backup solution that backs up to a DropBox folder.
It uses the “DropBox Uploader” class from http://jaka.kubje.org/projects/dropbox-uploader/
It backs up multiple databases.
Download here: http://code.google.com/p/php-mysql-dropbox-backup/
Disclaimer: Some of the snippets of code are from existing scripts I have used over the years, so I don’t remember all sources. I this happens to be your code snippet let me know, and I’ll include the proper credits.