Import and Export users from Embedded LDAP using WLST

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.
Click Save.The security data is saved in a file in the location you specified.


Migrating Data with WLST:

serverConfig() 
cd('SecurityConfiguration/mydomain/Default
Realm/myrealm/path-to-MBean/mbeanname')
cmo.importData(format,filename,constraints)

Comments

Popular posts from this blog

Interview question for File and FTP Adapter

What is boot.properties file and how to create

SSL Exceptions in Admin Server and Node Manager.