使用这些脚本可导出应用程序数据,然后将其下载到本地目录。
这些脚本执行以下操作:
Windows 示例脚本
通过复制以下脚本来创建exportDownloadData.ps1
。将其保存到本地目录。
$inputproperties = ConvertFrom-StringData(Get-Content ./input.properties -raw) $username="$($inputproperties.username)" $passwordfile="$($inputproperties.passwordfile)" $serviceURL="$($inputproperties.serviceURL)" $exportFile1="$($inputproperties.exportFile1)" $exportFile2="$($inputproperties.exportFile2)" $exportDataJobName1="$($inputproperties.exportDataJobName1)" $exportDataJobName2="$($inputproperties.exportDataJobName2)" epmautomate login ${username} ${passwordfile} ${serviceURL} epmautomate exportdata ${exportDataJobName1} ${exportFile1} epmautomate exportdata ${exportDataJobName2} ${exportFile2} epmautomate listfiles epmautomate downloadfile ${exportFile1} epmautomate downloadfile ${exportFile2} epmautomate logout
Linux/UNIX 示例脚本
通过复制以下脚本来创建exportDownloadData.sh
。将其保存到本地目录。
#!/bin/bash . ./input.properties export JAVA_HOME=${javahome} ${epmautomatescript} login "${username}" "${passwordfile}" "${serviceURL}" ${epmautomatescript} exportdata "${exportDataJobName1}" "${exportFile1}" ${epmautomatescript} exportdata "${exportDataJobName2}" "${exportFile2}" ${epmautomatescript} listfiles ${epmautomatescript} downloadfile "${exportFile1}" ${epmautomatescript} downloadfile "${exportFile2}" ${epmautomatescript} logout
创建 input.properties 文件
通过复制以下内容之一并使用环境信息进行相应的更新来创建 input.properties
文件。将文件保存在存储 exportDownloadData.ps1
或 exportDownloadData.sh
的目录中。
Windows
username=exampleAdmin passwordfile=examplePassword.epw serviceURL=exampleURL exportFile1=FILE_NAME.zip exportFile2=FILE_NAME.zip exportDataJobName1=JOB_NAME exportDataJobName2=FILE_NAME
Linux/UNIX
javahome=JAVA_HOME epmautomatescript=EPM_AUTOMATE_LOCATION username=exampleAdmin passwordfile=examplePassword.epw serviceURL=exampleURL exportFile1=FILE_NAME.zip exportFile2=FILE_NAME.zip exportDataJobName1=FILE_NAME exportDataJobName2=FILE_NAME
表 3-19 input.properties 参数
参数 | 说明 |
---|---|
javahome |
JAVA_HOME 位置。仅限 Linux/UNIX。 |
epmautomatescript |
EPM Automate 可执行文件 (epmautomate.sh ) 的绝对路径。仅限 Linux/UNIX。 |
username |
同时具有身份域管理员角色的服务管理员的用户名。 |
password |
服务管理员的密码或加密密码文件的名称和位置。 |
serviceURL |
要从其生成快照的环境的 URL。 |
exportFile1 和 exportFile2 |
要将数据导出到的文件的名称。 |
exportDataJobName1 和 exportDataJobName2 |
用于导出数据的作业。 |
运行脚本
exportDownloadData.ps1
或 exportDownloadData.sh
。input.properties
文件,并将其保存在 exportDownloadData
脚本所在的目录中。此文件的内容因操作系统的不同而异。请参阅“表 3-19”。
请确保您对此目录具有写权限。对于 Windows,您可能需要使用以管理员身份运行选项启动 PowerShell,以便能够运行脚本。
exportDownloadData.ps1
。./exportDownloadData.sh
。