vSphere Replication 8.5 Configuration Import/Export Tool包含可用于导入或导出配置数据的不同选项。

表 1. 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.