1. Home
  2. Web Panels
  3. WHM/cPanel
  4. How to Restore a full website cPanel Backup to VPS

How to Restore a full website cPanel Backup to VPS

How to Restore a full website cPanel Backup to VPS
How to Restore a full website cPanel Backup to VPS

Backup restoration is a very important task each server administrator must know how to do; with the use of cPanel, it is really easy to restore a full backup of one account.
I have talked about the VPS  and Cpanel earlier, the details of which you can read in these articles:

  1. Install Config Server Firewall (CSF) on a Linux VPS
  2. VPS Hosting

This guide was made to help you restore a full cPanel backup with two very easy options to a Linux VPS.

Restore Full website cPanel Backup  to VPS via WHM

The first option is to restore the full cPanel backup from WHM. Note that, for this to be done, you need to have root access to WHM which is listening on the port 2087. However, if your domain is example.com, you may access WHM with a web browser at https://example.com:2087.

WHM

After you have logged in to WHM, go to Backups and then choose ‘Restore a Full Bacukp’cpmove File’. This WHM function will grant you the ability to restore a specific backup by selecting one of the two possible methods, ‘Restore with Username’ or ‘Restore with File’.
In order to restore with username, you have to upload the entire cPanel backup file to one of the directories below.

/home
/home2
/home3
/root
/usr
/usr/home
/web

Another thing to note is that the file name of the full cPanel backup has to use one of the formats below.

cpmove-{USER}
cpmove-{USER}.tar
cpmove-{USER}.tar.gz
{USER}.tar
{USER}.tar.gz
backup-{BACKUP-DATE_TIME}_{USER}.tar
backup-{BACKUP-DATE_TIME}_{USER}.tar.gz

For example, in case the username for the account you would like to restore is called ‘example_user’, then you will have to select the username from the drop down list.

Full Cpanel Backup Upload

If you do not have a full cPanel backup uploaded in one of the directories above for that username then it should not be available for that selection; this is why you need to ensure that the full cPanel backup is uploaded correctly on your cPanel server.
After you are prepared to restore the backup, click on the ‘Restore’ button and cPanel will begin doing its work.

Restore a full cPanel backup

If you want to restore a full cPanel backup with a file, first choose ‘Restore with File’ and then click on ‘Choose file’ before selecting the backup file from your local filesystem. Afterwards, you will have the backup file uploaded to the server and restored.

Restore Full cPanel Backup via command line

This last method is a lot simpler than the first one. In this method, you will require SSH access to the server. Begin by connecting to your Linux server via SSH and executing the command below as root.

/scripts/restorepkg example_user

Reminder to change ‘example_user’ to your own username for the account which you want to restore. Another thing to ensure is that the full cPanel backup was properly uploaded in the ‘/home’ directory on your server before beginning the restoration procedure.
One more thing..
Share this tutorial with your hosting administrators and networking experts friends, as it will help them and make my countless hours of work count.
Thanks

Updated on December 23, 2018

Was this article helpful?

Related Articles

Leave a Comment

[apsl-login-lite login_text='Please login with a social account']