Set up Dropbox as a custom backup in cPanel

Set up Dropbox as a custom backup in cPanel

Today we will learn how to set up Dropbox as a custom backup in cPanel. cPanel backup system offers many backup options that we can also create custom backup transport. With a custom backup destination, we can move the backups to a remote server of our choice. In this guide, we are going to set up Dropbox’s custom destination on the cPanel server.

Requirements to setup Dropbox as a custom destination on the cPanel server:

  1. WHM-based servers.
  2. SSH access.
  3. Dropbox account.

Steps:
-Login to your Dropbox account and go to the Developer section and select Create an app.
-Choose API, complete Dropbox – Access, and choose a name for your app that we used for backup. After adding the details click on Create App.

DBX-Platform

-After creating the app you will be redirected to your app’s settings page. Go to the Permission tab and grant permission as shown below and press submit.
dropbox

-Now go back to the settings tab and copy your app key, app secret and click on generate an access token and copy that too.
Note: By default, access token expiration is set to short-lived. Please change it to no-expire otherwise you will need to replace the token.
-Let’s prepare the server for Dropbox. Go to your SSH session and run the following commands.

sudo yum install perl-LWP-Protocol-https -y
sudo cpan CPAN::DistnameInfo
sudo cpan WebService::Dropbox

Once the commands have been executed the Dropbox service should be installed on your server.
Change your directory to the following.

cd /usr/local/src

and clone the following GIT repository.
git clone https://github.com/CpanelInc/backup-transport-dropbox.
-Copy the backup_transport_dropbox.pl file to /usr/local/bin/ or use the following command.

cp -av backup-transport-dropbox/backup_transport_dropbox.pl /usr/local/bin/

-Now edit the moved file using your favorite file editor. Add your previously saved Dropbox values to the file.
GNU
-Now with the server ready. Let’s configure WHM. Search for Backup Configuration in WHM’s search bar and select the Additional Destinations tab. Select Custom from the dropdown menu and click Create New Destination.
-Add details on the following screen.
Script path – /usr/local/bin/backup_transport_dropbox.pl
You can add any random string to the remote host, username, or password as we are using the API directly in the script.
-Click on Save and Validate Destination.
Now you have successfully created a custom backup with destination Dropbox. Learn how to Install NGINX on cPanel/WHM Server. Buy Dedicated Server Hosting from Oudel Inc.

Scroll to Top