The transfer_accounts_as_root Script

Valid for versions 94 through the latest version

Version:

94


Last modified: July 28, 2022

Overview

The /usr/local/cpanel/scripts/transfer_accounts_as_root script transfers one or more cPanel accounts from a remote (source) server to the local server.

Important:
  • When using this script, the system disables the Live Transfer feature in WHM’s Transfer Tool interface (WHM » Home » Transfers » Transfer Tool) by default. To enable the Live Transfers feature, use the --enqueue=live_transfer=1 option with the script.
  • To transfer as a authenticated cPanel account on the remote server, use the /usr/local/cpanel/scripts/transfer_account_as_user script.

Run the script

To run this script on the command line, use the following format:

/usr/local/cpanel/scripts/transfer_accounts_as_root [options]

Options

Use the following options with this script:

Options Description Example
--host Required
The remote (source) hostname or IP address.
--host=example.com
--user Required
The name of the cPanel account to transfer from the remote server to the local server.
Warning:
Make certain that you input the correct username. The script will enqueue a transfer for a cPanel account that does not exist on the source server.
--user=username
--sshkey The root user’s SSH key to log in to the remote server. The system prompts for the SSH key’s passphrase via STDIN).
Note:
If you do not use this option, the system will prompt for the root user password via STDIN.
--sshkey=12345ABCDE
--enqueue Pass a parameter to the WHM API 1 enqueue_transfer_item function. You can use this option multiple times. --enqueue=live_transfer=1
--help  Print the script’s help information. --help
--session  Pass a parameter to the WHM API 1 function create_remote_root_transfer_session. You can enter this option multiple times. --session=comm_transport=ssh

Additional Documentation