Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 11.52

Overview 

You can use the /scripts/pkgacct script to create a cpmove archive for an account. After you create the cpmove archive, you can transfer the account between servers.

The /scripts/pkgacct script

To use this script, run the following command as the root user:

/scripts/pkgacct [arguments] username destination

Notes:

  • In this example, username represents the username of the cPanel account for which you wish to create a cpmove  archive
    • This value is required unless you also use the --bincheck argument. 
    • Pass this value after any arguments and before the destination path.
  • In this example, desintation represents the path to the directory in which you wish to store the cpmove  archive. 
    • This value is optional
    • You must pass this value after the username.

 

Arguments

The /scripts/pkgacct script accepts the following arguments:

ArgumentDescription
--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  0th  position). 

--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 below.

--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 below.

--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 a cpmove 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 /scripts/pkgacct script compresses archives by default. 

--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:

  • If you pass this argument, you must pass a destination.
  • This argument creates the username.tar.gz file, where username represents the account's username.

 

How to use the --version and --mysql arguments

To use the /scripts/pkgacct script's --version and --mysql arguments, enter a space between the argument and the value that you wish to pass to it.

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