Skip to content

Backup verification and restore drills for cPanel

How to run a quarterly restore drill on cPanel so you know the backups work, with the four checks that make the difference between a useful drill and theater.

A backup that has never been restored is a hypothesis. Restore drills are the experiment. On any cPanel server handling real customer data, drilling quarterly is the minimum — annually is theater, daily is overkill, monthly is right for environments under regulatory scrutiny.

What’s happening

A restore drill picks a recent backup at random, restores it to a non-production target, and verifies the restored state matches what the original looked like at backup time. The drill is not about confirming the backup completed — that’s a monitoring concern. It’s about confirming the restore path works end to end: data integrity, schema compatibility, file ownership, mail accessibility, DNS zone correctness.

How to verify

Before the drill, audit what’s expected:

jetbackup5api -F getBackupJobs
jetbackup5api -F getQueueItems --filter status=COMPLETED | tail
ls /backup/jb/destinations/<dest>/accounts/<user>/

Pick an account that’s been backed up successfully in the last 24 hours and is mid-size — large enough to exercise the system, small enough to restore in a reasonable window.

The fix

  1. Designate a target — a separate cPanel server, or a fresh account on the production server with a temp username. Production restores back to the same account are not a drill; they’re a fire.
  2. Restore the account: jetbackup5api -F createRestoreItem -D '{"snapshot_id":"...","items":[...]}' or the WHM UI. Time the restore.
  3. Run the four checks. (1) Database integrity: mysqlcheck -A against restored DBs. (2) File ownership: find / -uid <user> -gid <user> count matches expectations. (3) Mail accessibility: log in to webmail as a sample account and confirm folder list and recent messages. (4) Application boot: visit the homepage (with /etc/hosts override) and confirm a content-bearing response.
  4. Document the result: drill date, account restored, time-to-restore, time-to-verify, anomalies. Anomalies might be “WordPress required a database repair after restore” or “mail folders intact but SpamAssassin Bayes data lost”.
  5. Roll discoveries into runbooks. If three drills in a row require a SpamAssassin retraining step, that step belongs in the documented restore procedure.

Stack Harbor runs quarterly restore drills as part of environment management and produces the documentation auditors ask for.