If you've ever needed to recover a hacked website, move an account to a new server, or roll back after a botched update, knowing how to restore a cPanel/WHM full account backup is one of the most critical skills a server administrator can have. A restore that goes wrong — or silently fails — can mean hours of downtime and lost data.
This guide walks you through every method to restore a full cPanel account backup using WHM, the command line, and partial-restore options, along with the verification steps most tutorials skip.
What Is a Full cPanel Account Backup?
A full cPanel account backup (also called a cpmove file) is a compressed archive that contains everything associated with a hosting account:
- All website files in
public_htmland addon domain directories - MySQL/MariaDB databases and database users
- Email accounts, mail filters, and autoresponders
- DNS zones and subdomains
- Cron jobs and SSL certificates
- Account configuration and package settings
Full backups are stored as cpmove-username.tar.gz or backup-MM.DD.YYYY_HH-MM-SS_username.tar.gz files. Only a server administrator with WHM or root SSH access can restore them.
💡 None of these worked? Skip the guesswork.
Get Expert Help →Method 1: Restore via WHM Interface (Recommended)
The WHM graphical interface is the safest and most straightforward way to restore a full account backup.
Before restoring, upload your cpmove file to the server. The recommended destination is /home:
scp backup-01.01.2026_00-00-00_username.tar.gz root@yourserver.com:/home/
Alternatively, use WHM's File Manager or an SFTP client. Ensure you have enough free disk space — the restored account will require at least 2–3× the compressed backup size.
Navigate to https://your-server-ip:2087 and log in with your root or reseller credentials.
In the WHM search bar, type Restore and click Restore a Full Backup/cpmove File. This option is under the Backup section in the left sidebar.
WHM automatically scans /home, /root, and /tmp for valid cpmove files. Select your file from the dropdown list. If it doesn't appear, verify the file is in one of those directories and that it's readable by root.
- Overwrite existing account — enable only if you're replacing an account with the same username; leave disabled for a clean restore to a new server
- IP assignment — choose shared IP unless the account had a dedicated IP on the source server
- Restricted Restore — recommended; performs extra security checks and skips any component with a security risk
WHM displays a live log showing each restore step: account creation, file extraction, database import, email account recreation, DNS zone setup, and SSL application. A successful restore ends with: Restore Complete.
ssh root@your-server-ip
mv /path/to/backup-username.tar.gz /home/
/scripts/restorepkg /home/backup-username.tar.gz
For an account that already exists and needs to be overwritten:
/scripts/restorepkg --force /home/backup-username.tar.gz
The script outputs the full restore log to your terminal. Watch for any ERROR or WARNING lines — these indicate partial failures that need manual attention.
/scripts/upcp --force
/scripts/fixperms username
Method 3: Partial Restore (Specific Files or Databases)
Sometimes you only need to recover a specific database or a folder of files — restoring the entire account would overwrite newer changes. Use these targeted methods instead.
Restore Files Only
Extract just the file content from the backup:
tar -xzf backup-username.tar.gz homedir/public_html -C /tmp/
cp -r /tmp/homedir/public_html/* /home/username/public_html/
Restore a Specific Database
Extract and import the database from the backup archive:
# Extract the database dump
tar -xzf backup-username.tar.gz mysql/databasename.sql -C /tmp/
# Import to MySQL
mysql -u root -p username_databasename < /tmp/mysql/databasename.sql
Restore Email Accounts
Email mailboxes are stored under mail/ in the backup archive:
tar -xzf backup-username.tar.gz mail/ -C /tmp/
cp -r /tmp/mail/ /home/username/
Common Restore Errors and How to Fix Them
Error: "Account already exists" on Overwrite Restore
If you see this without the overwrite option enabled, WHM has detected an existing account with the same username. Either enable Overwrite existing account in WHM, or use --force with /scripts/restorepkg. If you want to keep the existing account, rename the username first: WHM → Modify an Account → Change Username.
Error: "Disk quota exceeded"
The account package on the destination server has a lower disk quota than the backup's content. Fix by temporarily increasing the package quota in WHM (Edit a Package), then restore, and adjust afterwards.
Database Import Fails: "ERROR 1044: Access denied"
This happens when the MySQL user for the database wasn't recreated properly. Manually create the user and grant privileges:
mysql -u root -p
CREATE USER 'username_dbuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON username_database.* TO 'username_dbuser'@'localhost';
FLUSH PRIVILEGES;
Error: "Could not find the backup file"
WHM only scans /home, /root, and /tmp. Move your backup to one of these directories. Also check file permissions — the file must be readable by root (chmod 644 backup-file.tar.gz).
Restore Completes But Website Shows 500 Error
File permissions are usually the culprit. Run:
/scripts/fixperms username
If the error persists, check the PHP error log at /home/username/public_html/error_log and verify the database credentials in the site's config file (wp-config.php, .env, etc.) match the restored database name and user.
Verify the Restore Was Successful
Never assume a restore succeeded just because no errors were shown. Run these checks:
1. Verify files exist
ls /home/username/public_html/
2. Verify databases were imported
mysql -u root -p -e "SHOW DATABASES;" | grep username
3. Verify email accounts
ls /home/username/mail/
4. Verify DNS zone
cat /var/named/domain.com.db
5. Load the site in a browser using the server's temporary URL or by modifying your local /etc/hosts file to bypass DNS.
Best Practices for cPanel Backup Restores
- Always verify free disk space before restoring — run
df -hto check; aim for at least 3× the backup size free - Use Restricted Restore for untrusted backup files — this prevents malicious scripts embedded in backup archives from executing
- Run a post-restore fix-permissions pass —
/scripts/fixperms usernameprevents 403/500 errors from incorrect ownership - Document your restore — note the date, backup source, and any components that required manual intervention
- Test restores in a staging environment first when restoring to a live production server
For complex restore situations, hardware failures, or environments where backup files are corrupted, CloudHouse's team provides hands-on cPanel server management and emergency recovery support to get your sites back online fast.
