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