Emergency server help: get in touch

JetBackup 5 Restore in WHM: Accounts, Files, Databases, Email

Restore cPanel accounts, files, databases and email from JetBackup 5 in WHM as root, handle orphan accounts and restore conditions, and queue restores with jetbackup5api.

Published 9 min read

Short answer: In WHM open JetBackup 5 → Accounts and expand the account. Under View Backups, pick the backup date in the Created column. Restore the full account, or click Show Advanced Settings to pick only home directory files, databases, database users, emails, cron jobs, DNS zones, certificates or FTP accounts. Choose merge/terminate/suspend options, confirm, and follow the job on the Queue page. Deleted accounts are under Accounts → View Orphan Accounts. The same restores can be queued from the shell with jetbackup5api -F addQueueItems.

Applies to JetBackup 5.4; tested on cPanel & WHM 11.138 with AlmaLinux 9.8

We ran read-only checks on our lab server (AlmaLinux 9.8, cPanel & WHM 11.138, JetBackup 5.4.1.4 RELEASE tier, trial licence) on 6 October 2026: getInfo, listBackupJobs, listBackupForAccounts, listRestoreConditions, listQueueGroups and the --help of addQueueItems. We did not run an actual restore on the lab, so the WHM steps are checked against the JetBackup 5.4 documentation (linked below).

Before you restore: five checks

  1. Is there a backup from before the problem? For a hacked site, pick a snapshot from before the first sign of compromise, not simply the newest one.
  2. Is the account suspended? JetBackup’s FAQ says restores of suspended cPanel accounts can fail with authentication errors, because cPanel restricts API calls for suspended accounts. Unsuspend it before you queue the restore.
  3. Is the backup encrypted? If the backup job uses encryption with the key stored remotely, the restore asks for the account owner’s Private Encryption Key.
  4. Expired domain? If the account’s domain is no longer registered, the FAQ suggests temporarily allowing unregistered domains in WHM for the restore, then turning that off again.
  5. What will be overwritten? A full restore replaces live data. If the customer changed things since the backup (new orders, new mail), plan a merge or a partial restore instead.

Restore a full cPanel account from WHM

  1. WHM → JetBackup 5 → Accounts. Find the account and expand it.
  2. Open View Backups. In the Created column, choose the backup date from the drop-down.
  3. For a full restore, leave all items selected. For a partial restore, see the next sections.
  4. Choose the restore options. Per the JetBackup docs: Terminate account before restore (not for reseller accounts), Merge live account data with backup data (where “live data takes precedence over the restored data”), and Suspend account after restore.
  5. Accept any restore conditions shown and start the restore.
  6. Follow progress under Queue. When the restore finishes, the log is there too.

Which option to pick:

SituationOption
Site hacked or broken by an update, nothing worth keepingTerminate account before restore (clean slate), then restore
Customer deleted some files but has newer data elsewhereMerge, or better a partial restore of only what is missing
Restoring an account you want to check before it goes liveSuspend account after restore

Terminate before restore removes the live account, including anything newer than the backup: mail received since then, new orders, uploads. Download what the customer needs first, or take a fresh backup of the current state with /scripts/pkgacct bob /root/pre-restore.

Restore only files or folders

In the same View Backups screen, click Show Advanced Settings and select only Home Directory Files. For incremental backups, JetBackup lets you browse the snapshot and tick individual files and folders. Use this to recover a deleted wp-content/uploads folder or one overwritten config file without touching the database or mail.

Restored files get their ownership and permissions from the File Permissions rules under Settings → Restore, and JetBackup can lock the home directory during file restores. If a restored site returns 403 errors, check those rules first.

Restore databases and database users

Select Databases (and Database Users if the user or its password is also gone) under Show Advanced Settings and pick the databases you need. A database restore replaces the current content of that database. If the customer only needs a few rows or one table back, restore the backup to a temporary database or download it instead, so the newer data is not overwritten.

For WordPress, restore the database and the files from the same snapshot. An old database with newer plugin files (or the other way round) can leave plugins expecting tables or settings that do not match, which shows up as broken layouts or plugin errors.

Restore email accounts

Select Emails under Show Advanced Settings and choose the mailboxes to restore. The API also offers an email_structure option that restores only the email account structure, without message content. It is useful when mailboxes were deleted, but the mail is now being kept somewhere else.

Before a mailbox restore, tell the customer whether messages received since the backup will stay. With Merge, live data takes precedence. Otherwise restored content can replace what is there.

Restore a deleted account (orphan backups)

When an account is terminated, JetBackup keeps its backups as an orphan, listed under Accounts → View Orphan Accounts. The FAQ gives a default retention of 180 days. Restore it from there like a normal account.

If the orphan backup has no panel configuration item, the FAQ says to create a matching account in cPanel first. Then reassign the new account’s UUID (the Assignable Accounts feature) so it can see the orphan’s backups, and restore the items into it.

To restore onto a different server, for example after losing the old one, add the same remote destination on the new server as read-only. The backups then appear (as orphans) and can be restored. JetBackup’s Disaster Recovery guide covers restoring the whole server and JetBackup’s own configuration.

Restore conditions and limits for end users

If customers can restore their own backups from cPanel, set the rules under Settings → Restore in JetBackup 5:

  • Restore Conditions: under Manage Restore Conditions → Create New Restore Condition you write text users must accept before a restore runs. For example: “Restoring the database replaces all current orders. Download a copy first.” Our lab has none yet (listRestoreConditions returned total: 0).
  • Restore Limits Per Account: limits how many restores an account can run in a time period (0 = no limit, the default).
  • Package selection: whether a restore keeps the account’s current package (default) or applies the package from the backup.
  • File permission rules and home directory locking during file restores.

