WASPostUpgrade 指令
WebSphere® Application Server 的 WASPostUpgrade 指令會從您指定的 backupDirectory 中,擷取 WASPreUpgrade 指令所建立的已儲存配置。 WebSphere Application Server 的 WASPostUpgrade Script 會從這個目錄讀取配置,以移轉至 WebSphere Application Server 9.0 ,並將所有已移轉的應用程式新增至 9.0 安裝架構的 app_server_root/installedApps 目錄。
本主題是關於設定檔配置移轉。 若要將應用程式移轉至最新版本,請使用 WebSphere Application Server Migration Toolkit。
位置
指令檔在 app_server_root/bin 目錄中,且必須從這個目錄來執行。
語法
WASPostUpgrade.sh backupDirectory
[-properties properties_file_name]
[-username userID]
[-password password]
[-oldProfile profile_name]
[-profileName profile_name]
[-setPorts useOld | generateNew | port_starting_number]
[-resolvePortConflicts incrementCurrent | port_starting_number]
[-backupConfig true | false]
[-includeApps true | false | script]
[-clone true | false]
[-requestTimeout seconds]
[-javaoption -Xms...m -javaoption -Xmx...m]
[[-appInstallDirectory user_specified_directory] |
[-keepAppDirectory true | false]]
[-traceString trace_spec [-traceFile file_name]]WASPostUpgrade.bat backupDirectory
[-properties properties_file_name]
[-username userID]
[-password password]
[-oldProfile profile_name]
[-profileName profile_name]
[-setPorts useOld | generateNew | port_starting_number]
[-resolvePortConflicts incrementCurrent | port_starting_number]
[-backupConfig true | false]
[-includeApps true | false | script]
[-clone true | false]
[-requestTimeout seconds]
[-javaoption -Xms...m -javaoption -Xmx...m]
[[-appInstallDirectory user_specified_directory] |
[-keepAppDirectory true | false]]
[-traceString trace_spec [-traceFile file_name]]
WASPostUpgrade.sh backupDirectory
[-oldAdminAgentProfilePath path to old admin agent]
[-oldAdminAgentSoapPort soap port of old admin agent]
[-oldAdminAgentHostname hostname of old admin agent, defaults to localhost ]
[-oldAdminAgentUsername login username for old admin agent, if admin security is enabled ]
[-oldAdminAgentPassword login password for old admin agent, if admin security is enabled ]
[-newAdminAgentProfilePath path to new admin agent ]
[-newAdminAgentSoapPort soap port of new admin agent ]
[-newAdminAgentHostname hostname of new admin agent, defaults to localhost ]
[-newAdminAgentUsername login username for new admin agent, if admin security is enabled ]
[-newAdminAgentPassword login password for new admin agent, if admin security is enabled ]WASPostUpgrade.bat backupDirectory
[-oldAdminAgentProfilePath path to old admin agent]
[-oldAdminAgentSoapPort soap port of old admin agent]
[-oldAdminAgentHostname hostname of old admin agent, defaults to localhost ]
[-oldAdminAgentUsername login username for old admin agent, if admin security is enabled ]
[-oldAdminAgentPassword login password for old admin agent, if admin security is enabled ]
[-newAdminAgentProfilePath path to new admin agent ]
[-newAdminAgentSoapPort soap port of new admin agent ]
[-newAdminAgentHostname hostname of new admin agent, defaults to localhost ]
[-newAdminAgentUsername login username for new admin agent, if admin security is enabled ]
[-newAdminAgentPassword login password for new admin agent, if admin security is enabled ]參數
指令的參數如下:
- 這是必要的參數。 值 backupDirectory 指定目錄的名稱,以供 WASPreUpgrade 工具用來存放所儲存的配置與檔案,以及供 WASPostUpgrade 工具讀取其中的配置與檔案。
- 這是選用性參數。 properties_file_name 值指定內容檔的路徑,內容檔包含用來定義 WASPostUpgrade 之類移轉工具要如何操作的參數內容。
您可以在移轉內容檔中定義參數內容,而不在指令行上指定大部分的選用參數。 如果在內容檔定義參數也在指令行指定參數,則指令行所指定的參數優先。
附註: 無法在內容檔中指定某些參數,例如 -properties 參數本身以及 -username 和 -password。 如需無法定義為內容的參數清單,請參閱 app_server_root/bin 目錄中的範本 migration.properties 檔。 - 這是選用性參數。 值 userID 指定現行 WebSphere Application Server 7.0 或更新版本 安裝架構的管理使用者名稱。
- 這是選用性參數。 password 值指定現行 WebSphere Application Server 7.0 或更新版本 安裝架構之管理使用者名稱的密碼。提示: 當您需要在「移轉」精靈中指定密碼時,或當您在指令行上搭配使用 WASPostUpgrade 指令與-password 參數時,可以使用純文字輸入密碼或使用 xor 加密值。 如果要使用 xor 加密值,請輸入整個密碼,包括以 {xor} 字首作為參數的值。 這個 xor 加密值可以指定在先前配置的任何一個 WebSphere Application Server 配置檔中,包括 soap.client.props、 ssl.client.props和 security.xml 檔。提示: 當您在指令行上搭配使用 WASPostUpgrade 指令與-password 參數時,可以使用純文字鍵入密碼或使用 xor 加密值。 如果要使用 xor 加密值,請輸入整個密碼,包括以 {xor} 字首作為參數的值。 這個 xor 加密值可以指定在先前配置的任何一個 WebSphere Application Server 配置檔中,包括 soap.client.props、 ssl.client.props和 security.xml 檔。
- 這是用於從舊版 WebSphere Application Server 移轉實例或設定檔的選用參數。 執行這個指令之前,實例或設定檔必須已存在於移轉備份目錄中。如果未指定 -oldProfile 參數,就會使用預設設定檔。 如果找不到預設設定檔,系統會報告錯誤。避免麻煩: 如果您未在-oldProfile上指定特定的設定檔名稱,則會移轉指定的 "default" 設定檔。 您可能必須使用 WASPostUpgrade 後置移轉指令,針對用戶端在新的 9.0 環境中需要的每一個設定檔,指定-oldProfile 和-profileName 參數,來移轉備份中的每一個設定檔。 如果在範例應用程式和系統應用程式之外,舊設定檔還包含已安裝的應用程式 (installedApps),移轉程序會自動移轉那些應用程式。
- 這是用於移轉至 WebSphere Application Server 9.0中特定設定檔的選用參數。 profile_name 值指定 Script 移轉您配置時的目標 9.0 設定檔名稱。 您必須已建立這個設定檔,才能呼叫 WASPostUpgrade 指令。如果未指定 -profileName 參數,就會使用預設設定檔。 如果找不到預設設定檔,系統會報告錯誤。避免麻煩: 如果您未在-profileName上指定特定的設定檔名稱,則會移轉指定的 "default" 設定檔。 您可能必須利用 WASPostUpgrade 後置移轉指令,針對用戶端在新的環境中所想要的每個設定檔來指定 -oldProfile 和 -profileName 參數,以移轉預先移轉時所備份的每個設定檔。 如果在範例應用程式和系統應用程式之外,舊設定檔還包含已安裝的應用程式 (installedApps),移轉程序會自動移轉那些應用程式。附註: 從 9.0移轉獨立式應用程式伺服器時,您可以選擇已向管理代理程式登錄的獨立式應用程式伺服器節點作為移轉目標。
- 這是選用參數,用來指定在 WASPostUpgrade 工具進行任何變更之前,是否先儲存現有的 WebSphere Application Server 9.0 配置。 預設值為 true-亦即,使用 backupConfig 指令將現行配置的副本儲存至 profile_name/temp 目錄。
若有需要,可使用 restoreConfig 指令來還原該配置。 如需相關資訊,請參閱 restoreConfig 指令。
- 這是選用參數,指定如何設定新設定檔的埠。 此參數接受下列值:
如果您為這個參數指定一值,任何所要指派的新埠,都會根據此值來設定。 每當需要新埠值時,就會根據此值來建立埠,並讓種子值增量,以供下次使用。 不會指派重複埠。
- 這個選用參數用來指定如何對映埠值。 某個埠無法使用時,它的值會從一個起始值開始遞增,直到找到可用的埠為止。
- 您可以在移轉的過程中,併入商業層次的應用程式、資產和組合單元。 您可以選擇性地在 WASPostUpgrade 指令中,利用 -IncludeApps 參數來移轉這些項目。 這個選用參數有下列數種的指定方式:
不論此參數所設定的值為何, WebSphere Application Server 系統應用程式都會移轉。
- 此選用參數指出是否執行複製移轉,這表示在將來源設定檔移轉至 9.0版 環境之後,您可以繼續使用來源設定檔。 預設值為
false。您可以將 WebSphere Application Server 9.0 設定檔從一個 WebSphere Application Server 9.0 安裝架構移轉至另一個安裝架構,包括移轉至不同機器上的安裝架構。 若要這樣做,請在 WASPreUpgrade 指令上設定 -allowSameRelease 參數,並將 -clone 參數設為
true。當 -clone 參數為 true 時,您只能針對遠端移轉 (即移轉至不同機器) 指定 -setPorts useold 。 對於本端移轉,您無法指定 -setPorts useold。 新的設定檔配置必須使用唯一埠號,以便現在共存的新舊配置不會有埠衝突。
- 這個選用參數用來指定是否將所有的應用程式,安裝至它們目前所在的相同目錄中。 預設值是 false。
如果將這個參數指定為 true,每一個個別的應用程式都會保留其位置。
如果您指定這個參數,就不能指定 -appInstallDirectory 參數。
限制: 如果將此參數指定為 true ,則現有 WebSphere Application Server 7.0 或更新版本 安裝及 9.0 安裝會共用該位置。 如果您將移轉後的應用程式保留在與舊版相同的位置中,將會有下列若干限制: - 移轉期間當安裝所有應用程式時,可使用這個選用參數來傳遞要使用的目錄名稱。 如果沒有指定這個參數,會使用預設的 profile_name\installedApps。
如果您指定這個參數,就不能指定 -keepAppDirectory 參數。
如果目錄名稱中有一或多個空格,必須用引號括住名稱。
如果您使用這個參數,移轉工具會同時在備份目錄(舊版的變數)與目的地設定檔(新版中的變數)中,針對所要移轉的節點,探索節點層次的變數。 只要路徑是這些版本中之下列任何變數的一部分,工具就會簽訂路徑資訊,以使用相關的變數:MIGR0341W: Application install directory has been updated to {0}.例如:MIGR0341W: Application install directory has been updated to ${USER_INSTALL_ROOT}\customAppDirectory.或MIGR0341W: Application install directory has been updated to ${APP_INSTALL_ROOT}\ cellName\customAppDirectory\. - 這是選用性參數。 值 trace_spec 指定您要收集的追蹤資訊。
如果要收集所有的追蹤資訊,請指定 "*=all=enabled"(含雙引號)。
如果沒有指定 -traceString 或 -traceFile 參數,依預設,指令會建立一個追蹤檔,並將它放在 backupDirectory/logs 目錄中。
- 這是選用性參數。 值 file_name 會指定輸出檔的名稱,以取得追蹤資訊。
如果沒有指定 -traceString 或 -traceFile 參數,依預設,指令會建立一個追蹤檔,並將它放在 backupDirectory/logs 目錄中。
- 這是選用性參數。 秒值是指移轉所等待的秒數,過了這個秒數,就將嘗試的 wsadmin 連線設為失敗。
在應用程式移轉期間,這個值也用來作為逾時參數。
- 這是選用性參數。 舊管理代理程式的路徑值是指原始管理代理程式之設定檔目錄的檔案系統路徑。
只有在所移轉的應用程式伺服器接受管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 舊管理代理程式的 SOAP 埠值是指原始管理代理程式用於管理連線的 SOAP 埠。
只有在所移轉的應用程式伺服器接受管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 舊管理代理程式的主機名稱值是指原始管理代理程式的主機名稱位置。 如果未指定這個參數,依預設,這個值會設為 "localhost"。
只有在所移轉的應用程式伺服器接受管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 舊管理代理程式的登入使用者名稱值是指原始管理代理程式的使用者名稱。
只有在所移轉的應用程式伺服器接受啟用管理安全之管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 新管理代理程式的路徑值是指新的已移轉的「管理代理程式」之設定檔目錄的檔案系統路徑。
只有在所移轉的應用程式伺服器接受管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 舊管理代理程式的 SOAP 埠值是指新的已移轉的「管理代理程式」用於管理連線的 SOAP 埠。
只有在所移轉的應用程式伺服器接受管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 舊管理代理程式的主機名稱值是指新的「管理代理程式」的主機名稱位置。 如果未指定這個參數,依預設,這個值會設為 "localhost"。
只有在所移轉的應用程式伺服器接受管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 舊管理代理程式的登入使用者名稱值是指新的「管理代理程式」的使用者名稱。
只有在所移轉的應用程式伺服器接受啟用管理安全之管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 舊管理代理程式的登入密碼值是指新的「管理代理程式」的使用者名稱。
只有在所移轉的應用程式伺服器接受啟用管理安全之管理代理程式的管理時,才需要這個參數。
- 這是選用性參數。 請利用這個參數來指定 WASPostUpgrade 所用的 Java 資料堆記憶體大小。
"-Xms...m" 值指定起始資料堆大小。 請將 "..." 更換為您需要的大小 (MB)。 比方說,如果起始資料堆大小是 128 MB,請將這個參數指定為:-javaoption -Xms128m
"-Xmx...m" 值指定資料堆大小上限。 請將 "..." 更換為您需要的大小 (MB)。 比方說,如果資料堆大小上限是 1024 MB,請將這個參數指定為:-javaoption -Xms1024m
記載
WASPostUpgrade 工具在執行時,會在畫面中顯示狀態。 這個工具也會將一組較廣泛的記載資訊,儲存在位於 backupDirectory/logs 目錄的 WASPostUpgrade.time_stamp.log 檔中。 您可以使用文字編輯器來檢視 WASPostUpgrade.time_stamp.log 檔。
安全考量
移轉之前,目標系統必須先停用安全。 如果您從已啟用安全的來源配置移轉,在移轉期間, WASPostUpgrade 指令會自動啟用 9.0 目標配置的安全。