通過命令列遷移
若要從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). |