Backup and Restore cPanel Accounts via SSH

a. How to create a backup of a cPanel Account via SSH?


1. Log-in to the SSH as the Root user.

2. Since it will be a time-consuming task, it is better to run it on screen.  

3. Enter the following command string on the command line interface:


/scripts/pkgacct username


The account backup will be created in the current directory you are in. So please try to run the command from a directory in which the partition has enough free space available. 


b. How to Restore a cPanel Account via SSH?


Log in to the server via SSH and enter the following command from the directory in which the backup files are located.


/scripts/restorepkg username


If the backup file name is not in the standard cPanel format(eg: cpmove-username.tar.gz), you need to specify the filename/path with the command like below:


/scripts/restorepkg username /home/backupname.tar.gz


If the cPanel account is already created on the server and you are running the restoration later, you might need to use the force option as well.


/scripts/restorepkg --force username /home/backupname.tar.gz

  • 621 Users Found This Useful
Was this answer helpful?

Related Articles

How To Install and Use Docker on Ubuntu 16.04

Introduction Docker is an application that makes it simple and easy to run application processes...

Change Main IP of the server :: Vesta Panel

If we are changing the main IP of a server installed with Vesta panel, we can use the following...

Change permissions using find command

On a Linux server, if you are in need of changing the permissions of a bulk amount of files or...

Change the time of your vps/dedi

It's very easy, you first need to remove the current time file rm /etc/localtime and replace it...

Create and Manage FTP Accounts in VestaCP

In this tutorial, we can discuss about how to create and manage FTP accounts in VestaCP. Follow...