Copying a Snapshot to or from Oracle Object Storage

This topic contains sample scripts to complete these tasks:

  • Copy Artifact Snapshot (the maintenance snapshot) from Oracle Enterprise Performance Management Cloud to an Oracle Object Storage bucket and rename it by appending the date on which the snapshot was copied.
  • Copy a backup snapshot from an Oracle Object Storage bucket to EPM Cloud.

The scripts in this section assume that you have already created a bucket in Oracle Object Storage to hold the snapshot. Before running these scripts, customize them for your use by updating these place holders:

Table 3-1 Parameters and Their Values

Place Holder Expected Value
JAVA_HOME Directory where the JDK used by EPM Automate is installed.

Example: ./home/JDK/bin

epmautomateExe Directory where EPM Automate is installed.

Example: ./home/utils/EPMAutomate/bin

cloudServiceUser User ID of an EPM Cloud Service Administrator.

Example: John.doe@example.com

cloudServicePassword Password of the Service Administrator or the location of the password file. If the password contains special characters, see Handling Special Characters.

Example: ex_PWD_213

cloudServiceUrl URL of the EPM Cloud environment from which Artifact Snapshot is to be copied.

Example: https//test-cloud-id_Dom.pbcs.us1.oraclecloud.com

objectStorageUser User ID of a user in Oracle Object Storage.

To copy a snapshot to Object Storage, this user must have write access for the bucket to which the snapshot is copied. To copy a snapshot from Object Storage, this user must have read access for the bucket from which the snapshot is copied.

Example: jDoe

objectStoragePassword Password of the objectStorageUser.

Example: example_PWD

objectStorageBucketUrl URL of the Oracle Object Storage bucket where the snapshot is to be copied. See these information sources for the URL format:

Example: https//swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/axaxnpcrorw5/bucket-20210301-1359

snapshot Name of the snapshot that you want to copy from the Oracle Object Storage bucket.

Example: Artifact Snapshot20210429.zip

Sample EPM Automate Script to Copy a Snapshot from EPM Cloud to Oracle Object Storage

Customize and run this script to rename and then copy Artifact Snapshot from EPM Cloud to an Oracle Object Storage bucket.

#!/bin/sh
export JAVA_HOME=<path_to_jdk>
epmautomateExe=<path_to_epmautomate_executable>
cloudServiceUser=<cloud_service _user>
cloudServicePassword=<cloud_service_password>
cloudServiceUrl=<cloud_service_url>
# User with write access to Object Storage bucket
objectStorageUser=<object_storage_user> 
objectStoragePassword=<object_storage_password>
objectStorageBucketUrl=<object_storage_bucket>
currentDate=`date +'%Y%m%d'`
sourceSnapshot="Artifact Snapshot"
targetSnapshot="${sourceSnapshot} ${currentDate}"
$epmautomateExe login ${cloudServiceUser} ${cloudServicePassword} ${cloudServiceUrl}
$epmautomateExe renamesnapshot "${sourceSnapshot}" "${targetSnapshot}"
$epmautomateExe copyToObjectStorage "${targetSnapshot}" ${objectStorageUser} ${objectStoragePassword} "${objectStorageBucketUrl}/${targetSnapshot}"
$epmautomateExe logout
exit 0

Sample EPM Automate Script to Copy a Snapshot from Oracle Object Storage to EPM Cloud

Customize and run this script to copy Artifact Snapshot of a specific date from an Oracle Object Storage bucket to EPM Cloud.

#!/bin/sh
export JAVA_HOME=<path_to_jdk>
epmautomateExe=<path_to_epmautomate_executable>
cloudServiceUser=<cloud_service _user>
cloudServicePassword=<cloud_service_password>
cloudServiceUrl=<cloud_service_url>
# User with read access to Object Storage bucket
objectStorageUser=<object_storage_user> 
objectStoragePassword=<object_storage_password>
objectStorageBucketUrl=<object_storage_bucket>
snapshot=<desired_snapshot>
$epmautomateExe login ${cloudServiceUser} ${cloudServicePassword} ${cloudServiceUrl}
$epmautomateExe copyFromObjectStorage ${objectStorageUser} ${objectStoragePassword} "${objectStorageBucketUrl}/${snapshot}"
$epmautomateExe logout
exit 0