Whm-cpanel - How to backup and restore a domain account via ssh, Cpanel Account Migration
How to backup and restore a domain account via ssh
How to Backup and Restore a Domain Account via SSH
You can backup a domain via Cpanel. Sometimes these might be a need to backup a account without logging into the end users CPanel. In those situations the account can also be backed up via SSH by running the command /scripts/pkgacct. Every CPanel is installed with its scripts and the executable path for those scripts or commands is
# /scripts/cpanel-command
Steps to backup a Cpanel account via SSH
1. Log into your server by using SSH
- Change to the root user # su
2. Execute the CPanel script for the account backup.
/scripts/pkgacct usernamereplace the username with the actual username of the account which you need to take backup
The above command will print the output like
Copying domain Config...Done Copying Mail files...Done Copying proftpd file...Done Copying www logs...Done Grabbing mysql dbs...Done Grabbing mysql privs...Done Copying mailman lists...Done Copying mailman archives...Done Copying homedir...Done
3. The backup file will be placed in the users home directory.
You can download it via ftp or copy using rsync or scp command.
How to restore a Domain Account via SSH
1. Log into your server by using SSH
- Change to the root user # su
2. Upload or copy the backup file (Example File Name: w3calculator.tar.gz) to the home directory of domain account.
3. Execute the Cpanel script to restore the account.
/scripts/restorepkg usernamereplace the username with the actual username of the account.
Note: Make sure that the file name matches the necessary naming convention.
This will restore the domain account from the backup, also it will create the CPanel account.
The topic on Whm-cpanel - How to backup and restore a domain account via ssh is posted by - Samy
Hope you have enjoyed, Whm-cpanel - How to backup and restore a domain account via sshThanks for your time