이러한 스크립트를 사용하여 애플리케이션 데이터를 익스포트한 다음, 로컬 디렉토리로 다운로드합니다.
이러한 스크립트는 다음 작업을 수행합니다.
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 |
ID 도메인 관리자 역할도 가진 서비스 관리자의 사용자 이름입니다. |
password |
서비스 관리자의 비밀번호 또는 암호화된 비밀번호 파일의 이름 및 위치입니다. |
serviceURL |
스냅샷을 생성하려는 소스 환경의 URL입니다. |
exportFile1 및 exportFile2 |
데이터를 익스포트할 타겟 파일의 이름입니다. |
exportDataJobName1 및 exportDataJobName2 |
데이터를 익스포트하는 데 사용할 작업입니다. |
스크립트 실행
exportDownloadData.ps1
또는 exportDownloadData.sh
를 생성합니다.input.properties
파일을 생성하고 exportDownloadData
스크립트가 있는 디렉토리에 저장합니다. 이 파일의 콘텐츠는 운영 체제에 따라 다릅니다. 표 3-19를 참조하십시오.
이 디렉토리에서 쓰기 권한이 있어야 합니다. Windows의 경우 관리자 권한으로 실행 옵션으로 PowerShell을 시작해야 스크립트를 실행할 수 있습니다.
exportDownloadData.ps1
을 실행합니다../exportDownloadData.sh
를 실행합니다.