Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column

<< Back - Introduction


Column

Next - Create the Transfer Session >>



Section


Column

Include Page
LIB:_FCMenu
LIB:_FCMenu


Column

Overview

Note
titleNote:

If you already know the modules that you need and the schema of each module, you can skip this step.

The planning process sets up the transfer session.

  • For root sessions, retrieve the transfer modules and schema.
  • For user transfer sessions, use the AccountRemoteUser user-based transfer session .
Multiexcerpt
MultiExcerptNameFCTrue

In these examples, the following statements are true:

  • You have two servers: remote.example.com and hostname.example.com
  • You logged in to the local server with the cpsess########## security token.
  • The example account owns example.com, and you want to transfer it from the remote server to the local server.
  • The example.com domain is 123,456,789 bytes.
  • You want to transfer the package1 package from the remote server to the local server.
  • The root password for the remote server is luggage12345  

Retrieve the transfer modules

To retrieve a list of the transfer modules available on your server, run the available_transfer_modules function as in the following examples:

Localtab Group


Localtab
activetrue
titleJSON API

Multiexcerpt include
MultiExcerptNameJSONAPI
PageWithExcerptSDK:WHM API 1 Functions - available_transfer_modules


Localtab
titlePHP


Code Block
languagetext
linenumberstrue
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_user = getenv('REMOTE_USER');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip , $root_user , $root_pass);
$xmlapi->set_output('json');

$settings = array('api.version'=>1);
$_result = $xmlapi->xmlapi_query('available_transfer_modules' , $settings);

print $_result;




This example will return the following list of transfer modules:

Expand
titleClick to view...

Multiexcerpt include
MultiExcerptNameOutputJSON
PageWithExcerptSDK:WHM API 1 Functions - available_transfer_modules

You can preserve features and modules between transfers. Use the following features to transfer features, module lists, and accounts:

  • FeatureListRemoteRoot — Transfers the feature lists.
  • PackageRemoteRoot — Transfers packages.
  • AccountRemoteRoot — Transfers the accounts.

The schema of each transfer module formats the data for transfer.

Retrieve the schema

The transfer_module_schema function retrieves the following schemas:

Localtab Group


Localtab
activetrue
titleJSON API

To retrieve the schema for FeatureListRemoteRoot, run the following browser-based call:

Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/transfer_module_schema?api.version=1&module=FeatureListsRemoteRoot

To retrieve the schema for PackageRemoteRoot, run the following browser-based call:

Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/transfer_module_schema?api.version=1&module=PackageRemoteRoot

To retrieve the schema for AccountRemoteRoot, run the following browser-based call:

Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/transfer_module_schema?api.version=1&module=AccountRemoteRoot



Localtab
titlePHP

To retrieve the schema for FeatureListRemoteRoot, add the following code to your PHP script :

Expand
titleClick to view...


Code Block
languagetext
linenumberstrue
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_user = getenv('REMOTE_USER');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip , $root_user , $root_pass);
$xmlapi->set_output('json');

$settings = array('api.version'=>1, 'module' => 'FeatureListRemoteRoot');
$_result = $xmlapi->xmlapi_query('transfer_module_schema' , $settings);

print $_result;


To retrieve the schema for PackageRemoteRoot, add the following code to your PHP script :

Expand
titleClick to view...


Code Block
languagetext
linenumberstrue
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_user = getenv('REMOTE_USER');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip , $root_user , $root_pass);
$xmlapi->set_output('json');

$settings = array('api.version'=>1, 'module' => 'PackageRemoteRoot');
$_result = $xmlapi->xmlapi_query('transfer_module_schema' , $settings);

print $_result;


To retrieve the schema for AccountRemoteRoot, add the following code to your PHP script:

Expand
titleClick to view...


Code Block
languagetext
linenumberstrue
include_once '../xmlapi.php';

$ip = getenv('REMOTE_HOST');
$root_user = getenv('REMOTE_USER');
$root_pass = getenv('REMOTE_PASSWORD');

$xmlapi = new xmlapi($ip , $root_user , $root_pass);
$xmlapi->set_output('json');

$settings = array('api.version'=>1, 'module' => 'AccountRemoteRoot');
$_result = $xmlapi->xmlapi_query('transfer_module_schema' , $settings);

print $_result;




The schema will resemble the following example:

Expand
titleClick to view...

Multiexcerpt include
MultiExcerptNameOutputJSON
PageWithExcerptSDK:WHM API 1 Functions - transfer_module_schema




Section

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers","api","whmapi1") and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers","api","whmapi1") and label = "cpanel" and space = "ALD"


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers","api","whmapi1") and label = "cpanel" and space in (currentSpace(),"ALD")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("migrations","restore","transfers") and space = "SDK"