Restoring cPanel accounts is easy. This article contains many of the details here:
https://docs.cpanel.net/whm/transfers/transfer-or-restore-a-cpanel-account/
For instructions on backing up and restoring only MySQL, please click here.
For a simple restore transfer one or more of the account backup files to one of the following locations:
/home /home2 /home3 /root /usr /usr/home /web
Once done
The account should be restored. Do note that restoring an account takes a lot of disk space. See Advanced Restore section for more info on how to deal with this.
Follow these steps in the event that the Beacon WHM server needs to be restored off-site.
Note that image level backups should be periodically taken a few times per year, since any customization done outside of cPanel will not be included in the normal cPanel backups.
This section will require use of the shell.
Updated on 2025-06-30: The information in this section may no longer be relevant due to the change to S3 based backup with Backblaze.
Restoring cPanel accounts take 2-4x as much space as the account normally uses for various reasons.
We can help with this issue by using the following general strategies.
If you read the cPanel documentation, you would see that they have what they call “cpmove-{USER}” types. This is simply the extracted .tar.gz.
We can use this fact to help deal with the issue that we need to store the .tar.gz file in addition to the extracted version.
tar -zxvf exampleuser.tar.gzmv command to rename the extracted directory: mv exampleuser cpmove-exampleuserrm exampleuser.tar.gzcpmove-exampleuser is in one of the predefined cPanel restore directories, you can use the web interface to complete the restore. Otherwise, proceed to the next step./scripts/restorepkg /path/to/cpmove-exampleuser/
Note that the above steps can be completed if the .tar.gz file is in any place on the filesystem if you are willing to use the restorepkg script provided by cPanel. This can help fix the problem if you have enough total space on the machine, but no one partition is big enough to support all the various copies.
Sometimes you want to exclude files from a restore for various reasons. To do so, follow these steps:
mv exampleuser cpmove-exampleuser/scripts/restorepkg /path/to/cpmove-exampleuser/On or about 7/7/2021, a database restore was requested. The restore process was started, however non database changes were also included.
This was an issue because the account had over 7 million session files which made the restore problematic. We failed for a day or so to get it to restore before finally opening a ticket with cPanel.
They used the following commands to get the desired result.
# be inside /backup tar -zxvf beacontechnology.tar.gz --exclude=session mv beacontechnology cpmove-beacontechnology /scripts/restorepkg /backup/cpmove-beacontechnology/