How to backup your Jshop database

Contingency planning, disaster planning, call it what you will, we all need to backup our stuff regularly, and that includes your web site’s database.

If you run a Jshop store the chances are it’s a major part of your business and all your product and order data is stored on your web site. That’s all fine and dandy because you know that your web host takes daily and weekly backups, so if the shit hits the fan you just get them to restore it.

But what if the host backups failed and your site couldn’t be restored?

Although backups work most of the time they can never be guaranteed, so your only option is to have your own backups as well as a contingency. You have been doing that, right? Like many people you probably haven’t, but spending a few minutes once a day or once a week is a small price to pay.

Backing up your Jshop database

Login to your Jshop admin and click the Backup link in the main navigation, your user type will need the appropriate permissions so if in doubt ask your developer or site administrator.

You’ll now see the backup screen:
jshop backup screen

Set the “Output method” to “Download File in Browser” - this will download the complete backup file to your computer.

Now click “Backup now” and the download will begin. The file will be many tens of megabytes so this may take a while.

As soon as the download is finished I suggest renaming the file with the date, something like my_backup_01-04-2010.txt, then store it somewhere safe, and duplicate it on a backup system as well.

It’s a huge file!

Jshop stores a lot of statistical data in the database, I’ve seen instances where over 80% of the total database size is statistics. You don’t really need them.

To dramatically reduce the size of the downloaded file you can prune old stats in two places:

1. Logs (contains referrer, search engine and page view data)
- click the “Clear Logs” link
- chose the most recent data to keep
- click “Clear Logs Now”

2. Reports (order/cart, product view and section view stats)
- click the “Reports” link
- click “Clear Report data”
- choose the most recent data to keep for Popularity records, Abandoned carts and Search statistics
- click “Clear Search Statistics Now”

Now go through the backup procedure as described earlier and you’ll find backing up is a lot quicker!

Backup regularly

If you have to resort to your locally stored backup then your site will be only as good as the last time you backed it up. So if your last backup was six months ago you’ve already lost six months worth of information before you start. Obviously it makes sense to do it more regularly!

How often should you backup? Ask yourself how much data you’re willing to lose - a days worth, a week, a month? That should give you an idea.

Go and backup, now…