How to Backup and Restore cPanel User Accounts using Command Line

Channel: Linux
Abstract: use following command as root login. # /scripts/pkgacct myuserabove command will take few time to complete and create a backup file under /home direct

WHM/cPanel is best hosting control panel i used ever. It provides an easy way to manage your server. cPanel provides scripts for most of tasks which can be done using web interface.

This article will help you to how to take manual backup of cPanel/WHM user account and restore on other cPanel/WHM server using command line.

1. Backup Account using Commnad Line

cPanel provides a command line script to take backup of entire user and there data in an compressed file. For example we need to take backup of cpanel account 「myuser」, use following command as root login.

# /scripts/pkgacct myuser

above command will take few time to complete and create a backup file under /home directory with name /home/cpmove-myuser.tar.gz

2. Restore Account from Backup File

After transfer above archive to remote server, copy it under /home directory and execute following command to restore user.

 # /scripts/restorepkg myuser

This command will restore full account with all settings, files and databases. After using these option to migrate any user from one cPanel server to another cPanel server, You will find that how easy a account migration is.

Ref From: tecadmin

Related articles