Scenario 5: Archive Backups from the Service to Onpremise

In this scenario, you run a sequence of commands to complete these steps. Generally, you create backups using the exportmetadata or exportdata commands. Additionally, Planning creates an artifact snapshot during the daily maintenance window. You can download this snapshot as backup. For detailed information, see Working with EPM Automate.

  • Sign in to the instance using these credentials. Substitute the service administrator user name, password, and identity domain of the service instance for the italicized placeholders here and in the EPM Automate sample.

    • User name: USERNAME

    • Password file: C:/mySecuredir/password.epw

      You need to create this file manually. See the encrypt command in Command Reference in Working with EPM Automate for Oracle Enterprise Performance Management Cloud .

    • URL: https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com

    • Identity Domain: IDENTITYDOMAIN

  • Create data backups (entitydata.zip and forecastdata.zip)

  • List files in the repository

  • Download backup files (entitydata.zip and forecastdata.zip ) to the local machine.

  • Log out

Example 2-17 EPM Automate

epmautomate login username password https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com identitydomain
epmautomate exportdata entitydata entitydata.zip
epmautomate exportdata forecastdata forecastdata.zip
epmautomate listfiles
epmautomate downloadfile entitydata.zip
epmautomate downloadfile forecastdata.zip
epmautomate logout

EPM Automate displays a code in the console to indicate the status of the operation. See Working with EPM Automate.

Example 2-18 Java

public void integrationScenarioExportDataAndDownloadFiles() throws Exception {
	executeJob("EXPORT_DATA", "entitydata", "{exportFileName:entitydata.zip}");
	executeJob("EXPORT_DATA", "forecastdata", "{exportFileName:forecastdata.zip}");
	listFiles();
	downloadFile("entitydata.zip");
	downloadFile("forecastdata.zip");
}

Common Functions: See Common Helper Functions for Java.

Dependent APIs: See Java Sample — ExecuteJob.java and Java Sample — DownloadFile.java in Upload and Download Files.

Example 2-19 cURL

funcIntegrationScenarioExportDataAndDownloadFiles() {
	funcExecuteJob "EXPORT_DATA" "entitydata" "{exportFileName:entitydata.zip}"
	funcExecuteJob "EXPORT_DATA" "forecastdata" "{exportFileName:forecastdata.zip}"
	funcListFiles
	funcDownloadFile "entitydata.zip"
	funcDownloadFile "forecastdata.zip"
}

Example 2-20 Groovy

def integrationScenarioExportDataAndDownloadFiles() {
	executeJob("EXPORT_DATA", "entitydata", "exportFileName:entitydata.zip");
	executeJob("EXPORT_DATA", "forecastdata", "exportFileName:forecastdata.zip");
	listFiles();
	downloadFile("entitydata.zip");
	downloadFile("forecastdata.zip");
}