Hi garywilliams,
It’s generally not a great idea to store your backups the same place your files are. If there is data loss, you’ll lose both the backups and the files. Backups should be stored remotely so in that regards, using Dropbox is a good solution.
Using Dropbox to backup your date
Download Dropbox to the server
64-bit: cd ~ && wget -O – “https://www.dropbox.com/download?plat=lnx.x86_64” | tar xzf –
Run the dropbox daemon
~/.dropbox-dist/dropboxd
Running it for the first time, running the daemon will say something like
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=6bc8fb27643bc6c1d91264afe135f2ba to link this device.
Visit the link from your browser and link your server with your dropbox account. Once you do, your Dropbox folder will be created in your home directory.
~/Dropbox
Now you have Dropbox configured on the server. To actually backup your databases to Dropbox, change your script to dump the .sql file in your ~/Dropbox folder. From there, your files will be automatically synced with your account.
You can set a cron job to do that for you as well.
That’s it!
Kind regards,
Kalin D.