Skip to main content
GullySystem
A practical guide

MySQL backup and restore test plan for a business application

Ganesh HSStrategy and Technology, GullySystem
Practical advice · 4 min read

In this guide 6 sections
The short answer

A MySQL backup plan has five parts. Scheduled logical dumps, binary logs for point in time recovery, an off site copy, a regular restore onto a test server, and row count checks afterwards. Only the restore test proves the backup works, so schedule it.

Start with scheduled logical dumps

A logical dump is a text file of SQL statements that rebuilds your tables and rows. The mysqldump tool writes it. Run it every night, at an hour when billing and dispatch are quiet.

Use the single transaction option for InnoDB tables, so the dump reads one consistent snapshot without locking staff out. Name each file with the database and the date, such as erp_2026-10-17.sql.gz.

Keep a written retention rule. Seven daily files, four weekly files and a handful of monthly files is a common pattern. Write down who owns the schedule and who is told when a run fails.

Add binary logs for point in time recovery

A nightly dump leaves a gap. If the database is damaged at three in the afternoon, you lose every order entered since midnight. Binary logs close that gap.

The binary log records each change as it happens. To recover, you restore last night’s dump, then replay the logs up to the minute before the damage. The mysqlbinlog tool does the replay.

Decide how long to keep the logs and where they live. Logs stored on the same disk as the database are lost together with it. Copy them away every hour.

  • Binary logging switched on and confirmed in server settings
  • Log files copied off the database server on a timer
  • Retention long enough to cover the oldest dump you keep
  • The exact replay command written in the runbook

Keep a copy off site and out of reach

Fire, theft, ransomware and a mistaken delete can all take out a server and the backup folder beside it. At least one copy must sit in another building or another cloud account.

Encrypt dumps before they leave the server. Give the upload job a credential that can add files but not delete old ones. An attacker who steals it then cannot wipe your history.

Check the off site folder weekly. Someone should open it and confirm that yesterday’s file is present and has a sensible size. A zero byte file passes silently otherwise.

Restore to a test server on a regular schedule

Backup finished is not the same as restore proven. Corrupt files, missing grants, full disks and wrong character sets only show up when you restore. So restore, at least once a quarter.

Use a separate test server, never the live one. Load the latest dump, replay the binary logs to a chosen minute, and time the whole exercise. That time is your real recovery time, which owners often guess wrongly.

Record who ran it, how long it took and what went wrong. Fix the faults the same week. A restore drill that finds nothing is rare, and each fault found is a disaster avoided.

Check row counts and a few business totals

A restore that finishes without errors can still be incomplete. Compare row counts for the main tables, such as customers, invoices, invoice_lines and payments, against the live database at the same time.

Then check totals a business person understands. Does the sum of yesterday’s invoices match the sales register? Does the newest invoice number match? Do a few known customers open with the right balance?

Sign the drill off on one sheet, with the checker’s name and the day it was done. Then book the next drill in the calendar before closing the document.

  • Row counts for the five largest tables
  • Highest invoice number against the live system
  • Sum of the last day’s payments
  • A login test through the application itself

Restore drill record sheet

Record sheet in four blocks. Schedule block: dump time, log copy interval, retention. Off site block: location, last file seen, size. Drill block: date, dump used, target minute, time taken. Verification block: table row counts, invoice number, payment total, sign-off.

Open a blank worksheet to print

Questions owners ask

How often should we test a restore?

Quarterly suits most small businesses, and after any change to the server, the MySQL version or the backup tool. Critical systems that take orders all day may test monthly.

Is a cloud snapshot of the server enough?

A snapshot helps, but it may capture the database mid-write and come back inconsistent. Keep logical dumps and binary logs as well, and restore from them to prove they work.

Who should own the backup plan?

One named person, with a deputy. Developers build the jobs, but the owner or IT manager signs off the drill results, because the business bears the loss.

What if the restore drill fails?

Treat it as a finding, not a failure. Note the error, fix the cause, repeat the drill, and keep the first record. The fault was already there before you looked.

Browse all guidesBack to top ↑
Next step

Have a specific situation to work through?

This article covers the general case. Tell us what you’re actually dealing with and we’ll respond directly.

Share Your Requirements