Thursday 18 February 2016

Import and Export users from Embedded LDAP using WLST

Export
connect(‘weblogic’,’weblogic’, ‘t3://localhost:8003′)
domainRuntime()
cd(‘/DomainServices/DomainRuntimeService/DomainConfiguration/DomainA/SecurityConfiguration/DomainA/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator’)
cmo.exportData(‘DefaultAtn’,’c:/export.ldif’, Properties())
Import
connect(‘weblogic’,’weblogic’, ‘t3://localhost:8003′)
domainRuntime()
cd(‘/DomainServices/DomainRuntimeService/DomainConfiguration/DomainB/SecurityConfiguration/DomainB/DefaultRealm/myrealm/AuthenticationProviders/DefaultAuthenticator’)
cmo.importData(‘DefaultAtn’,’c:/export.ldif’, Properties())

Example as follows:

To export security data to a file:
  1. In the left pane, select Security Realms and then select the realm whose security data you want to export (for example, myrealm).
  2. Expand Migration > Export.
  3. In the Export Directory on Server field, specify the directory on the Administration Server to which to export the security data.
  4. Click Save.The security data is saved in a file in the location you specified.


    Migrating Data with WLST:

    serverConfig() 

    cd('SecurityConfiguration/mydomain/DefaultR

    ealm/myrealm/path-to-MBean/mbeanname')

    cmo.importData(format,filename,constraints)  



No comments:

Post a Comment