rmoff's random ramblings
about talks

Dynamic Naming of OBIEE 12c Service Instance Exports

Published May 27, 2016 by in Obiee, Obiee12c, Exportserviceinstance, Wlst at https://preview.rmoff.net/2016/05/27/dynamic-naming-of-obiee-12c-service-instance-exports/

exportServiceInstance will export the RPD, Presentation Catalog, and Security model (application roles & policies etc – but not WLS LDAP) into a single .bar file, from which they can be imported to another environment, or restored to the same one at a later date (e.g. for backup/restore).

To run exportServiceInstance you need to launch WLST first. The following demonstrates how to call it, and embeds the current timestamp & machine details in the backup (useful info, and also makes the backup name unique each time).

To include the timestamp and hostname in the bar file:

import time, socket
ts=time.strftime('%Y%m%dT%H%M%S',time.localtime())
hostname = socket.gethostname()
ip = socket.gethostbyname(hostname)
exportServiceInstance('C:/app/oracle/fmw/user_projects/domains/bi/','ssi','c:/',('C:/%s_%s_%s' % (hostname,ip,ts) ))

All in one line:

import time, socket;ts=time.strftime('%Y%m%dT%H%M%S',time.localtime());hostname = socket.gethostname();ip = socket.gethostbyname(hostname);exportServiceInstance('C:/app/oracle/fmw/user_projects/domains/bi/','ssi','c:/',('C:/%s_%s_%s' % (hostname,ip,ts) ))

On bash, including WLST invocation

/app/oracle/biee/oracle_common/common/bin/wlst.sh <<EOF
import time, socket;ts=time.strftime('%Y%m%dT%H%M%S',time.localtime());hostname = socket.gethostname();ip = socket.gethostbyname(hostname);exportServiceInstance('/app/oracle/biee/user_projects/domains/bi/','ssi','/home/oracle',('/home/oracle/%s_%s_%s' % (hostname,ip,ts) ))
EOF

Robin Moffatt

Robin Moffatt works on the DevRel team at Confluent. He likes writing about himself in the third person, eating good breakfasts, and drinking good beer.

Story logo

© 2025