vSphere Replication 8.5 Configuration Import/Export Tool包含可用來匯入或匯出組態資料的選項。
選項 | 說明 |
---|---|
--export | 執行匯出時需要。無法與 --import 搭配使用。 |
--properties | 自動使用工具時要載入的內容檔案的路徑。 |
--exportProperties | 用於透過內容檔案啟動匯出。 |
--exportInteractive | 用於以互動方式啟動匯出,並提示輸入必要的資訊。 |
--exportPath | 用於指定要在其中建立匯出檔案的目錄。當目錄未指定時,會將檔案匯出到匯入/匯出工具所在的位置。 |
--import | 匯入組態資料時需要。無法與 --export 搭配使用。 |
--importInteractive | 用於以互動方式啟動匯入,並提示輸入必要的資訊。 |
--importProperties | 用於透過內容檔案啟動匯入。 |
--path | 用於匯入資料。先前匯出檔案的路徑。 |
--lspp | Platform Services Controller 位址。可以是 IP 位址或 FQDN。對於 vSphere Replication,它必須與 lookup.service.address 內容相符。 |
--port <[1, 2147483647]> | Lookup Service 的連接埠號碼。預設值為 443。 |
--localVrName | 本機 vSphere Replication 管理伺服器的名稱。它必須與 local.vr.name 內容相符。 |
--remoteVrName | 遠端 vSphere Replication 管理伺服器的名稱。它必須與 remote.vr.name 內容相符。 |
--localAuthCredsUsername | 本機 vCenter Server 的使用者名稱。 |
--localAuthCredsPass | 本機 vCenter Server 的密碼。 |
--remoteAuthCredsUsername | 遠端 vCenter Server 的使用者名稱。 |
--remoteAuthCredsPass | 遠端 vCenter Server 的密碼。 |
--format | 用於使匯出的 XML 檔案具有更好的格式且更易讀。--format 選項會大幅度增加檔案大小。 |
含內容檔案的範例命令
java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --format --exportProperties=/opt/vmware/vr-impex-tool/sample.properties --exportPath=/opt/vmware/vr-impex-tool/
java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --format --importProperties=/opt/vmware/vr-impex-tool/sample.properties --importPath=/opt/vmware/vr-impex-tool/sample.xml
範例內容檔案
lookup.service.address=my.psc.address.com local.auth.credentials.vc.username=localAdmin local.auth.credentials.vc.password=localAdminSecretPass remote.auth.credentials.vc.username=remoteAdmin remote.auth.credentials.vc.password=remoteAdminSecretPass local.vr.name=sc2-rdops-vm08-dhcp-15-152.eng.vmware.com #local.srm.name=sc-rdops-vm12-dhcp-104-58.eng.vmware.com remote.vr.name=sc-rdops-vm12-dhcp-109-104.eng.vmware.com format=true
互動模式中的範例命令
java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --exportInteractive
java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --importInteractive
使用互動模式的範例
java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --exportInteractive ***Copyright (c) 2018-2019 VMware, Inc. All rights reserved.*** Initiating CMD interaction. Enter host name or IP address of a Lookup Service:10.193.15.152 Enter port (or press Enter in case you use the default - 443): Host sc2-rdops-vm08-dhcp-15-152.eng.vmware.com has untrusted certificate with SHA-1 Thumbprint: 82:CF:58:F2:E7:C6:A1:4C: 89:FC:7B:05:31:DD:13:00:28:21:DA:F3 . Accept thumbprint? (y/n):y Enter username for sc2-rdops-vm08-dhcp-15-152.eng.vmware.com:[email protected] Enter password for sc2-rdops-vm08-dhcp-15-152.eng.vmware.com: Establishing connection... Available VR servers: [0] sc-rdops-vm12-dhcp-109-104.eng.vmware.com [1] sc2-rdops-vm08-dhcp-15-152.eng.vmware.com 0 One VR server found: sc2-rdops-vm08-dhcp-15-152.eng.vmware.com Enter username for pair site 'sc-rdops-vm12-dhcp-109-104.eng.vmware.com':[email protected] Enter password for pair site 'sc-rdops-vm12-dhcp-109-104.eng.vmware.com': Collecting data... Starting export... 2019-10-30 04:21:18,464 DEBUG - VR inventory export started. 2019-10-30 04:21:18,548 DEBUG - Replication groups export started. 2019-10-30 04:21:18,585 DEBUG - VR inventory export ended. 2019-10-30 04:21:19,228 DEBUG - Replication groups export ended. Writing to file started. Writing to file finished. Export ended successfully.
使用不含內容檔案的命令的範例
java -jar C:\Users\Administrator\Downloads\impex\vr-import-export-tool-8.3.0.jar --export --localVrName=sc2-rdops-vm08-dhcp-15-152.eng.vmware.com --remoteVrName=sc-rdops-vm12-dhcp-109-104.eng.vmware.com --lspp=10.193.15.152 --format --exportPath=/opt/vmware/vr-impex-tool/ [email protected] [email protected] --localAuthCredsPass=***** --remoteAuthCredsPass=*****
使用不含內容檔案的命令的範例
java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --export --localVrName=sc2-rdops-vm08-dhcp-15-152.eng.vmware.com --remoteVrName=sc-rdops-vm12-dhcp-109-104.eng.vmware.com --lspp=10.193.15.152 --format --exportPath=/opt/vmware/vr-impex-tool/ [email protected] [email protected] --localAuthCredsPass=***** --remoteAuthCredsPass=***** ***Copyright (c) 2018-2019 VMware, Inc. All rights reserved.*** Initiating CMD interaction. Establishing connection... Collecting data... Starting export... 2019-10-30 04:28:54,426 DEBUG - VR inventory export started. 2019-10-30 04:28:54,508 DEBUG - Replication groups export started. 2019-10-30 04:28:54,543 DEBUG - VR inventory export ended. 2019-10-30 04:28:55,230 DEBUG - Replication groups export ended. Writing to file started. Writing to file finished. Export ended successfully.