09 October, 2014

Best practices for maintaining Joomla website - part 2

Automatically backup your website in 3 minutes

In the first part of this Joomla Educational series, we provided some highly effective tips for choosing Hosting and Email service. In this blog, we will help you to automate your website backup in just 3 minutes using one single command.

automate your website backup in just 3 minutes
Automate your website backup in just 3 minutes

Tough times never comes alone and no one wants to face this, but it may happen to anybody that your site get hacked, your server get crashed or anything get wrong to your server.

No one can be 100% safe on Internet but if you follow “Alert today. Alive tomorrow.”, means that any of the failures may not cost you any loss of data (assuming your backups are 100% up-to-date).

Its a best practice to backup your websites. The most important tip about backup is to keep it safe. When we talk about backup of your website then it covers 2 things ie Files and databases.

With backup procurement, there are so many hidden questions arises :-

How frequently should backup be taken or delete ?

In today’s era, Joomla is one of the best options for creating dynamic websites and as you know in dynamic website things get change in a flip.

Backing up database is little more challenging, as database changes very frequently (mostly every few minutes). So its better we backup our database every 30 minutes.

Once an approach is established it is imperative to test data restoration periodically to ensure that files are properly backup and that they have not been corrupted during transportation or compression.

You need to also delete backups which are no more required to avoid large accumulation of backup. You should delete backups older than a week.

What to Back up and where to store these back up ?

Backing up is one of the most important things to do when running a website, it includes your files, database, entire website or even your server machine like snapshot of current machine. In short -

"Anything that you cannot afford to lose should, be backed up."


Should place multiple copies of backup at your local as well as remote server. Therefore you must move your backups off-site, to manage it properly. In case, your website got hacked or your server crashed, your backups will remain safe.

Very often people create backups that are empty or corrupted. Nobody likes a ship that sinks with empty lifeboats so its advisable to regularly test the restoration of backups in your test / stage server.

Here are the highly effective tips that we use for our websites.

Setup an automated process to -

  • Back up website every 24 hour
  • Verify that it is restorable.
  • Move backups to off-site e.g. like Amazon-S3, Rackspace
  • Move one backup every week to Amazon-Glacier to be stored forever.
  • Delete backups older than 4-6 weeks.

How one should take backup ?

Backup Solutions :

  1. Use backup Extension - In Joomla world you can use Akeeba backup , the simplest and safest method for taking backup which essentially require no programming skills. User with shared server hosting also can use this.

  2. Use any backup Application - Lots of professional applications are available which create separate backup of your php files and mysql database separately and then place at your desired off-site location like Amazon-s3, rackspace. It’s independent of CMS.

  3. Utilize Website hosting software - Now a days, most of hosting providers provide back up software tool. So within a click in your cpanel you can create backup of your site. It’s not advisable to put all your secret data in hands of 3rd party service.

  4. Build your own custom script - If you have huge database and numerous files then it is difficult to manage such backups on hourly or daily basis. So in that case you may need to have automated scripts to take this backup.

    And Today it’s all about geeky backups, so we use shell script. You need to have some good hands with SSH (Need VPS Hosting) and have access of crontab.

    “ Don’t go with generalization, build your own customization.“

    workflow of Custom Script to manage automatic backup of your site
    Workflow of Custom Script to manage automatic backup of your site

    With this automatic script you can take full backup of your files, folders and databases within a minute. It will compress all of them and move backup to to off site.

    This script will then automatically delete old files as per defined time, so that you don’t get rid of old backups and don’t run out of hard disk space. In short, you don’t do anything just type a single command to secure your site.

    We are using this from long time and we really save lots of time and efforts with this automate process. We not consider this as our achievement until this will help our other Joomla family members. A small contribution to all our lovely family members :-

    database backup
    Database Backup

Do back up Now!

Disaster could strike at any time to anyone. Back up your website now and back it up every day. If a nightmare strikes, you'll be ready to take control and get back online within minutes. If having any doubt in using this automate process for your website then drop your comment and we love to help you out.

In our next blog of this educational series we will provide our best practices for “How to manage test and stage server”.

“A step ahead towards to be a Joomla geek”

blog comments powered by Disqus