Do you want or need to restore all or a part of your application using a backup that occurred before the previous night? Would you like to easily save each nightly backup so they are not overwritten every night? This demonstration will showcase how to use EPM Automate in Hyperion Planning and Oracle Planning and Budgeting Cloud Service (PBCS) to save each nightly backup and does not overwrite future backups.

Planning automatically creates a nightly backup of your instance called “artifact snapshot” which is accessible through Application Management. However, each backup is overwritten by the latest one. To In order to stop overwriting backups, you can rename the backup snapshot and download it to your computer. Furthermore, you can write an EPM Automate script to download the artifact snapshot to your computer and rename it according to the date that the snapshot was taken.

Watch the demonstration on how to use EPM Automate!

Read the full blog post!

You will need two files: one .bat file to run the scripts, and one .cmd file where you define the variables that are referenced in the scripts. The .cmd variable file makes the scripts look cleaner and it is easier to update as well. First, let’s take a look at the variable file.

The screenshot above lists the variables that the .bat file scripts will utilize. The first variable that is set is the location of EPM Automate on the PC. In this case, the location is C:OracleEPM Automate and we named the variable UtilDir.

The HomePathDR variable is the location of the batch file (the .bat file that we will create).

BackupDR and LogSummaryDR is a locations of your choice where the backup log will be created (specify the path on your PC, then add Backup.log at the end).

LogPathDR is also used for logging. In this case, the path is the HomePathDRLogs_DR. Notice that when calling variables, we enclose them in %.

We also set up variables for username (Username_Source), password (Password_Source), the URL of the Planning instance (URL_Source), and the domain (Domain_Source).

Finally, we set up variables for the Artifact Snapshot in Application Management (Source_Snapshot) and the Artifact Snapshot once it is renamed and moved (AWES_Archive_Snapshot). The “_%DATE:~4,2%%DATE:~7,” that we added to the end of the Artifact_Snapshot rename adds the current date to the end of the file name. For example, on October 26th, the renamed file becomes Artifact Snapshot_102616.

After typing these variables out, save the file as a .cmd file and close it. We will now move on to the .bat file. Below is an example of what the .bat file that contains the commands for downloading, renaming, and moving the archive snapshot file should look like.

The first command is to call up the .cmd variable file that was previously created. In this case, the file was called “variablesTut.cmd”. The file is called by specifying the file path on your computer.

Following this command, the next step is to have EPM Automate login to the service instance. The command should be:

call EPM Automate login %Username_Source% %Password_Source% %URL_Source% %Domain_Source%

Notice, the command pulls the variables for user name, password, URL and domain.

After this command comes an IF statement:


This command states that if the login fails, then the batch will proceed to the :ERROR section at the bottom of the script which returns the error:

echo DR migration process failed with error #%errorlevel% >> %LogPathDR%%BackupDR% 2>&1

The error is logged according to the log path variables specified in the .cmd file. The purpose of this :ERROR section is to have EPM Automate specify that an error occurs if a command fails.

Following a successful login, the next command downloads the Artifact Snapshot file to your computer. The command for this is:

Call EPM Automate download file "Artifact Snapshot" >> %LogPathDR%%BackupDR% 2>&1

We include a 30 second timeout between the download command and the following commands to give EPM Automate time to download the snapshot file.

timeout /t 30 /nobreak

To increase or decrease the timeout length, simply change the number in the “t 30” section. A 60 second timeout, for example, would be timeout /t 60 /nobreak

When this command is run, EPM Automate downloads the snapshot file to the same folder where EPM Automate resides. In order to move the snapshot file to a new location and rename it according to the date, we run the following command:

Move "C:OracleEPM AutomateArtifact" "[ENTER PATH]Artifact_Snapshot_%DATE:~4,2%%DATE:~7,"

This command takes the Artifact Snapshot from the EPM Automate folder and moves it to a folder of your choice (specified in the [ENTER PATH] section. The “%DATE:~4,2%%DATE:~7,2%%DATE:~-2%” portion of the command adds the current date to the Artifact Snapshot name upon move.

The final command notifies you that the migration has completed.

echo DR migration process completed! >> %LogPathDR%%BackupDR% 2>&1

These commands may be run by double clicking the .bat file or by running EPM Automate on your computer and pasting the commands in. To further automate this process, you can use Windows Task Scheduler to schedule the batch file to run on a daily, weekly, or monthly basis. To schedule a task using task scheduler, search for “task scheduler” in Windows Explorer, select “create new task” or “create basic task” and follow the wizard.

Using EPM Automate to take routine backups of the Artifact Snapshot allows you to have multiple options for restoring portions of your application from backups older than the one from the previous night. Being able to restore from an old backup could save time when trying to fix an issue that occurred days ago.

Blog post by Jean-Luc Mosley of Key Performance Ideas.

Recent Posts

Successful Reconciliation Compliance with Oracle Cloud

Would you like to learn how Key Performance Ideas can help you utilize Oracle’s Account Reconciliation Compliance Module that saves time, rework, and improves accuracy?  How about seeing the same time savings and accuracy every month?  Would you like to have real-time...

read more
Accelalpha + Key Performance Ideas

Key Performance Ideas (KPI) is pleased to announce that Accelalpha has acquired us.

Accelalpha + Key Performance Ideas

Key Performance Ideas (KPI) is pleased to announce that Accelalpha has acquired us.

Schedule Time With Us