OAC – Scripted Backups on Autonomous

Guillaume Slee
EPM Services Director

So, you’ve got Oracle Autonomous Analytics Cloud and you want to schedule a backup of your BI and Essbase applications.

Essbase has the nice esscs/esscli command line REST API wrapper to which will perform an LCM backup for you and you’ve got the MaxL client which you can use to perform data exports. I’ll show an example of this further down this blog

However, at the time of writing this blog there aren’t any documented REST API commands to perform an automated BI BAR extract (these are in the pipeline). This means there isn’t an obvious way to schedule your own non-Oracle backup.

BI Admin Tool and Catalog Manager to the Rescue!

Fortunately, you can use the command line to launch BI Admin Tool and Catalog Manager commands. There’s not much documentation so I’ve blogged how you use these tools to connect to your Oracle Analytics Cloud instance.

OAC RPD Backup

Here we will download and backup our RPD using the datamodel.cmd tool which comes with BI Client. There’s some documentation on the utility here.

There isn’t any info in the link about above on how to use this with OAC Autonomous. However, if you’re a curious bugger like me you may have noticed that the Admin Tool logs seem to record command line versions of your UI actions!

You can find the log here: <BI Client Install> \domains\bi\servers\obis1\logs\Administrator_NQSAdminTool.log

I found this string in the log:
E:\OACS\BI_Client\bi\bitools\bin\\..\..\bitools\bin\datamodel.cmd downloadrpd -O E:\OACS\BI_Client\bi\bifoundation\server\85FA.tmp -W ******* -U <USERNAME> -P ******* -Q E:\OACS\BI_Client\bi\bifoundation\server\85FB.tmp -SI bootstrap -S
<tenant_name>.analytics.ocp.oraclecloud.com -N 443 -SSL -TS
E:\OACS\BI_Client\oracle_common\jdk\jre\lib\Security\cacerts -TSP ******* -Y

Cool! This is what the command looks like in the command line when connecting to Autonomous Analytics:

<BI Client Install>\bi\bitools\bin\datamodel.cmd downloadrpd -O liverpd.rpd -W RPD_PWD -U
<USERNAME> -P <PASSWORD> -SI bootstrap -S <BI_HOST> -N 443 -SSL -TS E:\OACS\BI_Client\oracle_common\jdk\jre\lib\Security\cacerts -TSP <TRUST STORE PASSWORD>

The BI_HOST will be something like myinstance-tenantname.analytics.ocp.oraclecloud.com
The OAC RPD file is called liverpd.rpd.

This will download liverpd.rpd into your current working directory. You can then use your scripting tool of choice to rename/timestamp etc. Nice and simple!

OAC Catalog Backup

Luckily since OAC Developer Client 19.1.1 the BI Catalog Manager is supported in OAC. You can also use the Catalog Manager in the command line. This will enable us to download an archive file of any folders/objects available to us in BI. I had some issues getting the syntax correct so again I hope this will help some people with their scripts.

There is some info on the command line here. There are a few blog posts out there but nothing specific to OAC.

To run catalog manager from the command line you run the runcat.cmd/sh command:

<BI Client Install>\bi\bitools\bin\runcat.cmd

To view the help run:
runcat.cmd -help

To view help on a specific command run:
runcat.cmd -cmd <command> -help

To archive your catalog run the archive command:

runcat.sh -cmd archive -online https://myinstance-
tenant.analytics.ocp.oraclecloud.com/analytics-ws/saw.dll? -credentials credentials.txt
folder /shared -forceOutputFile E:\OACS\Backup\Shared_Archive

The credentials.txt file is where you store your OACS username and password in the following format:

It would be nice if you could encrypt this but I don’t think you can.

The example above will archive my entire BI /shared folder and download it to my client machine in a file called E:\OACS\Backup\Shared_Archive.

Essbase LCM Backup

Thankfully the Essbase backup is a very simple process. Use the Essbase Client tool to perform an LCM backup of the Essbase application and download to your client machine. The documentation can be found here.

esscs lcmExport -v -a Sample -z Sample.zip -ld E:\Essbase\Backup

The command will create a zip file containing LCM extracts of all the Essbase databases associated with the application.
Essbase will perform an All Data export of each database across 10 threads.

If your database is large you have the option to use the -skipdata flag to exclude data in the LCM backup. You could then use the MaxL client to perform a smaller level zero export.