可以使用属性文件简化 vSphere Replication 配置数据导出或实现导出自动化。

前提条件

过程

  1. vSphere Replication 8.5 Configuration Import/Export Tool 下载到 vSphere Replication 主机虚拟机上的文件夹中。
  2. 打开命令 shell,导航到将该工具提取到的文件夹,然后运行以下命令。
    java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --exportPropererties=Path_to_properties_file
    为了提高 XML 文件的可读性,请添加 format 选项。添加 format 选项会显著增加 XML 文件的大小。

    java -jar /opt/vmware/vr-impex-tool/vr-impex-tool-<version>.jar --exportProperties=Path_to_properties_file --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/
***Copyright (c) 2018-2019 VMware, Inc. All rights reserved.***

Initiating using properties file.

Establishing connection...

Collecting data...

Starting export...

2019-10-28 07:56:52,529 DEBUG - VR inventory export started.

2019-10-28 07:56:52,632 DEBUG - Replication groups export started.

2019-10-28 07:56:52,668 DEBUG - VR inventory export ended.

2019-10-28 07:56:53,329 DEBUG - Replication groups export ended.

Writing to file started.

Writing to file finished.

Export ended successfully.