Sites built on WordPress, Joomla or a shopping cart keep their content in a database, not in the files. Make sure each backup holds a recent database copy as well as the files, and test a restore.

Every file, and none of the orders

A gift shop sells online as well as from its storefront. Every month its owner copies the whole website folder from the hosting account to a drive at home, as a backup.

In November an update failed and the site went down. She uploaded last month's copy of the folder, and the site answered with an error about connecting to its database.

The files were all there. The pages, products, prices, customer accounts and orders were not, because they had never been in the files at all.

Her backup habit was careful and regular. It simply copied the wrong half of the site.

Two parts to every modern site

A site built on WordPress, Joomla, Drupal or a shopping cart is made of two halves. Its files contain the software, the design and any uploaded images.

The database holds nearly everything else: the text of every page and post, products and prices, orders, customers, comments, menus and settings.

The two are stored separately, sometimes on different servers. Copying the site's folder by FTP, or downloading it through the control panel's file manager, takes only the first part.

How to tell whether a backup holds both

Open the latest backup, or ask whoever makes it, and check for each of these:

The fourth is the real test. A database file dated last night that does not contain yesterday's order is not the backup it appears to be.

Ask what the host's backups include

Many hosts make backups of their own. What differs is the schedule, how long copies are kept, whether databases are included and where the copies sit.

Some keep them on the same server as the site, which protects against a deleted file but not against the server failing or the account being closed.

Ask in writing, and ask how a restore is requested and how long it takes. The answers decide how much of your own backup you need.

How often each part needs saving

The database changes every time someone orders, comments, registers or edits a page. A shop taking orders daily needs a database backup at least daily.

The files change less often: when software is updated, an extension is added or images are uploaded. A weekly copy, plus one after every update, suits most sites.

Keep several generations, not just the latest. A problem noticed a week late, such as malicious code added to a page or a product deleted by mistake, needs a copy from before it began.

Where the copies should live

A backup stored inside the hosting account disappears with the account. One stored only on an office computer depends on that computer.

Keep at least one copy somewhere else entirely, such as a separate online storage account or a drive kept apart from the office network, and check now and then that it still updates.

Label each copy with the site, the date and what it contains, so a restore under pressure starts with the right files.

A worked example

A darts league in Prince Rupert runs weekly matches for about twenty teams in pubs and halls around the city. Its website shows the fixtures, scores, standings and player averages.

The site runs on Joomla with an extension for league results, and captains enter their scores each week. A volunteer downloaded the site's folder every month as the backup.

In October the hosting renewal notice went to a former secretary's address, the account lapsed and was removed, and the host's own backups went with it.

The volunteer uploaded the saved folder to a new account. The site showed a database error, and the season's scores survived only on the captains' paper sheets, which were typed in again.

The new host now keeps nightly backups of both parts, and a weekly database copy goes to the league's own storage account. Renewal notices go to a shared league address.

Once a month during the season, the volunteer restores the latest backup to a test address and checks that last week's scores are there, the one proof that the backup holds what members care about.

Trying a restore before you need one

Until a backup has been loaded somewhere and checked, whether it works is a guess. Restoring it is the only way to know.

Restore to a test address, not over the live site. Check that pages, products and a recent order appear, and that images load.

Time it, and write down the steps and who does them. On the day something fails, that page of notes matters as much as the backup itself.

The counter-case

Some sites have no database at all. A hand-built site is all files, so a copy of the folder is the whole site, and the gift shop's monthly habit would have covered it.

And a host whose own backups include databases, kept off the server and tested, may cover most of the risk for a small brochure site.

Any site with a shop, a booking system, a blog or member logins is another matter: it keeps its most valuable content in the database, and that part has to be checked by name.

Checking what your backup holds

  1. Find out what your site is built on and whether it uses a database.
  2. Open the latest backup and look for the database file.
  3. Check its date and contents against your last order or edit.
  4. Back up the database at least as often as it changes.
  5. Keep one copy away from the hosting account.
  6. Restore to a test address and look for recent content.
  7. Write down the steps and who carries them out.

Step six is easy to put off, and it is the one that turns a folder of files into a backup you can rely on. Everything before it is an assumption until then.

One of those copies should also sit beyond the reach of the office computers, for the reasons given in CryptoLocker and the backups on the office network.


Frequently asked questions

Does a copy of my website's files include the database?

No. Sites built on WordPress, Joomla, Drupal or a shopping cart store their pages, products and orders in a database, which a file copy leaves out.

How can I tell whether a backup includes the database?

Look for a database file, often ending in .sql, with a recent date and a sensible size, and search it for your newest order or post.

How often should the database be backed up?

At least as often as it changes. A shop taking orders every day needs a daily database backup; the files can usually be saved weekly.

Are my host's backups enough?

Ask what they include, how often they run, how long they are kept and where they are stored. Copies on the same server do not cover every failure.

Why test a restore?

Because a backup is only proven once it has been put back. Restore to a test address and check that recent pages, products and orders appear.

Does a hand-built HTML site need a database backup?

Not if it has no database. Its pages are files, so a regular copy of the folder, kept off the hosting account, is the whole site.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Not sure your backup includes the database?

Tell us how your site is backed up now, and we will check what the copies hold and test a restore with you.

Start a Conversation