これらのスクリプトを使用して、アプリケーション・データをエクスポートした後、ローカル・ディレクトリにダウンロードします。
これらのスクリプトは、次の操作を実行します:
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自動化の実行可能ファイル(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
を実行します。