A customer drops a critical table. They have JetBackup. The instinct is “restore the account,” but a full-account restore also reverts the files, mail, DNS, and any other database — wiping changes made since the backup. The right tool is JetBackup’s database-only restore, which is granular but has its own traps: the dbmap can drift, the user grants may not be carried, and a partial restore that leaves the application pointing at a half-restored state is worse than no restore at all.
What’s happening
JetBackup integrates with cPanel and stores per-account backups (files, mail, databases). Backups are typically incremental and stored off-host (S3, B2, SFTP target). Restore options:
- Full account: replaces everything for the account from the chosen backup. Atomic, but heavy.
- Files only: restores
/home/<user>from the backup. Leaves databases untouched. - Database only: restores one specific database. Drops the existing version, recreates from backup. cPanel dbmap should update with the restore.
- Email only: mail content.
- DNS only: zone files.
For a “I dropped a table and the application is failing” incident, you want Database only for the affected database. The customer’s recent file changes (uploads, configs) survive. The customer’s other databases survive.
How to verify
ls /var/jetbackup/ # JetBackup config and metadata
jetbackup --status # daemon status
# Or via WHM > JetBackup > Queue & History
mysql -e "SELECT TABLE_SCHEMA, COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA='acmecorp_wp' GROUP BY TABLE_SCHEMA"
whmapi1 list_dbs user=acmecorp
Confirm JetBackup is running and has the backup you need. Confirm the database is currently in a known state — if you’re restoring because the customer dropped a table, that table is missing.
The fix
- Identify the backup to restore from in JetBackup’s UI. Note the timestamp — you want the most recent backup that contains the dropped table. If the drop happened at 3pm and backups run nightly at 2am, last night’s backup is your target.
- Notify the customer that data written since the backup will be lost. If the drop happened at 3pm and the backup is from 2am, any application data created between 2am and now will be missing from the database after restore. Sometimes the customer prefers to live with the dropped table over losing 13 hours of orders.
- Trigger the restore from cPanel > JetBackup > select backup > restore option Databases. Choose only the affected database. JetBackup:
- Stops new connections to that database (or drops them).
- Drops the existing database.
- Recreates from backup.
- Re-grants the users that were in the backup.
- Updates the cPanel dbmap.
- Watch the JetBackup log during the restore:
/usr/local/jetapps/var/log/jetbackup.log. Errors here mean the restore didn’t complete cleanly. - Verify post-restore:
mysql -e "SELECT COUNT(*) FROM acmecorp_wp.wp_posts" # row count matches expectations mysql -e "SHOW TRIGGERS FROM acmecorp_wp" # triggers restored whmapi1 list_dbs user=acmecorp # dbmap consistent - For triggers, procedures, events: confirm they’re back. JetBackup’s database backups should include them, but check.
- Update the application if it has cached connection state. Restart PHP-FPM pools for the account:
Or for LiteSpeed:/scripts/restartsrv_apache_php_fpmlswsctrl restart. Without this, persistent connections may still reference the dropped table from cached metadata. - For a “I need a specific table restored, not the whole database” workflow, JetBackup doesn’t do per-table restores. The workaround:
- Restore the database to a different name (e.g.,
acmecorp_restore). - Dump the specific table:
mysqldump acmecorp_restore wp_posts > wp_posts.sql. - Drop the table from the live database, import:
mysql acmecorp_wp < wp_posts.sql. - Drop the restored copy:
DROP DATABASE acmecorp_restore.
- Restore the database to a different name (e.g.,
- For “the backup was incomplete”, JetBackup occasionally fails mid-backup and stores a partial state. The UI shows backup status; if it says anything other than “successful,” try the previous night’s backup.
For environments where JetBackup is the primary disaster recovery tool, Stack Harbor’s managed cPanel operations team runs quarterly restore drills against test databases and validates that the per-database restore reproduces the dbmap, grants, triggers, and events as expected.