migrate: Mass Migration and Transfer

The migrate utility is used to automatically transfer or migrate a large number of Plesk accounts (subscriptions). This utility offers the functionality of Migration and Transfer Manager via the command-line interface. When you need to migrate or transfer over fifty accounts or subscriptions, doing that using the Plesk UI might be impossible. Using the migrate utility helps to perform such operations.

With this utility you can do the following:

  • Check for problems that might occur after transfer (or migration).
  • Create lists of Plesk objects to transfer (or migrate).
  • Choose type of data to transfer (or migrate).
  • Choose whether to replace existing objects.
  • Transfer (or migrate) the specified Plesk objects.
  • Restore the data of previous migrations (transfers) from temporary files on the destination server.

 

Usage
migrate <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]

  

Example

The following command transfers the mail-related data of subscriptions example1.com and example2.com from a server with IP address 192.168.1.100 and the administrator's credentials root and mypassword:

plesk bin migrate --migrate_subscription example1.com,example2.com -host 192.168.1.100 -login root -password mypassword -mail-only 

Note: Before starting migration or transfer, check for potential problems by using the commands --check-subscription, --check-customer, or --check-reseller.

 

Commands
Command Parameter Description Example

--list-subscriptions or -ls

 

Displays the list of subscriptions available for transfer (or migration).

To display a list of all subscriptions on the source server (the user "root" credentials are used to access the source server):

plesk bin migrate --list-subscriptions -host 192.168.1.100 -password mypassword

or

plesk bin migrate -ls -host 192.168.1.100 -login root -password mypassword

 

Note: In this and the following examples, the user root credentials are used to access the source server. The value root for the -login option is used by default.

--list-customers or -lc

 

Displays the list of customers available for transfer (or migration).

To display a list of all customers on the source server:

plesk bin migrate --list-customers -host 192.168.1.100 -password mypassword

or

plesk bin migrate -lc -host 192.168.1.100 -password mypassword

--list-resellers or -lr

 

Displays the list of resellers available for transfer (or migration).

To display a list of all resellers on the source server:

plesk bin migrate --list-resellers -host 192.168.1.100 -password mypassword

or

plesk bin migrate -lr -host 192.168.1.100 -password mypassword

--check-subscription or -cs

<name1 [,name2,name3, ...]>

Checks the specified subscriptions for potential problems that might occur after transfer (or migration).

To find out about problems that might occur after transferring the subscriptions example1.com and example2.com:

plesk bin migrate --check-subscription example1.com,example2.com -host 192.168.1.100 -password mypassword

or

plesk bin migrate -cs example1.com,example2.com -host 192.168.1.100 -password mypassword

--check-customer or -cc

<login1 [,login2,login3, ...]>

Checks the specified customers for potential problems that might occur after transfer (or migration).

To find out about problems that might occur after transferring the customers with usernames customer1 and customer2:

plesk bin migrate --check-customer customer1,customer2 -host 192.168.1.100 -password mypassword

or

plesk bin migrate -cc customer1,customer2 -host 192.168.1.100 -password mypassword

--check-reseller or -cr

<login1 [,login2,login3, ...]>

Checks the specified resellers for potential problems that might occur after transfer (or migration).

To find out about problems that might occur after transferring the resellers with usernames reseller1 and reseller2:

plesk bin migrate --check-reseller reseller1,reseller2 -host 192.168.1.100 -password mypassword

or

plesk bin migrate -cr reseller1,reseller2 -host 192.168.1.100 -password mypassword

--migrate-subscription or -ms

<name1 [,name2,name3, ...]>

Migrates or transfers the specified subscriptions.

To transfer the subscriptions example1.com and example2.com from the server with IP address 192.168.1.100 and the administrator's credentials root and mypassword:

plesk bin migrate --migrate-subscription example1.com,example2.com -host 192.168.1.100 -password mypassword

or

plesk bin migrate -ms example1.com,example2.com -host 192.168.1.100 -password mypassword

--migrate-customer or -mc

<login1 [,login2,login3, ...]>

Migrates or transfers the specified customers.

