Restore Full Backup or cpmove File in cPanel Web Host
Web host or web server powered by cPanel control panel has a very convenient feature to easily restore any backups in case of the need of disaster recovery, accidental lose of data or hosting account moving to another server. In cPanel, it’s possible to configure scheduled backup via WHM (WebHost Manager) which save all hosting accounts (unless excluded), MySQL databases and/or configuration files, or full backup of user own account which dumps to user’s root directory as a .tar.gz archive via cPanel interface.
What should you do with the full backup file in case when you really need to use it to restore an account or migrate a hosted website over from old hosting server?
To restore a full backup file, simply move the file (usually named as username.tar.gz or cpmove-username.tar.gz) to /home directory (or /usr/home, /web, /home2, /home3, /root, /usr directory if applicable). Then login to cPanel WHM (WebHost Manager), and click on Restore a Full Backup/cpmove file link under the Backup section. Enter the user name for the account to restore in the text field after “Enter the username for the account you wish to restore”. Finally click on Restore button and wait for the restoration process to complete.
Alternatively, administrator can also login to the server via SSH as root, and then run the following command in shell:
/scripts/restorepkg username
There is no need to create the account prior to restore as the account will be automatically created if it does not exist. All the user files and folders including databases will be restored to the correct locations. There is not need to untar or extract the backup file.
Related Articles
- How to Change Hostname in cPanel Web Host
- cPanel Invalid License File After Changing Hostname Error
- Cannot FTP to Web Host or Server running cPanel/WHM
- Auto Delete Forwarded Emails in cPanel Web Host
- How to Restart (Stop or Start) cPanel Service (cpsrvd) via Telnet or SSH
- Restore Windows XP and 2003 .bkf Backups in Windows Vista and Longhorn Server with NT Backup Restore Utility
- How to Backup and Restore (Export and Import) MySQL Databases Tutorial
- How to Add IP Addresses to Server with cPanel WebHost Manager (WHM)
- Account Locks Out Due to Brute Force Protection in cPanel WebHost Manager (WHM)
- Back Up, Restore And Clone or Image Disk With Free EASEUS Todo Backup










































October 18th, 2009 20:26
I tried to restore the account through panel as well as through command prompt, I was able to restore the account successfully through panel, but it failed to restore through command line.
October 8th, 2009 23:39
My brain hurts from this explanation. It will be a major miracle if it works. Beware of geeks bearing gifts.
August 18th, 2009 04:20
In my case, i want to transfer my site of providor. I have any solution is in 3o. Pass:
First you go to CPANEL and CLICK the BUTTON: Files / Backups / Download or Generate a Full Web Site Backup
Generate a Full Backup and put on NEW site.
And put the login, password, remote server, its can transfer big places (My file is 2,6 Giga)
Second: Go to the New Providor, and open the file in FILE MANAGER, because the space RESTORE BACKUP get the file of internet and come to bee too slow!!!!! In FILE MANAGER extrat to file /HOME2 and get the file called homedir.tar (My HOMEDIR.TAR have 2325 M), and extrat anytime more to /HOME3 dir and going to /PUBLIC_HTML and move to original /public_html director.
Third: Make the MYSQL backup step by step and restore one by one.
God Bless You. Sorry my english, i am Brazilian. My msn: danielc@yawl.com.br
July 20th, 2009 02:21
Hey thanks it worked
July 17th, 2009 21:52
Restore a Full Backup/cpmove file
Link not found!!!
I’m used hostgator and cpanel 11
April 27th, 2009 02:28
Annoying but the hard return quote doesn’t show up in the messages above. (maybe the editor can correct this) So the following should read as:
“replace every account name with search and replace with (hard return) /scripts/restorepkg” (Goes really quickly, the same is true for searching and replacing /scripts/pkgacct)
April 27th, 2009 02:22
Sorry, rereading it: the following “every account name with replace with /scripts/restorepkg ” should read as “every account name with search and replace with /scripts/restorepkg
April 27th, 2009 02:17
I had a lot of accounts which didn’t transfer and cPanel kept on telling me that the password wasn’t correct. All the solutions I found on the web didn’t work. I had copied the list of accounts which didn’t migrate. In a text editor which could also find and replace hard returns, I first replace all the …. failed with an empty string, then I added /scripts/restorepkg before every account name with replace with /scripts/restorepkg and did the same in another file with /scripts/pkgacct in front of every account name.
On the old server I executed in the directory /scripts the command ./cpbackup –force
and accordingly tail -f /usr/local/cpanel/logs/cpbackup/1240680453.log (replace the logfile with the one cpbackup shows)to see once it was finished.
Then I pasted the second list with /scripts/pkgacct username on the old server and went out to fetch a beer. After a long time and several beers when all the accounts were finished I did the following:
tar zcvf – /home/cpmove* | ssh root@ip_of_your_new_server “cat > /complete.tar.gz”
(all on one line)
It will ask for a password of the new server and after entering that you can get another beer.
Once finished you can go to / on the new server and execute the following command
tar -zxvf complete.tar.gz
Once that is finished you can copy and paste the list with /scripts/restorepkg accountname into the ssh window of the new server and you’re done.
Open two windows of WHM (old and new server) and click on both “Show Reseller Accounts”. You can compare them pretty quick to see if they match. (reseller so and so has so many accounts) if they match, you’re good. The ones missing you can easily delete all the cpmove files and create one for the ones still missing. (in my case only 2 out of 300) and repeat the steps described above.