Backup Mautic Database in Dropbox

We’re excited to continue sharing content developed by the Mautic community. This solution and post was developed and written by Joan Nin (Slack: @ninjoan).

Are you looking for ways to make a backup of your Mautic instance fast, easy and automatic? This tutorial will give you the ability to backup your Mautic database to your Dropbox account.

You will need the following:

Dropbox account

Backup script

Cron job

Basic knowledge of the command line (PC) or terminal (Mac)

Step 1: Dropbox Account

Sign-in or create a brand new account with Dropbox then go to https://www.dropbox.com/developers/apps on your web browser, and create a new Dropbox app. Fill in the information of the new app as shown below, and enter the app name use a name that will be easy to you to remember in case you have more apps.

After you have created a new app, you will redirect to new windows and you will see a button with the text Generated access token click and copy the access token.

Step 2: Backup Script

The script we going to use is made by Andrea Fabrizi kudos to this guy. To use Dropbox backup script, download the script and make it executable.

This line will run the backup “At 03:27 on every 15th day-of-month.” you can replace the with the time you prefer. Also this will create a log file with the date that the cron job will run. I think this is a pretty neat option for backup/audit.

And that’s it. A simple, yet effective way to backup your Mautic instance.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

We want to thank our community for offering insight into how they work with Mautic. Do you have a different process for backing up your Mautic instance? Comment below and let us know!

Also, if you’re interested, here’s a quick tutorial video on using CPanel to add a cron job.