AperioFlow Start free

Blog

Test the restore, not just the backup: a short routine for small teams

A backup that has never been restored is a guess. The job may have run every night for a year and still produce a file you cannot open. A dump can be empty, truncated, or made with the wrong settings. The only way to know is to restore it and look at the result.

This is common for solo developers and small teams. Someone set up a cron job or a backup script once, it has worked quietly since, and nobody has tried a restore since. The first real test usually happens during an incident, which is the worst time to find out.

This post sets out a short routine for testing a database backup restore. It takes about 20 minutes, and a small team can keep it going without much effort.

A backup that has never been restored is a guess

A backup is only useful if you can get the data back in a usable form. Three things can go wrong between the job running and you needing the data:

  • The file is produced but is incomplete or corrupt.
  • The file restores, but the schema or the app no longer matches it after recent changes.
  • The file is stored where you cannot find it, or the access you need has lapsed.

None of these show up in a log line that says the job finished. You only find them by restoring.

What a heartbeat tells you: the job ran and checked in, not that the file is usable

AperioFlow has a heartbeat monitor for exactly this kind of job. Your cron job or backup script calls the monitor's check-in address each time it succeeds. If a check-in is late, you get an alert by email. Alert emails go only to people in your organisation.

This tells you the job ran and reached the point where it reported success. It does not tell you the backup file is good. A heartbeat cannot see what is inside the file, so do not read a green heartbeat as proof that you can restore. Treat it as the alarm for the job, and the restore test as the check on the output.

Each monitor has a failure threshold you set, so it alerts only after that many failed checks in a row. That helps you avoid alerts for a single slow night, while still catching a job that has stopped.

If you do not yet have a heartbeat set up, the free plan includes 10 monitors, which is enough to cover the backup jobs for a small set of sites and apps.

A 20-minute restore routine: pick a backup, restore it somewhere safe, open the app, check recent records

Keep the routine short enough that people will actually do it. Here is one that works for most small setups.

  1. Pick a backup. Choose one from the last few days, not always the newest. Sometimes the newest file is the one that is broken, and you want to know that.
  2. Restore it somewhere safe. Use a separate database or a local copy. Never restore over production to test. Give the restored copy a clear name so nobody mistakes it for the live data.
  3. Open the app against the restored copy. Point a local or staging instance at it and confirm the app starts. A database that loads but breaks the app is still a failed restore.
  4. Check recent records. Pick three things you know should be there: the last order or signup, the most recent entry someone added, and a record from a few days before the backup date. Check that the counts and the latest timestamps look right.
  5. Note how long it took. Restore time matters when you are under pressure. If the restore took two hours, you need to know that before an outage, not during one.

If any step fails, stop and fix the backup job before anything else. A restore test that finds a problem has done its job.

How often to do it, and who owns it

How often depends on how fast your data changes and how much you would lose. For a site with a database that changes daily, a monthly restore test is a reasonable start. For a client site with light changes, quarterly may be enough. Pick a rhythm you will keep, and write it down.

Give the job one owner. Shared responsibility often means nobody does it. The owner does not have to run every test personally, but they should make sure it happens and that the result is recorded.

For a team of up to 10 people, this usually means one named person per system. If you are a freelancer running client sites, the owner is you, and the client should know what the routine covers.

Add the restore test to your task list with a date. Put the same date in your calendar if that helps. The point is that it appears where the team already looks.

Write the result in one line on the task so the next person can see it

After each test, write one line on the task. Keep it factual, for example: 'Restored 14 March backup to staging, app started, last order present, took 22 minutes.' If something failed, say what and what you did about it.

This matters most when the person who ran the test is not the person who needs the answer. In an incident, the next person should be able to see when the last good restore happened without asking around.

If you want to tie the whole routine together, the setup looks like this. The heartbeat tells you the job is running on time. The restore test tells you the output is usable. The task keeps the record. Start free at https://app.aperioflow.co.uk/#/signup and set up the heartbeat for your backup job first, then add the restore test as a task you return to on a regular date.

A backup is only half of the job. The restore is the part that proves it works.

Start free More from the blog

Built for the people who write the code and answer the phone when it breaks.

Run from the UK. Hosted in the UK and Europe.

UK time --:--

Already in?Open the app Start free today
View our policies