Search This Blog

Thursday, October 29, 2015

exportWeblogicMetadata obsolete

In OIM 11gR2 PS3, the weblogic.properties file states that the exportWeblogicMetadata.sh scripts are deprecated.  It recommends going to the documentation to find a better way to do this.

The documentation explains that you can use the Enterprise Manager in order to perform targeted exports.  I have tried this since 2012 with very little success.  I always seem to specify something incorrectly.

Here's another method from the same documentation.

My technique is as follows:

1) Create a new folder for exports.  It can be anywhere.  For the purposes of this blog, I will use the folder location /u01/app/mds/export
2) cd to the folder $MW_HOME/oracle_common/common/bin  Alternatively you could put this in your PATH.  Be sure NOT to use the wlst.sh that is in the wlserver folder.
3) execute wlst.sh either through ./wlst.sh  or just wlst.sh if it's in your PATH

wlst.sh
connect()
weblogic
<password>
t3://hostname:7001         or   t3://admin-vhn:7001  for a clustered install
exportMetadata(application='OIMMetadata',server='oim_server1',toLocation='/u01/app/mds/export')
disconnect()
exit()

It will export all of your data to that folder.  You can review all you want.

If you want to import just reverse the process:

mkdir /u01/app/mds/import
Copy only the files that you want to change, keeping their folder structure.
Edit the files (or add files as you please)

wlst.sh
connect()
weblogic
<password>
t3://hostname:7001         or   t3://admin-vhn:7001  for a clustered install
importMetadata(application='OIMMetadata',server='oim_server1',fromLocation='/u01/app/mds/import')
disconnect()
exit()

Happy exporting