copy users

 12 Replies
 0 Subscribed to this topic
 27 Subscribed to this forum
Sort:
Author
Messages
TJ Mann
Veteran Member Send Private Message
Posts: 70
Veteran Member
lsdump/lsload takes care security perfectly, but i want to use loadusers. how do i extract user(s) infor from prod (ADAM ldap) so i can use userload to load to test/qa server.

John Henley
Send Private Message
Posts: 3351
There is a way to do it and it's now documented and supported
On the source
ldifgen ldapdatatoxml > prodldap.xml

On the target
ldifgen xmltodataldif prodldap.xml proddata.ldif

Then load proddata.ldif using ldapmodify (for TDS) or ldifde (for ADAM/LDS)
Thanks for using the LawsonGuru.com forums!
John
TJ Mann
Veteran Member Send Private Message
Posts: 70
Veteran Member
i searched for ldifgen in c:/windows/ADAM, nothing there.
TJ Mann
Veteran Member Send Private Message
Posts: 70
Veteran Member
sorry, found it in $GENDIR/bin, not on windows ADAM server. thanks. will give it a try later.
Kwane McNeal
Veteran Member Send Private Message
Posts: 479
Veteran Member
It's about time they documented. I have been keeping it silent for a couple of years now, not wanting to expose it if it was intended to be so.

...but if I might add also, the ldapdatatoxml option does have a -f option

so you can do GENDIR/bin/ldifgen ldapdatatoxml -f output-file.xml

...everything else in John H's post is the same.

Kwane
TJ Mann
Veteran Member Send Private Message
Posts: 70
Veteran Member
since i dump from prod to dev, i have to replace PL on output-file.xml before ldifde, correct ?

for exampl, prod has prodline as PROD and dev has prodline as DEV.
TJ Mann
Veteran Member Send Private Message
Posts: 70
Veteran Member
i checked with CASE, and they told me that there is no documenation for this.
TJ Mann
Veteran Member Send Private Message
Posts: 70
Veteran Member
John,

i am confused on:

On the target
ldifgen xmltodataldif prodldap.xml proddata.ldif

ldifgen will dump and load users ?. if yes, i need to modify prodldap.xml file since it has production values such as PRODUCTLINES (PROD9) and ID (PROD).
Kwane McNeal
Veteran Member Send Private Message
Posts: 479
Veteran Member
TJ,
As for the documentation, it is listed in several install manuals, and has been so on the Landmark side for *years*. After checking on the LSF side, it has been listed for at least the last couple of ESPs.

Second, while I agree with the redirection method, I strongly suggest using the -f option instead.

Thirdly, ldifgen is what it's name says it is: LDIF GENerator. That's ALL it does. In fact the ONLY option that reads a non-file datastore directly is the LdapDataToXml option. All the other options read the LDAP as a processing filter ONLY.

Finally, to address your specific questions: ldifgen will convert the file into a suitable form for loading, ldifde/ldapmodify do the actual loading.
And yes, you will have to edit the file. LdapDataToXml provides NO filtering options for type of resource subobjects to dump, nor any preprocessing features, similar to jobdump/jobload.

Kwane
TJ Mann
Veteran Member Send Private Message
Posts: 44
Veteran Member
Kwane,
my steps:

source:
$GENDIR/bin/ldifgen ldapdatatoxml -f output-file.xml
sed -e 's/LQA/LDEV/g' output-file.xml > output-file.xml1

target:
ldifgen xmltodataldif output-file.xml1 proddata.ldif

ftp proddata.ldif from apps server to windows ADAM server, and ldifde. can you provide me proper syntax for ldifde on windows side.
Kwane McNeal
Veteran Member Send Private Message
Posts: 479
Veteran Member
TJ,
It's a bit more complicated than your single sed command is accounting for. Keep in mind this file has EVERYTHING in RM in it.

As for ldifde, if your application server is on unix, just use ldapmodify

Kwane
TJ Mann
Veteran Member Send Private Message
Posts: 44
Veteran Member
i ran this:
ldifgen xmltodataldif prodldap.xml proddata.ldif
but i don't see proddata.ldif anywhere on my server.
TJ Mann
Veteran Member Send Private Message
Posts: 44
Veteran Member
i dont see ldapmodify in $GENDIR/bin either. anyway, thanks. i will give up for now. i will stick with loadusers utilities.