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 Fusion Cloud Enterprise Performance Management 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 Cloud EPM.
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:
|
epmautomateExe |
Directory where EPM Automate is
installed.
Example:
|
cloudServiceUser |
User ID of a Cloud EPM
Service Administrator.
Example:
|
cloudServicePassword |
Password of the Service Administrator or the location of the password file. If the password contains special characters, see Handling Special Characters.
Example: |
cloudServiceUrl |
URL of the Cloud EPM environment from which Artifact Snapshot is to be copied.
Example: |
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: |
objectStoragePassword |
Password of the objectStorageUser .
Example: |
objectStorageBucketUrl |
URL of the Oracle Object Storage bucket where the snapshot is to be copied. See these information sources for the URL format:
Example: |
snapshot |
Name of the snapshot that you want to copy from the Oracle Object Storage bucket.
Example: |
Sample EPM Automate Script to Copy a Snapshot from Cloud EPM to Oracle Object Storage
Customize and run this script to rename and then copy Artifact Snapshot
from Cloud EPM 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 Cloud EPM
Customize and run this script to copy Artifact Snapshot
of a specific date from an Oracle Object Storage bucket to Cloud EPM.
#!/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