Use WHM’s Backup Configuration as the one scheduled backup system on a cPanel server, and treat the Backup tool inside cPanel as a convenience for site owners. This page is for whoever runs the server and decides what protects its accounts. Three things on that server are called “backup”: the WHM scheduler, the old cpbackup system (deprecated since cPanel & WHM version 64), and the full or partial archives a user makes in cPanel. They differ in who makes them, what they hold and who can put them back. You will end with a known schedule, a copy off the server and one account you have restored for real.
What you’ll accomplish
- Tell the three backup types apart by contents, owner and restore path.
- Find out whether a server still carries the legacy cpbackup configuration, and migrate it.
- Read and set the WHM backup schedule, retention and destinations.
- Know which restore tool accepts which file, including the full backup a customer downloaded.
- Restore a throwaway account from last night’s backup and check that it works.
Prerequisites
- Root SSH access and a WHM (Web Host Manager, the server-wide admin side of cPanel) login with root privileges.
- A supported cPanel & WHM version. The commands below use WHM API 1 through
whmapi1, which every current version ships. - Free disk space in the local backup directory,
/backupby default, of at least the size of the accounts you back up. - Permission to create and delete one test account. The drill uses
drilltestondrilltest.example.com; swap in your own names.
How the three backup types compare
The diagram shows what each backup holds and who can restore it, including the main trap: an owner’s full backup only goes back through WHM.
WHM Backup Configuration (WHM » Backup » Backup Configuration) is the current backup system. Root sets it once for the whole server. According to the Backup Configuration documentation, it offers three formats:
- Compressed uses less space and takes longer.
- Uncompressed runs faster and needs more space.
- Incremental keeps a file tree and uses hard links (several file names pointing at the same data on disk) so unchanged files take no extra space.
Daily, weekly and monthly runs can each be switched on, and monthly runs fall on the 1st and/or the 15th. Each one keeps between 1 and 9999 copies. It can back up every account or a selected list, plus system files, which are mostly under /etc. Archives land in /backup unless you change the directory. You can also send copies to additional destinations: another local directory, Amazon S3, Backblaze B2, FTP, Google Drive, Rsync, S3 Compatible, SFTP, WebDAV or a custom script.
Legacy cpbackup is the system that came before. cPanel’s deprecation plan lists Legacy Backups as deprecated in version 64 and states that new installations from version 64 onward do not include it. The removal column for it reads “N/A”, so cPanel has not published a removal version. Older servers that were upgraded can still carry its configuration file, /etc/cpbackup.conf. When legacy backups exist, WHM shows a Backup System Migration page. That page copies the old settings into the current system and renames the old file to /etc/cpbackup.conf- followed by a Unix timestamp. The legacy system kept only one incremental restore point, so raise the retention before migrating if you want history.
The cPanel Backup and Backup Wizard tools are what an account owner sees under Files. They make two kinds of archive:
- A full backup of the whole account: home directory, mail, databases and settings, in one
.tar.gzfile. It can be saved to the home directory, sent to a remote FTP server (normal or passive mode) or copied over SCP. You can ask for an email when it finishes. - Partial backups: the home directory, databases, email forwarders or email filters, each downloaded as its own
.gzfile.
The owner can restore partial backups in the same tool. cPanel’s documentation is explicit about full backups: “You cannot automatically restore a full backup file in cPanel. This function is only available in WHM.” The host can also hide this tool through WHM’s Feature Manager.
| Criteria | WHM Backup Configuration | Legacy cpbackup | cPanel full backup | cPanel partial backup |
|---|---|---|---|---|
| Who starts it | Root, on a schedule | Root, on a schedule | Account owner, on demand | Account owner, on demand |
| What it covers | Selected accounts, optional system files | Accounts, old format | One whole account | One part of one account |
| Retention | 1 to 9999 per daily, weekly, monthly | One incremental point | None; the file stays until deleted | None |
| Off-server copies | Built-in destinations | Not built in | FTP or SCP at creation time | Download to the owner’s computer |
| Who restores it | Root in WHM, or the owner for files | Root, after migration | Root in WHM only | Owner, in cPanel |
| Status | Current | Deprecated since version 64 | Current | Current |
Which one to use
- Every server: WHM Backup Configuration, with daily runs, at least one weekly run and one additional destination off the server. This is the backup you restore from when a disk dies or an account is deleted.
- Any server that still has
/etc/cpbackup.confwithout a timestamp suffix: run the migration in step 1, then delete nothing until the new system has completed a run. - Site owners who want their own copy: let them use cPanel’s full backup, and tell them the restore goes through you. Point them at downloading a full account backup from cPanel for the owner’s side.
- Hosts with many accounts and frequent single-file or single-mailbox restores: add a product like JetBackup on top. JetBackup local and off-site destinations covers that setup.
Step-by-step
-
Check for a legacy configuration. List the old configuration file and any renamed copies:
ls -l /etc/cpbackup.conf*Example output:
-rw------- 1 root root 912 Mar 4 2019 /etc/cpbackup.conf-1729664571A file with a numeric suffix means the migration already ran. A plain
/etc/cpbackup.confwith no suffix means legacy settings may still be live. In that case open WHM » Backup » Backup System Migration, raise the incremental retention if prompted, and run it. “No such file or directory” means the server never had the legacy system, which is normal for installs from version 64 onward. -
Read the current configuration. Ask WHM for the settings the scheduler will use:
whmapi1 --output=jsonpretty backup_config_getExample output, trimmed to the keys that matter here:
{ "data": { "backup_config": { "backupenable": 1, "backuptype": "compressed", "backupdir": "/backup", "backup_daily_enable": 1, "backupdays": "0,1,2,3,4,5,6", "backup_daily_retention": 7, "backup_weekly_enable": 1, "backup_weekly_retention": 4, "backup_monthly_enable": 1, "backup_monthly_dates": "1", "backup_monthly_retention": 3, "backupaccts": 1, "backupfiles": 1, "mysqlbackup": "accounts", "keeplocal": 1 } }, "metadata": { "command": "backup_config_get", "reason": "OK", "result": 1, "version": 1 } }backupenableat0means nothing runs at all.backupdayslists the weekdays for daily runs, with0for Sunday.mysqlbackupset todirbacks up the whole MySQL data directory, and cPanel states those files cannot be restored through the cPanel & WHM interface.keeplocalat0deletes local copies once they reach a remote destination. -
Set the schedule and retention in WHM. Open WHM » Backup » Backup Configuration and set these values:
- Backup Status: enabled. Backup Type: Compressed.
- Daily backups on all seven days, retention 7. Weekly backups on, retention 4. Monthly backups on the 1st, retention 3.
- Back up User Accounts on. Back up System Files on, which cPanel strongly recommends.
- Databases: Per Account Only, so each account’s archive restores on its own.
For retention, the rule is to keep copies for longer than the slowest mistake you need to catch. Seven dailies cover an error found a week later; the weekly and monthly copies cover a quarter. Set retention as low as you like on a small disk, but then add a remote destination with longer history. PostgreSQL databases are not backed up by default; cPanel’s documented switch is
PSQLBACKUPset to'yes'in/var/cpanel/backups/config. Click Save Configuration. -
Add a destination off the server. In the same page, under Additional Destinations, choose a type such as SFTP or S3 Compatible and fill in its form. Off-site destinations for cPanel walks through the S3-style options. A backup that lives only in
/backupon the same disk does not survive that disk. -
Create the drill account and run a backup now. In WHM » Account Functions » Create a New Account, create
drilltestwith the domaindrilltest.example.com. Upload one file to itspublic_htmland create one database in its cPanel. Then start an extra backup run immediately:/usr/local/cpanel/bin/backup --forceThe run happens in the background. The script’s documentation names
/usr/local/cpanel/logs/cpbackupas the log directory, so read the newest file when the run ends:ls -t /usr/local/cpanel/logs/cpbackup/ | head -1Open that file with
lessand search it fordrilltestand for the worderror. Then find the archive the run wrote:find /backup -maxdepth 4 -name 'drilltest*'Example output:
/backup/2026-10-28/accounts/drilltest.tar.gzcPanel’s documentation does not spell out the folder layout under
/backup. On a typical server, daily runs write to a folder named after the date, and weekly and monthly runs to dated folders under/backup/weekly/and/backup/monthly/. Use whatever pathfindprints. An incremental backup shows a directory per account instead of a.tar.gzfile. If nothing is printed, check that User Accounts is enabled and that the account is selected. -
Delete the drill account. This simulates the most common real request, an account removed by mistake:
whmapi1 --output=jsonpretty removeacct username='drilltest'A
resultof1in themetadatablock means the account was removed;0comes with areasonthat says why not. Only remove the account you created in step 5. -
Restore it with WHM Backup Restoration. Open WHM » Backup » Backup Restoration. On the Restore by Account tab, select
drilltestin Select User and click today’s date in the calendar. Leave Restore Subdomains, Restore Mail Configuration and Restore MySQL on, which are the defaults. Click Add Account to Queue, then Restore. The queue entry moves from Pending to Restoring Account to Completed. “Completed with warnings” or “Failed” adds a View Log link in the gear menu. The same restore is available from the shell withrestorepkg, documented on the restorepkg script page. The script looks for the archive in a fixed list of folders, including/homeand/root, so copy the filefindreported in step 5 there first:cp /backup/2026-10-28/accounts/drilltest.tar.gz /home/ /usr/local/cpanel/scripts/restorepkg /home/drilltest.tar.gzUse one method, not both.
--skipaccountrestores the package onto an existing account with the same username, and--forceacts the same way when the account exists. Use either only when overwriting is what you mean. -
Restore a customer’s own full backup, when one arrives. A full backup from cPanel is named like
backup-10.28.2026_09-15-42_acme.tar.gz. Copy it to/homeand use WHM » Transfers » Transfer or Restore a cPanel Account, or runrestorepkgon it as in step 7. The cPanel Backup tool will not take it. To copy one account to another server for a test, package it withpkgaccton the source. It writes a compressed cpmove archive,cpmove-acme.tar.gz, which is one of the namesrestorepkgaccepts on the target. The pkgacct and restorepkg pipeline covers that path:/usr/local/cpanel/scripts/pkgacct acme /home
Validate it works
Check the restored drill account from three sides:
-
The account exists again.
whmapi1 --output=jsonpretty accountsummary user='drilltest'Example output, trimmed:
"acct": [ { "user": "drilltest", "domain": "drilltest.example.com", "diskused": "2M", "suspended": 0, "backup": 1 } ]backupat1means the account is included in future scheduled runs. -
The file is back.
ls -l /home/drilltest/public_html/lists the file you uploaded in step 5, owned bydrilltest. -
The database is back.
mysql -e "SHOW DATABASES LIKE 'drilltest%'"lists the database you created.
When all three pass, you have proved that tonight’s backup can bring an account back. Remove drilltest again, and repeat the drill each quarter. Backup verification and restore drills suggests what to rotate through.
Troubleshooting
- Backup Restoration shows no dates for the account. Backups are disabled, User Accounts is off, or the account was not selected. Read
backup_config_getagain; then checkaccountsummaryforbackupat0. - The customer’s full backup fails in cPanel’s Restore section. That is by design; cPanel only restores partial backups there. Restore it as root in step 8.
- Transfer or Restore a cPanel Account does not list the file. The file name or folder does not match what the tool accepts. Keep the original
backup-…_user.tar.gzorcpmove-user.tar.gzname and place the file in/homeor/root. - Databases are missing after a restore. Check
mysqlbackupin step 2. Withdir, the archives hold no per-account dumps. Switch to Per Account Only and take a new backup. PostgreSQL needsPSQLBACKUPas described in step 3. - Two backup jobs seem to run every night. One cause is a legacy configuration that was never migrated. Check step 1, and run the Backup System Migration if WHM offers it.
When this is the wrong approach
- Hundreds of accounts and many single-file restores a week. WHM restores whole accounts, and single files through File and Directory Restoration. A dedicated product handles self-service mail and database restores better; JetBackup vs Acronis vs R1Soft compares the options, and restoring one account from JetBackup shows that restore.
- You need the whole machine back, operating system included. Account archives restore accounts, not the server. Use image or block-level backups for that.
- You do not have root. Use cPanel’s full and partial backups and ask your host to confirm how they restore a full one.
If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.