Skip to content

How to Backup and Restore cPanel User Accounts using Command Line

This How to Guide will help you to how to Backup and Restore cPanel User Accounts using Command Line using cpanel scripts.

Category
Web Servers
Covers
cPanel
On this page

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.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

5 Comments

  1. My website delhiwebsitedesigning.in is showing error message when i upload or do not upload the site files.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top