A fully remote UK team. Send a message or a voice note and we handle the rest. Book a consultation

Backups and recovery: planning for the bad day

What gets backed up, where, how restores are tested, and what to agree before you need one.

Abstract dark and orange artwork for the article: Backups and recovery: planning for the bad day

Nobody likes to think about the day their website breaks, their data is lost or something is deleted by mistake. But that day is much easier to get through if you have planned for it. Backups are the main part of that plan, and the part that matters is not just having them, but being able to restore from them when needed.

This post explains what should be backed up, where copies should be kept, why restores need testing and what is worth agreeing before you ever need one. It is part of our care series; see why websites and apps need ongoing care for the overview.

Illustration: a list of updates next to a settings cogIllustration: a list of updates next to a settings cog
A list of updates next to a settings cog.

What can go wrong

Backups protect against a wide range of problems, most of them ordinary:

  • Human error. Someone deletes a page, a product or a batch of records by mistake.
  • A bad update. An update breaks the site in a way that cannot be undone simply.
  • A security incident. Someone breaks in and changes or deletes things, or plants harmful code.
  • A hosting problem. A server fails, or the hosting company has a serious fault.
  • A supplier problem. An account is closed, suspended or lost.
  • Gradual corruption. Data is damaged slowly, and the problem is only noticed weeks later.

Some of these are rare. But over the life of a website or app, it is reasonable to expect at least one of them to happen at some point.

What should be backed up

A website or app usually has two main parts that need backing up:

  • The files. The software itself, your theme or design, and anything uploaded, such as images and documents.
  • The database. Your content, products, orders, customers, bookings, settings and anything else the site stores.

WordPress's own documentation puts it plainly: your database contains everything you have written, and if it is erased or corrupted you could lose it all. It advises backing up the database regularly, and always before an upgrade (WordPress, backups).

It is also worth keeping a record of the things that are not in either: domain and email settings, the list of outside services the site uses, and how they are connected. That makes rebuilding much easier if it ever comes to that.

Where backups should live

A backup kept on the same server as the site protects against some problems, such as a deleted page, but not others. If the server fails or the hosting account is lost, a backup stored on it goes too.

So a sound arrangement keeps copies in more than one place:

  • A copy close at hand, for restoring small mistakes easily.
  • A copy somewhere separate, with a different provider or in a different location, so that one failure cannot take out both the site and its backups.
  • Some older copies, not just the latest one, because some problems are only noticed after a while. If the only backup was taken after the damage, it does not help.

Backups often contain personal data, such as customers' names and orders, so they need the same care as the live site: protected access and, where appropriate, encryption.

Why restores need testing

A backup you have never restored from is a hope, not a plan. Backups can fail silently. They might be incomplete, they might be missing the database, or they might be in a format that is hard to restore. The only way to know a backup works is to try restoring it.

That is why we test restores, by restoring a backup to a separate copy of the site and checking that it works, rather than waiting for a real emergency to find out. It is also a chance to time how long a restore takes, which helps everyone plan.

The Information Commissioner's Office's guidance on data security makes a related point for personal data: security measures under UK GDPR should enable you to restore access and availability to personal data in a timely manner after a physical or technical incident, for example by establishing an appropriate backup process (ICO, a guide to data security).

Backups for apps and custom software

For custom systems and mobile apps, the same principles apply, with a few differences. The data usually lives in a database on a server, which is backed up in the same way as a website's. But there may be more to think about: files uploaded by users, background jobs that run on a schedule, and connections to outside services that hold their own records. A mobile app on someone's phone may also keep some data on the device, which needs a plan for what happens if the phone is lost or replaced.

When we build custom software, we plan backups as part of the design rather than adding them afterwards, and we write down how a restore would work. See maintaining custom software and apps.

Keeping your own copy

Even when we look after backups for you, it can be reassuring to hold a copy of your key information yourself, such as an export of customers or orders, kept safely. If you would like that, we can show you how, or set up a regular export.

Illustration: a shield and padlock protecting dataIllustration: a shield and padlock protecting data
A shield and padlock protecting data.

What to agree in advance

A good time to decide what happens on a bad day is a calm day. When we agree care for a site, these are the questions we talk through.

How often should backups be taken?

It depends on how often the site changes. A brochure site that changes a few times a year needs different treatment from a shop taking orders all day. The question to ask is: how much recent work could we afford to lose? If the honest answer is "none of today's orders", backups need to be frequent.

How long should backups be kept?

Keeping older copies helps with problems that are noticed late. Keeping them too long means holding personal data for longer than needed. We agree a sensible balance for each site.

Who can ask for a restore, and how?

If something goes wrong, who should contact us, and how? Restoring a whole site rolls back everything since the backup, including genuine orders or changes, so we confirm with the right person before doing it.

What would a restore lose?

If we restore to last night's backup, anything since then, such as new orders, enquiries or bookings, is lost from the site. For shops and systems, we plan how to recover those, for example from the payment provider's records or from notification emails.

What comes back first?

For a complex site, it helps to know which parts to bring back first: perhaps the shop and checkout first, then the blog.

What we do on a bad day

If something goes wrong on a site we look after, our approach is calm and methodical:

  1. Understand what happened. What is broken or missing, and since when?
  2. Stop it getting worse. For example, by putting the site into maintenance mode, or closing off access if there has been a break-in.
  3. Agree the plan with you, especially if a restore will lose recent changes.
  4. Restore from a suitable backup, or repair the specific problem if that is safer.
  5. Check thoroughly that everything works as it should.
  6. Fix the cause, so it does not happen again.
  7. Explain what happened in plain English, including anything you need to do, such as telling customers.

If personal data may have been affected, there may be legal duties to consider, including whether the incident needs reporting. We will help you understand what happened, but decisions about reporting are yours, and it is worth taking advice.

Backups are not the only protection

Backups are a safety net. They work well alongside other measures that make problems less likely in the first place: careful updates (see WordPress updates without surprises), limited access (see accounts, roles and permissions), monitoring and good security habits. The National Cyber Security Centre's guide for small organisations includes backing up your data among its practical steps, alongside protecting devices and accounts and spotting scams (NCSC, small organisations guide to cyber security).

Illustration: data kept in step between two storesIllustration: data kept in step between two stores
Data kept in step between two stores.

Questions to ask about your own backups

If you are not sure where you stand, these questions are a good start:

  • Is the site backed up at all? Who set it up?
  • Are both the files and the database included?
  • Where are the copies kept? Is at least one separate from the hosting?
  • How far back do they go?
  • When was a restore last tested?
  • Who would do the restore, and how would you contact them?

If any answer is "I don't know", it is worth finding out before you need to.

An illustration (made up)

Here is a made-up example. It is not a real client.

Imagine a small online shop selling handmade candles. One afternoon, a member of staff tidying up the product list deletes a whole category of products by mistake, along with their photos and descriptions.

Because the shop has regular backups, and restores have been tested, we can recover the deleted products without rolling back the whole shop. We restore a copy of the backup to a separate test site, export the missing products from it and add them back to the live shop. The day's orders, which arrived after the backup was taken, are untouched.

Afterwards, we suggest a small change: giving the staff member a role that can edit products but not delete whole categories.

In short

Backups protect you against mistakes, bad updates, security incidents and hosting failures. Back up both files and database, keep copies in more than one place, including somewhere separate from the hosting, and keep some older copies too. Test restores, because a backup that has never been restored is only a hope. Agree in advance how often to back up, how long to keep copies, who can ask for a restore and what a restore would lose. Backups work well alongside careful updates, limited access and monitoring. If you would like to talk about backups for your site, get in touch.