To transfer the customers customer1 and customer2 from the server with IP address 192.168.1.100 and the administrator's credentials root and mypassword:

plesk bin migrate --migrate-customer customer1,customer2 -host 192.168.1.100 -password mypassword

or

plesk bin migrate -mc customer1,customer2 -host 192.168.1.100 -password mypassword

--migrate-reseller or -mr

<login1 [,login2,login3, ...]>

Migrates or transfers the specified resellers.

To transfer the resellers reseller1 and reseller2 from the server with IP address 192.168.1.100 and the administrator's credentials root and mypassword:

plesk bin migrate --migrate-reseller reseller1,reseller2 -host 192.168.1.100 -password mypassword

or

plesk bin migrate -mr reseller1,reseller2 -host 192.168.1.100 -password mypassword

--migrate-server or -m

 

Migrates (or transfers) data of the entire server.

To transfer the data of an entire Plesk server:

plesk bin migrate --migrate-server -host 192.168.1.100 -password mypassword

or

plesk bin migrate -m -host 192.168.1.100 -password mypassword

--retry-from-cache or -r

 

Repeats data restoration from the locally stored files created during the last transfer (or migration).

To restore data from the local files created during a previous transfer or migration operation:

plesk bin migrate --retry-from-cache

or

plesk bin migrate -r

--help or -h

 

Displays help on the usage of the utility.

To view help on the use of the migrate utility:

plesk bin migrate --help

or

plesk bin migrate -h

Options
Option Parameter Description Example

-host or -h

<source host>

Host name or IP address of the source server.

To migrate the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's credentials admin and mypassword, and with access by port 30000:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -port 30000 -login admin -password mypassword

 

-port or -P

<source port>

SSH port at the source server, by default 22.

-login or -l

<administrator's login>

The username used to access the source server over SSH. By default, root is used.

-password or -p

<administrator's password>

The password of the source server's administrator.

-mail-only

 

Migrates only mail configuration and content.

To migrate mail configuration and content of the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's password mypassword:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -password mypassword -mail-only

-web-only

 

Migrates configuration and content except mail.

To migrate content and configuration settings (except mail) of the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's password mypassword:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -password mypassword -web-only

-source-cache-path

<path>

Path to the directory on the source server where temporary backup files and Migration & Transfer Agent are stored.

In order to use the directory /var/cache for temporary files when transferring the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's password mypassword:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -password mypassword -source-cache-path "/var/cache"

-local-cache-path

<path>

Path to the temporary location of all downloads on the destination server.

In order to use the directory /usr/local/psa/PMM/tmp for temporary files when transferring the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's password mypassword:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -password mypassword -local-cache-path "/usr/local/psa/PMM/tmp"

-replace-existing-objects

true|false

Replaces (overwrites) existing objects with identical names. Is true by default.

In order not to replace existing objects when transferring the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's password mypassword:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -password mypassword -replace-existing-objects false

-ip-mapping

<path to file>

Path to the file with IP address mapping. Records in the file must be in the following format: <source IP address> at least one space <destination IP address>. Each record must be placed on a separate line.

 

If not specified, Plesk generates the mapping automatically.

To use IP address mapping stored in the file /etc/file1 when transferring the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's password mypassword:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -password mypassword -ip-mapping /etc/file1

-owner

<login>

Specifies a new owner for migrated Plesk objects. If not specified, then all objects on the destination will be owned by the Plesk administrator.

To transfer the subscription example1.com from the server with IP address 192.168.1.100 and the administrator's password mypassword and make the user user1 the owner of this subscription:

plesk bin migrate --migrate-subscription example1.com -host 192.168.1.100 -password mypassword -owner user1

-accounts-only

 

Do not migrate server settings, migrate only business objects.

Used only with the --migrate-server command.

To skip global server settings and system services' configuration when transferring the data of an entire Plesk server:

plesk bin migrate --migrate-server -host 192.168.1.100 -password mypassword -accounts-only

-skip-license

 

Do not migrate the license key.

Used only with the --migrate-server command.

In order not to replace installed license key when transferring the data of an entire Plesk server:

plesk bin migrate --migrate-server -host 192.168.1.100 -password mypassword -skip-license