...

How to Restore a cPanel Backup via SSH

how-to-restore-a-cpanel-backup-via-ssh

 

When attempting to perform your own cPanel transfer, you may find yourself wondering how to restore the file using SSH commands. The good news is that cPanel has built in scripts that make backing up your account and restoring it on a new server relatively simple. In this article, we will outline how to back up and restore a cPanel backup via SSH commands.  Please note that both servers will need to have cPanel/WHM installed before you can complete this task.

Topics Include:

  • Back Up Existing cPanel Account
  • Restore cPanel Account

Backup your cPanel account and restore it on a Dedicated Hosting server today!

Back Up Existing cPanel Account

Before you begin the transfer process it is important to first properly back up your existing cPanel account and package it into a single file that can be transferred. This can be done using the following command:

/scripts/pkgacct username

In this example, username is the username of the cPanel account you wish to package. After running this command, you will see output from the system indicating that various aspects of the account are being packaged into a backup file. Once done, you will have a file named cpmove-username.tar.gz. As with the previous example, the username portion of this file name corresponds to your cPanel username.

Restore cPanel Account

Once you have the backup file transferred to the new server, you can restore it using the following command:

/scripts/restorepkg username

As before, username corresponds to your cPanel username. Alternatively, you can restore the cPanel backup using the file path. The file path is the location of the backup file within your server’s file structure. Once you have determined the location of the backup file, you can restore it using the following command:

/scripts/restorepkg /path/to/backup/file.tar.gz

In this example, /path/to/backup/file.tar.gz corresponds to the file path for your backup. After running the command, you should see output from the system as it restores the various pieces of your cPanel account. Once the command prompt returns, the restoration process is complete. Congratulations, you now know how to restore a cPanel backup!

Discover more from WIREDGORILLA

Subscribe now to keep reading and get access to the full archive.

Continue reading