MilesWeb Hosting Forum

Web Hosting Technical Support => How To's => Topic started by: Dipak Bhoi on January 09, 2015, 08:23:45 PM

Title: How to Backup & Restore cPanel / WHM accounts via SSH?
Post by: Dipak Bhoi on January 09, 2015, 08:23:45 PM
Hello Guys,

cPanel / WHM has a  backup and restore feature. Let's see how you can use this feature via SSH.  cPanel / WHM has a number of scripts and these are located in /scripts/ on the server.

To backup a single account via SSH:

Simply fire the following command to backup a cPanel account:

Quote#/scripts/pkgacct username

This scrip will generate a full backup of cPanel account with name something like as  'cpmove-username.tar.gz`

This file will be generated in the home directory of the server, so path should be as below:

Quote/home/cpmove-username.tar.gz

For Restoring an account with cPanel via SSH we use script 'restorepkg'. Run below command:

Change directory to home directory and script restorepkg follow by username of cPanel account

Quote#cd /home
#/scripts/restorepkg username

That's all, Enjoy!!