Dropbox is a fantastic tool for syncing data across multiple physical and virtual locations. You can even set up your WHM server to sync all of your backups to your Dropbox account. 

Prerequisites:

1) A Dropbox account.

2) Root access to a WHM server.

Step one: Create a new cPanel account

The first step is to create a new cPanel account. In our example, we’re using the username of dropbox, but you can use whatever domain and username you would like.

create cpanel dropbox user

create cpanel dropbox user

Step 2: Disable backups for that account.

Ensure that the Dropbox user is not being backed up in the backup user selection interface.

Disable backups for the dropbox cPanel user.

Disable backups for the dropbox user.

 

Step 3: Install and configure Dropbox

Next you want to install the Dropbox client on your new cPanel user’s account. Dropbox provides directions here. We’re going to install the 64 bit daemon, but make sure you chose the one that is right for you. To be clear: this is done via SSH as the cPanel dropbox user, not the root user. Download the tarball, change into that directory, and run the daemon.

dropbox@dropbox.encylia.com [~]# wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
--2014-08-30 22:21:45--  https://dl.dropboxusercontent.com/u/17/dropbox-lnx.x86_64-2.10.28.tar.gz
HTTP request sent, awaiting response... 200 OK
Length: 26857327 (26M) [application/octet-stream]
Saving to: “STDOUT”
100%[==================================================>] 26,857,327  1.42M/s   in 26s
2014-08-30 22:22:12 (1010 KB/s) - written to stdout [26857327/26857327]
dropbox@dropbox.encylia.com [~]# cd .dropbox-dist/
dropbox@dropbox.encylia.com [~/.dropbox-dist]# ./dropboxd
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link?host_id=fc850fb47f00b2b642 to link this device.
dropbox@dropbox.encylia.com [~/.dropbox-dist]#

Take the link that’s provided and paste it into any browser. You will be asked to log in to Dropbox, and that will successfully link your account to the server.  To make administration of your dropbox folder easier, you can download the CLI script that they provide:

dropbox@dropbox.encylia.com [~/.dropbox-dist]# wget -O cli.dropbox.py "https://www.dropbox.com/download?dl=packages/dropbox.py"
dropbox@dropbox.encylia.com [~/.dropbox-dist]# chmod +x cli.dropbox.py

Then you start the daemon:

dropbox@dropbox.encylia.com [~/.dropbox-dist]# ./dropboxd start

Step 4: Configure backup destination

The final step is to configure your backups to write to your newly configured Dropbox folder. Back in WHM, navigate to your backup configuration interface. You want to set your backup destination to your cPanel’s account’s dropbox folder, which you can see on our server:

dropbox@dropbox.encylia.com [~/.dropbox]# pwd
/home/dropbox/.dropbox
dropbox@dropbox.encylia.com [~/.dropbox]#
Update your cPanel backup configuration to your dropbox folder.

Set the WHM backup folder to your dropbox folder.

Finished!

Then you’re all set! Your backups will still be maintained and pruned according to your retention rules. Don’t forget to make sure that your Dropbox account has enough space on it!