Is there a way like that? Generate a backup via a script on the server and sync it with a folder on DropBox, so I would have a local backup of my database + files on let's say a monthly basis?
Generate the backups with a normal script (I'm going to assume you are on your own server).
Then install the Linux Dropbox app and use it from the CLI via a script?
https://www.dropbox.com/help/9192
https://www.dropbox.com/install?os=lnx
http://www.dropboxwiki.com/tips-and-tricks/using-the-official-dropbox-command-line-interface-cli
You basically move the files into the DropBox directory and they should sync, or you can create symlinks (in the Dropbox directory) to them where they get created.
As for a "monthly" basis, if you mean each month, then you will have to edit a script to move it over, but if it was me I'd simply keep 7 days worth (1 for each day of the week) of the files you have. There are plenty of scripts out there that you can get and modify that will do that for you.
A simple one can be found at
https://servinglinux.com/thread/4-backup-script/. In that one, if you are doing multiple DB's and directory backups then you'd want to have multiple copies of it (one for each DB/site) and then call them via a Cron job. You'd also want to modify the
archive_file="$hostname-$day.zip"
to have the file name prefixed with something like
archive_file="sitename_db-$hostname-$day.zip"
and replace the _db with _site if you do the actual site files separately. In fact, you can actually remove the $hostname from it if you want. I used it when I had multiple servers online and it allowed me to keep up with which went where.