This is a tutorial how to setup automatic periodical backuping MySQL database to Dropbox service.

Assuming you have properly configured dropbox on your linux, you just need to do backup of database and copy it to ~/Dropbox directory. Then let dropbox deamon to sync it with remote storage.

This is my BASH script to acomplish this:

Script perform backup of all databases and compress it to file named with actual date, after that will move file to ~/Dropbox directory and finally check if dropbox deamon is running and if not start it.

Now we can use cron to periodicaly run this script. On debian copy script to eg. /etc/cron.weekly/ (for weekly backup intervals) and don’t forget to add execute permission and remove read permission to others on script.

This is one from many simple backup solution, there is of course big space for improvements.