Overview

You can use the /usr/local/cpanel/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 /usr/local/cpanel/scripts/pkgacct script

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

/usr/local/cpanel/scripts/pkgacct [arguments] username destination

Notes:

In this example, username represents the username of the cPanel account for which to create a cpmove archive.

Pass this value after any arguments and before the destination path.

You cannot back up the root user.

In this example, desintation represents the path to the directory in which you wish to store thecpmove archive.

This value is optional.

You must pass this value after the username.

The /usr/local/cpanel/scripts/pkgacct script does not use the cpbackup-exclude.conf file to exclude files or directories from backups.

When you package an account for transfer, the source and destination servers must contain sufficient free disk space. Both servers must contain free disk space greater than twice the size of the largest account to transfer and an additional 1GB of free disk space. The package and restore processes use this free space to store temporary files.

The system will not transfer any email addresses from Plesk to cPanel & WHM that contain a plus sign (+) in the email username.

Arguments

The /usr/local/cpanel/scripts/pkgacct script accepts the following arguments:

Argument

Description

--allow-override

Use the /var/cpanel/lib/Whostmgr/Pkgacct/pkgacct file to package the account, if it exists.

Use the account's last known successful backup as a template when the script creates the cpmove archive. This option may speed up the backup process.

--incremental

Update the destination file with any new content since the previous backup. and remove any content that no longer exists on the account.

If the destination file does not exist, the script creates a new file in that location.

Note:

This argument automatically declares the --nocompress argument in order to create an uncompressed archive.

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

Note:

The /scripts/pkgacct script compresses archives by default.

--userbackup

Allow the user to use the cpmove archive as a backup for the account.

--backup

Use the cpmove archive as a backup for the account.

Notes:

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.

--skipacctdb

Exclude the account's databases from the cpmove archive.

Note:

This argument is an alias for the --skipmysqldb and --skippgsqldb arguments.

--skipapitokens

Exclude the account's API tokens.

--skipauthlinks

Exclude the account's external authentication credentials from the archive.

--skipbwdata

Exclude the account's bandwidth data from the archive.

--skipdnszones

Exclude the account's DNS zone file information from the archive.

--skipdomains

Exclude the account's subdomains, parked domains (aliases), and addon domains from the archive.

--skipftpusers

Exclude the account's FTP user accounts from the archive.

--skiphomedir

Exclude the account's home directory from the archive.

Note:

Use this argument if you will save or transfer the home directory with another method, such as the rsync command.

--skipintegrationlinks

Exclude the account's integration links from the archive.

--skiplocale

Exclude the account's locale information or customized locale from the archive.

--skiplogs

Exclude the account's log files from the archive.

--skipmail

Exclude the account's mail directory from the archive.

--skipmailconfig

Exclude the account's mail configuration information from the archive.

--skipmailman

Exclude the account's Mailman mailing lists from the archive.

--skipmysql

Exclude the account's MySQL databases, database users, and database grants from the archive.

Note:

If you pass the --skipacctdb argument, the --skippgsql argument becomes redundant.

--skippasswd

Exclude the account's password from the archive.

--skippgsql

Exclude the account's PostgreSQL databases, database users, and database grants from the archive.

Note:

If you pass this the --skipacctdb argument, the --skippgsql argument becomes redundant.

--skippublichtml

Exclude the account's public_html directory.

--skipquota

Exclude the account's disk quota limits from the archive.

--skipresellerconfig

Exclude the account's reseller privileges from the archive.

--skipshell

Exclude the account's shell information and privileges from the archive.

--skipssl

Exclude SSL certificates and files that the server's Apache configuration contains. It does not exclude SSL files that the account's home directory contains.

--skipuserdata

Exclude the account's subuser information.

--serialized_output

Encode each line of the script's output in JSON format in order to allow the live_tail_log.cgi script to stream it.

--help

Display a brief help message.

--man

Display the script's full documentation.

How to use the --mysql, --roundcube, and --dbbackup arguments

To use the /usr/local/cpanel/scripts/pkgacct script's --mysql, --roundcube, and --dbbackup arguments, enter a space or an equals sign (=) between the argument and the value that you wish to pass to it.

For example, to specify MySQL version 5.5.11, run the following command:

cPanel, WebHost Manager, and WHM are registered trademarks of cPanel, Inc. for providing its computer software that facilitates the management and configuration of Internet web servers. ®2018 All rights reserved.