I had been looking for a secured and fast way to upload copy of my website’s backup regularly on a specified interval, to my DropBox account.
This way, I wanted to feel secured with an additional copy stored at Dropbox which can be retrieved in case of need, with minimum dataloss.
Here the steps:
Login to your Dropbox account
If you don’t already have one. Click Create a new Dropbox Account
Create Your Ap
Now visit https://www.dropbox.com/developers and click on “Create Your App”
Download Bash Script
Clone the repository using git (recommended):
git clone https://github.com/andreafabrizi/Dropbox-Uploader.git
or download the script manually using this command say under myscripts folder :
curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" -o dropbox_uploader.sh
Then give the execution permission to the script and run it:
$chmod +x dropbox_uploader.sh $./dropbox_uploader.sh
The first time you run dropbox_uploader (you can also use bash dropbox_uploader.sh), you’ll be guided through a wizard in order to configure access to your Dropbox.
Use the value
This configuration will be stored in ~/.dropbox_uploader.
Install any backup utility
I personally prefer Akeeba backup for Joomla as well as WordPress. Take the backup and use the following command to upload the backup file using command line from within the script folder where the dropbox_uploader.sh file is located
bash dropbox_uploader.sh upload PATH_TO_THE_BACKUP_FOLDER/*.jpa ./
Your backup file (.jpa file in case you are using Akeeba Backup) gets uploaded on the Dropbox folder
You can use cron to upload the backup to your Dropbox account at a regular interval.
- Read more about how to Automate Akeeba backup using Joomla and WordPress