My Blog

Welcome to OBIEE 12c – Scripting BAR file backups

by Paul Cannon on 9th May 2016 1 comment

A few months ago I wrote a blog on using BI Application Archive (BAR) files to back up the RPD, web catalog and security model from an OBIEE instance. Since then I’ve been asked by a client how this could be scripted for a regular schedule to run.

My original blog can be accessed here:

As this calls the WLST scripting tool, all we need to do is wrap this in an outer calling script and, optionally, rename the BAR file created with the current date & time.

The WLST scripting tool is capable of using input files to supply the commands to run, rather than entering them manually, and this is simply done my supplying the command file-name as an argument to the WLST script, e.g.:


The language of the weblogic scripting tool is python, so the default extension on files is .py, but .txt would do just as well, it’s just a text file containing one or more commands.

In my case I’ve created a file called with the following entry:


I’ve saved this in a directory called /u01/scripts.  The exportServiceInstance command above requires two additional directories:

/u01/backups                                where the backup BAR files will be stored

/u01/backups/workDir                   a temporary working directory required by the exportServiceInstance command

Now that I have my command file, I just need a script file to call it. Called, this is my script:

cd /u01/app/obiee/oracle_common/common/bin
./ /u01/scripts/
cd /u01/backups
mv ssi_$(date '+%Y%m%d_%H%M').bar

This changes directory to where the script is kept, then runs it with the command file as input (fully pathed).

Once the export is complete it switches to the backup directory and renames the BAR file to include the date & time.

The Windows equivalent of this, called something like backup_obiee.cmd, would be:

cd C:\app\obiee\oracle_common\common\bin
call wlst.cmd c:\scripts\
cd c:\backups
ren ssi_%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%_%time:~0,2%%time:~3,

Running this script then simply produces the BAR file:

bar file backups

You can then schedule this to run any way you want.




















Paul CannonWelcome to OBIEE 12c – Scripting BAR file backups

Related Posts

Take a look at these posts

1 comment

Join the conversation
  • Safer - 26th July 2016 reply

    Thks a lot!, this post help me, but export is .bar not so mv ssi_$(date ‘+%Y%m%d_%H%M’).bar not work, why ?

Join the conversation