[Date Prev][Date Next] [Chronological] [Thread] [Top]

Domain Name Suffix

Hi Jan,

I don't have ldbmcat on our system so I stopped at line 2.

But I'm running the GNU gdbm which is working fine.  When
I dumped a record, the e-mail address had .com instead of .gov.
It turned out that I had missed editing out .com in my
migrate_common script.  So every "mail: ..." record had .com.  :(

I wrote a little C-program with gdbm calls to change each mail
record in the database file.  (The program complete in under 1 minute.
Gdbm is fast.)  That fixed the problem.

I'm sorry my basic logic on how some things worked yesterday
was wrong, but I've learned more today.  Ldap's a great tool.

Thanks for you kind help,
Glenn Takanishi

Jan Iven wrote:

> This is what I would do:
> 1. stop slapd
> 2. ldbmcat id2entry.dbb >/tmp/ldif
> 3. sed -e 's/\(yourmailattr: .*\)\.com/\1.gov/' < /tmp/ldif >/tmp/ldif.gov
> # whatever transformations you need
> 4. # edit slapd.conf to include "dbcachenowsync" for the right backend
> 5. restart slapd
> 6. ldapadd ....
> 7. stop slapd
> 8. comment out the "dbcachenowsync"
> 9. restart slapd
> from the slapd.conf manpage:
> >"dbcachenowsync"
> >              Specify  that database writes should not be immedi-
> >              ately  synchronized   with   in   memory   changes.
> >              Enabling this option may improve performance at the
> >              expense of data security.
> since you keep your ldif file, data security isn't an issue here as
> long as you disable the option later (when writes occur).
> This should be over in well under 15 min.
> Regards,
> Jan Iven
> The alternative: ldapsearch all faulty attribs and push them through a
> script that does a ldapmodify. This is probably slower.