Having an occasional backup of your blog can be really nice! If you choose a plugin to do this, be careful that it’s not going to be too heavy and slow down your server. For my tutorial purposes, I will be showing you how to backup your blog once a week. If something is lost, at least you will only lose a small amount of data. Chances are, everything will be fine but, as it has been said, it’s better to be safe than sorry!

First log into your account and scroll to the bottom of your cPanel. Click on Cron Jobs:

Accessing Cron Jobs in the cPanel

Set your email account in the field. If you want to be really secure, register a completely new email account with gmail for this purpose and use that.

Scheduling the Cron Job

From the Common Settings drop-down option, choose Once a week

Scheduling the Cron Job and Entering the Cron

In the Command box, you will have some code which will look something like the following.

mysqldump -ce --user=username_B4ckup --password=!QA3ed%TG7yh username_mydtbs | mail myemailaddy@gmail.com

(Naturally, you will need to replace username_B4ckup with your real database username and !QA3ed%TG7yh with your real password and also replace username_mydtbs with your real database name and lastly replace myemailaddy@gmail.com with your real email address.)

Then click Add New Cron Job

(If you want to be really secure, setup a completely separate user for your database apart from your normal user, and make sure it has a strange username(but no special characters in it), and a complicated password. When you assign it to the database, only give it Select and Lock Tables permissions. See: http://helpdesk.bluehost.com/index.php/kb/article/000006)

Make sure to check your spam/junk folder for your database backups as they are quite likely to end up there.

If you get errors instead of database backups, check your cron settings.

Be Sociable, Share!