XCloner: Using Cron to automate your backups

XCloner has quickly become my backup plugin of choice for Joomla websites, and it works very well for WordPress as well – It’s saved my but more than once, and it’s great for doing site migrations (hence the word “Cloner”). Here’s the procedure for installing and configuring it, with an added dose of Cron loving at the end:

Download and Install:

  • Click on the logo to go to their downloads page:

clip_image001

  • Download the latest version for either WordPress or Joomla:

clip_image002

  • Log into your Joomla or WordPress control panel and install the plugin:

clip_image003

  • Once you have it installed, head over to Components to configure it:

clip_image004

  • Your first task is to change the password from the default:

clip_image005

  • Click Settings:

clip_image006

  • Click on Authentication, then change the password to something else (make sure you document what the password is)

clip_image007

  • Click Save:

clip_image008

  • Now, if you go back to the main screen, all the settings are green (Authentication stays red until you change the default password):

clip_image009
Go ahead and click on Generate Backup: I normally just leave the default options in place (backup databases, backup files, automatically generate a name)

  • Click Continue to start your backup running:

clip_image010

  • It takes a few minutes to run the magic:

SNAGHTML4581d17

  • Once the backup completes it’ll give you the details of what it’s done, and the backup file name: Click Close

SNAGHTML458de73

  • If you go back to the main screen, and click on View Backups you can download the backup from there, or restore from it, or check when your last backup was done. You can also use the backup file to migrate a site from one host to the other – it’s a complete clone.

SNAGHTML459766d

Automate your backups with Cron

  • You can also set this up as a Cron job for automated backup magic – go to Configuration – Cron

clip_image014

  • The only setting I found I needed to change was to have it Delete Old Backups:

clip_image015
For everything else, just leave all the defaults and click Save.

  • Go back to the Cron Command Setup and grab this script:

SNAGHTML45b591e
Copy the script, and add on an email command at the end so you get notified when the job is complete: | mail -s “Website Backup Task” myemail@mydomain.com

And add it to the Cron jobs in your CPanel – If you have MySQL maintenance tasks set up, then you might want to consider setting it to run on a different day or time, so that your webhost doesn’t get too hammered for the entire 2.5 minutes that it takes to run these tasks. It’s probably not an issue, but if you have multiple websites hosted on your account, the host can sometimes get a bit twitchy if there’s too much happening at once, and shut you down.
SNAGHTML461adc2
Sit back and enjoy the magic!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.