Brovanture Oracle Cloud EPM

Setting up seven day rolling artifact snapshot backups for Oracle Cloud EPM Planning

Sarah Ansell
Brovanture Consultant

Each Oracle Cloud EPM Planning environment has a Daily Maintenance window during which Oracle performs routine maintenance on behalf of the customer. During this automated process, the system will create a system backup called ‘Artifact Snapshot’.

This is very handy for administrators as there is always an option to restore an application to the state as at the previous maintenance snapshot window. However, if an issue has taken more than 24 hours to be spotted, an administrator may wish to roll the system back further or load the backup onto a test environment to investigate further.

In this blog I demonstrate how a business rule can be used to ensure the Migration area retains seven day rolling artifact snapshot backups for Oracle Cloud EPM Planning. These are retained within the cloud in the Oracle Cloud EPM Planning ‘Migration’ area for ease of access and quick restoration of artifacts.

Brovanture Oracle Cloud EPM

Step 1: Create a Connection (or use existing Connection)

This method works by using Groovy / REST API to rename the Artifact Snapshot. Therefore, we need to call an External Web Services Connection within the business rule.

Create the connection as follows, or if you already have one that can be reused – jump to Step 2.

  • Navigate to Connections
  • Create an Other Web Service Provider Connection
  • Enter a Connection Name and Description
  • Enter the URL
  • Enter User and Password (In some cases e.g. Classic OCI, rather than OCI Gen2 you may need the format User = UserName)
  • Save and Close

Brovanture Oracle Cloud EPM

Step 2: Create the Business Rule

  • Navigate to Calculation Manager / Rules
  • Create a new rule
  • Convert the rule to a Groovy Script

Below are the key sections of my script.

Set your global variables:

Brovanture Oracle Cloud PM

I usually distinguish Test vs Prod environments when naming a backup, so here is how you can automatically check whether the connection is an Oracle test environment or a production environment.

Brovanture Oracle Cloud EPM

Get the date for renaming, then print to the Jobs log what the rename will be:

Brovanture Oracle Cloud EPM

Now the fun part – the actual rename.

Example: Renaming ‘Artifact Snapshot’ to ‘2023-07-25 – AppName – Artifact Snapshot’

Brovanture Oracle Cloud EPM

You could simply leave your script there, and keep renaming the backups daily. Oracle will automatically delete backups that are older than 60 days or when the storage reaches 150GB.

However, I like to keep the folder nice and tidy and only retain 7 automatic backups. This leaves me room for my manual backups which I name differently to ensure they are retained for longer.

See below, I use REST API and Groovy to:

  • retrieve a list of my backups,
  • create a new list of only those with the automatic naming convention,
  • then delete the automated backup if the date in the name is older than 7 days.

Brovanture Oracle Cloud EPM

Brovanture Oracle Cloud EPM

Step 3: Schedule the Business Rule

  • Navigate to Jobs
  • Schedule Job

Here is an example of the Log output when this rule is run in Jobs.

Brovanture Oracle Cloud EPM

I hope this gives some peace of mind, knowing that backups are tidy, automated, and accessible.

Please comment if you have any improvements / suggestions / questions.

Enjoy!

Until next time

Sarah