通过命令行迁移
若要从Plesk for Linux、cPanel、Confixx或Pro Control Panel 迁移到 Plesk for Linux 服务器,请如下操作:
通过 SSH 登录到目的 Plesk 服务器。
请确保安装了 Plesk Migrator。若未安装,请根据 此处 的说明进行安装。
-
从
/usr/local/psa/admin/plib/modules/panel-migrator/backend/conf/samples/目录复制配置文件样本到/usr/local/psa/var/modules/panel-migrator/conf/目录。请选择以下当中的一个样本文件:plesk-unix.simple.ini、cpanel.simple.ini、confixx.simple.ini和ppcpl.simple.ini样本是基本的,只包含迁移所需的最少信息。plesk-unix.ini, cpanel.ini、confixx.ini和ppcpl.ini是比较全面且较好注释的配置文件,能够配置更广泛的迁移选项。
为了您的方便,可 在此 找到配置文件样本的内容。复制该文件后,将其重命名为
config.ini。 编辑
config.ini文件指定源和目的服务器的 IP 地址,以及源服务器 root 用户的 SSH 密码(迁移必需的最少量信息)。您还可以指定其它的设置 - 请参阅 编辑 Plesk Migrator 配置文件 主题了解更多详情。-
运行以下命令生成迁移列表:
/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator generate-migration-list生成的文件将被命名为
migration-list且被放置于/usr/local/psa/var/modules/panel-migrator/sessions/migration-session/目录中。迁移列表包含要迁移的一系列对象(客户和代理商帐户、服务方案、域名,等等)。 编辑迁移列表。您可以移除您不想迁移的域名,分配您要迁移给服务方案的域名,或在客户帐户之间重新分配域名。
如果您想要手动分配地址,请指定网站应使用的新 IP 地址。默认会自动执行 IP 映射。您可以在 此处 了解有关 IP 映射的详情。
-
运行以下命令执行迁移前检查:
/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator check运行命令将会引起一系列您在迁移过程中可能会遇到的潜在问题。每次更改迁移列表时都必须要执行 “check” 命令。
-
运行以下命令开始迁移:
/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator transfer-accounts -
(推荐)迁移完成后,运行以下命令检查目的服务器上迁移过来的对象的可操作性:
/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator test-all
若要从Plesk for Windows 或 Helm 3 迁移到 Plesk for Windows 服务器:
通过 RDP 登录到目的 Plesk 服务器并打开命令提示。
请确保安装了 Plesk Migrator。若未安装,请根据 此处 的说明进行安装。
-
从
%plesk_dir%admin\plib\modules\panel-migrator\backend\conf\samples\目录复制配置文件样本到<PLESK_DATA_DIRECTORY>\var\modules\panel-migrator\conf\目录。若要在服务器上找到<PLESK_DATA_DIRECTORY>的位置,请运行以下命令:reg query "HKLM\SOFTWARE\Plesk\PSA Config\Config" /v PRODUCT_DATA_D /reg:32请选择以下当中的一个样本文件:
The
plesk-windows.simple.ini样本是基础文件只包含迁移必需的最少量信息。The
plesk-windows.ini样本是全面且注释好的配置文件,能够配置不同的迁移选项。
为了您的方便,可 在此 找到配置文件样本的内容。复制该文件后,将其重命名为
config.ini。 编辑
config.ini文件指定源和目的服务器的 IP 地址,以及源服务器管理员用户的密码(迁移必需的最少量信息)。您还可以指定其它的设置 - 请参阅 编辑 Plesk Migrator 配置文件 主题了解更多详情。-
运行以下命令生成迁移列表:
%plesk_dir%admin/plib/modules/panel-migrator/backend/plesk-migrator.bat generate-migration-list生成的文件将被命名为
migration-list且被放置于<PLESK_DATA_DIRECTORY>\var\modules\panel-migrator\sessions\migration-session\目录中。迁移列表包含要迁移的一系列对象(客户和代理商帐户、服务方案、域名,等等)。 编辑迁移列表。您可以移除您不想迁移的域名,分配您要迁移给服务方案的域名,或在客户帐户之间重新分配域名。
如果您想要手动分配地址,请指定网站应使用的新 IP 地址。默认会自动执行 IP 映射。您可以在 此处 了解有关 IP 映射的详情。
-
(推荐)运行以下命令执行迁移前检查:
%plesk_dir%admin/plib/modules/panel-migrator/backend/plesk-migrator.bat check运行命令将会引起一系列您在迁移过程中可能会遇到的潜在问题。
-
运行以下命令开始迁移:
%plesk_dir%admin/plib/modules/panel-migrator/backend/plesk-migrator.bat transfer-accounts -
(推荐)迁移完成后,运行以下命令检查目的服务器上迁移过来的对象的可操作性:
%plesk_dir%admin/plib/modules/panel-migrator/backend/plesk-migrator.bat test-all
Using command‑line options with Plesk Migrator
When migrating via the command line, you can pass additional options to the plesk-migrator executable.
These options allow you to control logging, profiling, data fetching, content transfer, licensing checks, and more.
To view all available options at any time, run:
plesk-migrator check --help
Common options:
Option |
Description |
|---|---|
|
Show help and exit. |
|
Run the command asynchronously. |
|
Hide log entries in console output. |
|
Increase debug level. |
|
Disable or enable writing the profiling report. |
|
Path to a file whose creation triggers a safe shutdown. |
|
Use a specific progress task ID. |
Migration behavior options:
Option |
Description |
|---|---|
|
Continue migration even if pre-migration errors occur (intended for Plesk Support only). |
|
Create new webspaces using only the resources required by the corresponding subscriptions. |
|
Fetch data again from the source instead of using cached data. |
|
Do not check the source or target services for potential issues. |
|
Skip license validation on the target server. |
Migration list options:
Option |
Description |
|---|---|
|
Specify the migration list file (default: |
|
Migration list format (text by default). |
|
Continue the migration even if the migration list contains errors. |
IP mapping:
Option |
Description |
|---|---|
|
Provide a file that maps source IPs to target IPs. |
Content transfer options:
Option |
Description |
|---|---|
|
Do not transfer web files. |
|
Do not transfer email messages. |
|
Do not transfer database content. |
Additional cCopy options:
Option |
Description |
|---|---|
|
Copy server-wide mail settings (supported on Plesk 12.0 and later). |
|
Copy admin profiles (supported on Plesk 12.0 and later). |
|
Install missing extensions (supported on Plesk 17.0 and later). |
|
Copy server-wide extension settings (supported on Plesk 17.0 and later). |