Every website should have a regular backup that has been tested to proove that it is working, so when something goes wrong you can simply restore the files or data.

One of the most popular Joomla extensions is Akeeba Backup, which I personally use on every Joomla website I create. This software not only does an excellent job at backing up your Joomla site, but it also has the ability to automate this backup, so you really have no excuse for not backing up your site. Both the free version and the professional version have the ability to schedule a regular front end backup using a cron job, which is what I'm going to demonstrate in this blog.

The first step to configure your automatic backup, it to click on options and enable the front end backup.

1

Click on the Front-end backup tab, select yes for the enable front-end and remote backup, and enter a secret word. The secret word can be any combination of letters and numbers, and is used to prevent other people triggering your site backup, because without this a hacker could potentially break your site by running multiple backups until your hosting account ran out of disk space.

2

Save and close this, and now open up your CPanel provided by your web host. Most good web hosts have a "Cron jobs" section, and this is where we can schedule the automatic backup.

3

The frequency of your backup is really dependant on your site, for a basic site that doesn't update very often you should at least do a monthly backup. Some sites you may want to back up weekly, whereas others may require daily backups. If in doubt, I recommend a weekly backup. Now this is the confusing bit, as cron jobs can be a bit complex, but in this case I'm going to go the easy option and just select a daily backup (once a day) from the common settings menu, which fills out the minute, hour, day, month and weekday boxes automatically.

In the command box is where we copy and paste our cron job, in this case using SiteGround web host the command:

curl -b /tmp/cookies.txt -c /tmp/cookies.txt -L --max-redirs 1000 -v "http://www.yourwebsite.com/index.php?option=com_akeeba&view=backup&key=SD09k7VcW6pz"

Where www.yourwebsite.com is the url of your website, and SD09k7VcW6pz is the secret word you typed into your Akeeba Backup options.

4

For web hosts that don't support curl, you can see some alternate cron commands in the Akeeba Backup documentation.

https://www.akeebabackup.com/documentation/akeeba-backup-documentation/automating-your-backup.html

Now if everything went well, you should see a "Frontend" backup appearing on your site each day.

5

 

While automating your backup is a good idea, I also recommend that your backup be stored separately from your website. An easy way to do this is with the Akeeba Backup Professional version, where you can configure your backup to store the files on a Cloud based file storage such as Amazon S3, Dropbox, Google Storage, and many others.

Leave your comments

Post comment as a guest

0
Your comments are subject to administrator's moderation.

People in this conversation

  • Guest - Sallie

    Thanks for the article.
    If your hosting limits cron job use. You may try webcron http://www.easycron.com

  • Here is another tip, if you are using SiteGround, make sure that you select "Access cPanel Securely" when you try to add a CRON job, because otherwise you get a "JSON parse failed" error.

    regards

    Tim

  • Guest - TomEee

    Is it possible to limit the backup versions? I would like to store only the newest four backup files.

  • In the configuration, take a look at the "Maximum backup age, in days" setting. As per the tooltip, "backups older than this number of days will be automatically deleted. Leave the default setting, 31, to keep all backups from the last month".