Restores from the command line with jetbackup5api

jetbackup5api is the CLI for the JetBackup 5 API. jetbackup5api -F --help lists every function, and jetbackup5api -F FUNCTION --help shows its parameters. -O plain or -O json sets the output format. Read-only examples we ran on the lab:

jetbackup5api -F getInfo -O plain                 # version, tier, panel
jetbackup5api -F listBackupJobs -O json           # jobs, destinations, last/next run
jetbackup5api -F listBackupForAccounts -O json -D "type=1&contains=511"   # latest full backup per account
jetbackup5api -F listRestoreConditions -O plain
jetbackup5api -F listQueueGroups -D "type=2" -O plain                     # restore queue

On the lab, getInfo reported version: 5.4.1.4, tier: RELEASE, type: cPanel. A short summary of the JSON from listBackupForAccounts showed the backups made by our job lab-accounts-to-lab2 to an SSH destination:

success: 1 accounts: 4
root     backups=0 latest=
site1    backups=1 latest=2026-10-05T20:35:24+00:00
site2    backups=1 latest=2026-10-05T20:35:25+00:00
site3    backups=1 latest=2026-10-05T20:35:25+00:00

type and contains are required. type is 1 for account backups, 2 for directories and 3 for JetBackup config. contains is a bitmask: 1 panel config, 2 home directory, 4 databases, 8 emails, 16 cron jobs, 32 DNS zones, 64 SSL certificates, 128 database users, 256 FTP accounts, and 511 for a full account. Without contains, the call returned success: 0 with “No backup contains provided”.

To queue a restore, use addQueueItems with type=2 (restore; 4 is download). Pass either the snapshot ID (the backup object’s parent_id) or a list of backup item IDs (its _id). Options include merge, suspend, terminate, owner, ip, exclude and email_structure. We have not run this on the lab, and the IDs below are placeholders:

# restore one account snapshot, merging with live data
jetbackup5api -F addQueueItems -D "type=2&snapshot_id=SNAPSHOT_ID&options[merge]=1"

# restore specific backup items (e.g. only the databases item), then suspend the account
jetbackup5api -F addQueueItems -D "type=2&items[]=ITEM_ID&options[suspend]=1"

Check jetbackup5api -F addQueueItems --help on your version before scripting this. The parameter table there is the authority for your build.

Check that the restore worked

  • The job shows as completed on the Queue page, or in jetbackup5api -F listQueueGroups -D "type=2". Read its log for warnings.
  • The site loads (test with a hosts-file entry if DNS is elsewhere), and you can log in to the admin area.
  • Mailboxes show the expected messages in webmail.
  • For databases: the expected tables and latest rows exist (uapi --user=bob Mysql list_databases, then check in phpMyAdmin).
  • If you restored with Suspend account after restore, unsuspend it when you are satisfied.

Common problems

  • Restore fails with authentication errors: the account is suspended. Unsuspend, then queue again.
  • The account does not appear in Accounts: it was deleted. Look under View Orphan Accounts. If there is a UUID mismatch after recreating it, use Assignable Accounts.
  • Encrypted backup asks for a key you do not have: without the private key the backup cannot be decrypted. This is why the key must be stored outside the server.
  • Customer hits a restore limit: check Restore Limits Per Account in Settings → Restore.
  • Site broken after a partial restore: files and database came from different snapshots. Restore both from the same date.

Official documentation: JetBackup 5.4 docs: Accounts (admin) · JetBackup 5.4 docs: Settings (Restore) · JetBackup 5.4 docs: FAQ and troubleshooting · JetBackup API: addQueueItems

Related: JetBackup 5 review: the backup tool we actually restore from · WHM Backups S3: Reliable Remote Backups and Test Restores · Transferring accounts between servers with the WHM Transfer Tool · Backup Verify Script · Migrate cPanel accounts to a new server without customers noticing

See also: JetBackup 4 to 5 Migration: The 5.2.11 Stepping Stone · cPanel restorepkg and pkgacct: Backup and Restore from CLI · Restic Backup for cPanel and DirectAdmin: Files, Databases, Retention

Frequently asked questions

How do I restore a cPanel account from JetBackup 5 as root?

In WHM open JetBackup 5, go to Accounts, expand the account, choose a date in View Backups and start the restore. Watch the Queue page until it completes.

Can I restore only one database or one mailbox with JetBackup 5?

Yes. Click Show Advanced Settings in View Backups and select only Databases or Emails, then pick the specific database or mailbox.

How do I restore a deleted account in JetBackup 5?

Open Accounts and then View Orphan Accounts. Backups of deleted accounts are kept there, 180 days by default according to the JetBackup FAQ.

What does “Merge live account data with backup data” do?

It combines the backup with the current account, and live data takes precedence over restored data. Use it when the customer has newer data you must keep.

Can I run JetBackup 5 restores from the command line?

Yes. Use jetbackup5api -F addQueueItems with type=2 and either a snapshot_id or items[]. Find the IDs with listBackupForAccounts. Check the function’s –help on your version first.

Why does a JetBackup restore fail for a suspended account?

cPanel restricts API calls for suspended accounts. JetBackup’s FAQ says to unsuspend the account before you queue the restore.

Maintenance record

This guide changes servers, data or security settings, so we re-check it against current versions on a fixed schedule. Take a backup or snapshot before you start.

Maintained by
srvScripts editorial team
Supported versions
JetBackup 5.4; tested on cPanel & WHM 11.138 with AlmaLinux 9.8
Last full review
Next review

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.