How to Create A Duplicate cPanel Account
If you find the need to create a new cPanel account with the same or similar settings as a current account on your server, this can be done in a few simple steps on your Hostwinds Cloud VPS or Dedicated Server.
- Use the
pkgacctscript to create a cpmovearchive for an account. This will create a file in .tar.gz format.
- After creating the
cpmovefile, you may modify the original account
- Then restore the archive or transfer it between servers if you need to create the account on another server.
The first step in this process will involve accessing your server as
1. Making a full backup of the original cPanel account.
Log in as
root to your Hostwinds server via SSH or Get VNC in the Cloud Portal. Backup the original cPanel account by running the command below, using the specific cPanel username in place of “
/scripts/pkgacct [arguments] username [destination]
The pkgacct script will create a cpmove archive for the account. With no destination specified, the archive will be stored in
/home/cpmove-username.tar.gz, with the username replaced by your specific cPanel username.
cPanel’s documentation about the pkgacct script details arguments that the pkgacct script accepts. A cpmove archive must only be stored in the following directories, or left with no destination specified. This is because the restorepkg script used to restore the account only searches in these directories:
2. Modify the original cPanel account.
Next, the domain, username, and any needed settings on the original cPanel account should be modified. Our guide can help locate the “Modify an Account” section in WHM.
3. Restore the
Now that the original cPanel account’s username, domain, and other optional settings have been modified, you may restore the cpmove archive on the same server, or after transferring the .tar.gz file to another.
You may restore the cpmove archive from the command line or from WHM. From WHM, you can locate the “Restore a Full Backup/cpmove File” section in:
WHM >> Home >> Backup >> Restore a Full Backup/cpmove File
Once here, you may restore by using the cPanel username or the cpmove archive filename.
The filename of the cpmove archive must be in one of the following formats.
Following this step, you may choose to replace all instances of the original IP, or only replace basic cPanel-provided A records in zone files.
Then you may choose to overwrite an existing cPanel account with the username being restored.
Finally, a dedicated IP can be assigned to the cPanel account if the server has available IP addresses. Lastly, click “Restore”.
As an alternative to WHM, you may perform this restore from the command line as the
/scripts/restorepkg [arguments] [input] [filename]
Example of using the next available IP from the pool when restoring the account for user “user1”:
/scripts/restorepkg --ip=y cpmove-user1
Unlike in WHM, only the filename can be used to restore the cpmove archive, and not the username. Once again, the filename of the cpmove archive must be in one of the following formats.
You may use arguments like ‘–ip’ with input to restore the cpmove archive with the next available IP address in the pool, the shared IP address, or a known IP address on the server. The ‘–disable’ argument may also be useful when restoring an account. Find more on the restorepkg script here.