Setup Dropbox custom destination in cPanel Server
The cPanel backup system provides lots of backup options we can create custom backup transports as well. In a custom backup destination, we can move backups to a remote server of our choice. In this guide, we are going to set up Dropbox custom destination in the cPanel server.
Requirements to Setup Dropbox as a custom destination in cPanel Server :
- WHM based server
- SSH access
- Dropbox account
- Login to your Dropbox account and head to the Developer section and select Create an app.
- Choose API, Full Dropbox – access and choose a name for your app we have used backups.
After adding the details clickCreate App.
- After creating the app you will be redirected to the Settings page of your app. Head to the permissions Tab and grant the permission as shown below and press submit.
- Now head back to the settings tab and copy your App key, App secret and Click on generate Access Token and copy it as well.
Note: By default, the expiration of Access Token is set to short-lived. Please change it to No-expiration otherwise you will have to keep replacing the token.
- Let’s prepare the server for Dropbox. Head to your SSH session and execute the following commands.
sudo yum install perl-LWP-Protocol-https -y sudo cpan CPAN::DistnameInfo sudo cpan WebService::Dropbox
Once the commands are executed the dropbox service should be installed on your server.
- Change your directory to the following.
and GIT clone the following 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 preferred file editor. Add your previously saved Dropbox values in the file.
- Now with the server ready. Let’s configure the WHM. In WHM’s search bar search for
Backup Configurationand Select
Additional Destinationstab. Choose
Customfrom the dropdown menu and click on
Create New Destination.
- Add the details to the next screen as follows.
Script path –
You can add any random strings in Remote host, Username, Password as we are using API directly in the script.
- Click on Save and Validate Destination.
Congratulations you have successfully created a custom backup with destination dropbox.
Want to run an on-demand backup? Force run backups by following the guide here.