How to package a cPanel account using ssh
You can use the /scripts/pkgacct script to package a cPanel account and create a cpmove archive for any account on your VPS or dedicated server. After you create the cpmove archive, you can transfer the account between other cPanel servers.
The /scripts/pkgacct Script
To use this script, run the following command as the root
user:
/scripts/pkgacct
—arguments username destination
Example: /scripts/pkgacct
--arguments first2host /root
Notes:
- –arguments is optional
- username is required
- destination is optionl
Arguments
The script /scripts/pkgacct
accepts the following arguments and you can include one or more of these if required when you package a cPanel account. Usually, you won’t need to use these and you can simply just issue /scripts/pkgacct username to backup the account and create the move archive.
Argument
|
Description
|
---|---|
--allow-override |
Use the instructions in the /var/cpanel/lib/Whostmgr/Pkgacct/pkgacct file, if any are present.
Note: Pass this argument before any other arguments (in the |
--bincheck |
Ensure that any of the scripts that the cPanel binary calls will run. If the script runs successfully, it prints 'BinCheck ok' .
Note: If you pass this argument, do not pass a username. |
--version |
Specify the archive version to create.
For more information, read the How to use the –version and –mysql arguments section in the cPanel documentation. |
--mysql |
Specify the version of MySQL® that the account’s databases use.
For more information, read the How to use the –version and –mysql arguments section in the cPanel documentation |
--use_backups |
Convert the most recent backup into a cpmove archive. This option speeds the process but may result in lost or old data. |
--skiphomedir |
Exclude the user’s home directory from the archive. If you plan to transfer the account, you can use a faster protocol to move the home directory. |
--incremental |
Only include information in the new archive that the previous archive did not contain. If you pass this argument and the system does not find acpmove archive, the script will fail. |
--split |
Create the cpmove archive in chunks. This argument reduces the overall load on the system. |
--nocompress |
Do not compress the cpmove archive. |
--compress |
Override the --nocompress argument if it is present.
Note: The |
--skipacctdb |
Exclude the account’s databases from the cpmove archive. |
--userbackup |
Allow the user to use the cpmove archive as a backup for the account. |
--backup |
Pass this argument to use the cpmove archive as a backup for the account.
Note:
|
How to use the --version
and --mysql
arguments
If you’re moving the account to a new server its possible that server might have a different version of MySQL and therefor the backup when restored might now function. To combat this you can backup an account and specify what version of MySQL you require. For example, to specify MySQL version 5.5.11 and the second version of the cpmove
archive, run the following command:
/scripts/pkgacct
--version 2 --mysql 5.5.11 username
You might also like
More from cPanel
How To Install A Cloudflare Origin SSL Certificate In cPanel
Free SSL Certificates from places like cPanel or Let's Encrypt are great. When Let's Encrypt first introduces free SSL Certificates …
Create a SWAP partition on CentOS, RHEL and AlmaLinux without a reboot
SWAP is a memory type that Linux NVMe VPS Servers use to process requests. Memory will be held in SWAP …
Help fixing Error: last request failed: [AUTH] Authentication failed.
The Error: last request failed: [AUTH] Authentication failed error can be caused by a range of things. It could be …