Packaging and restoring all cpanel accounts via command line

If you need to make a backup of just one cpanel account, use the following command.

  • /scripts/pkgacct username   (replace username with the username of the account you want to backup)

 

If you need to create a full cpanel backup of all websites on a server, you can do it in one simple command.

  • cd /home; for i in *; do /scripts/pkgacct $i; done;

This will create a full cpanel backup for every account on your server.  Each account will have it’s own filename.

 

Once you have uploaded the file to the new server, you can restore it using this command line.

  • /scripts/restorepkg /home/cpmove-username.tar.gz  (username will be the username of the account on the old server)
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Adding secondary IPs to Cpanel

  To access the IP Functions Menu, click on IP Functions, on the main screen...

Suspended page / Internal Server Error

If domain is showing "Internal Server Error" except suspention page after suspending the domain...

CPanel Log file locations

CPanel stores it’s log files in the /usr/local/cpanel/logs directory. Below is a list of the...

How do convert a dedicated ip to a shared ip on cPanel/WHM

In root SSH, copy the /etc/domainips file and then remove the IP from it: Code: cp...

Install RKHunter

You can install RKHunter on Linux Server by using following steps.1 Login to your server as...