Export and Download Application Data
Use these scripts to export application data and then to download it to a local directory.
These scripts perform the following operations:
- Signs in to an environment.
- Backs up two sets of data using the jobs that you specify.
- Downloads the exported data files.
- Signs out.
Windows Sample Script
CreateexportDownloadData.ps1
by copying this script.
Save it to a local
directory.$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 Sample Script
CreateexportDownloadData.sh
by copying this script.
Save it to a local directory.#!/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
Creating the input.properties File
Create the input.properties
file by copying one of the following and
updating it with information for your environment. Save the file in the directory
where exportDownloadData.ps1
or
exportDownloadData.sh
is stored.
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
Table 3-20 input.properties Parameters
Parameter | Description |
---|---|
javahome |
JAVA_HOME location. For Linux/UNIX only.
|
epmautomatescript |
Absolute path of EPM Automate
executable (epmautomate.sh ). For Linux/UNIX
only.
|
username |
User name of a Service Administrator, who also has the Identity Domain Administrator role. |
password |
Password of the Service Administrator or the name and location of the encrypted password file. |
serviceURL |
URL of the environment from which you want to generate the snapshot. |
exportFile1 and exportFile2 |
Name of the file to which data is to be exported. |
exportDataJobName1 and
exportDataJobName2 |
Job to use for exporting the data. |
Running the Scripts
- Create
exportDownloadData.ps1
orexportDownloadData.sh
by copying the script from a preceding section. - Create the
input.properties
file and save it in the directory where theexportDownloadData
script is located. Contents of this file differs depending on your operating system. See Table 3-20.Make sure that you have write privileges in this directory. For Windows, you may need to start PowerShell using the Run as Administrator option to be able to run the script.
- Launch the script.
- Windows PowerShell: run
exportDownloadData.ps1
. - Linux/UNIX: run
./exportDownloadData.sh
.
- Windows PowerShell: run