[Pkg-openldap-devel] Bug#462099: slapd: Fails to upgrade to 2.4.7 - simple work-around to fix the ldif
Frederik Lindenaar
debian at frederik.lindenaar.nl
Fri Feb 1 14:46:39 UTC 2008
Hi all,
I had the same problem when upgrading from 2.3.38+lenny1. To get around
this, I manually discarded my ldap database (which got corrupted when
trying to fix it), and used last night's backup (now I am glad I make
them each night)... anyway, I found that the following regular
expression fixes the problems:
"s/^\(entryCSN:
[0-9]\+\):\([0-9]\+\):\(.\+\)x\(.\+\)#0#\(.\+\)/\1\2\30\4#00#\500/g"
In case it's useful for anyone, this is the procedure I applied (as root) :
1. stop slapd
2. slapcat -l backup.ldif
3. remove the contents of the slapd db directory (/var/lib/ldap in my
case, make sure you have a good backup, failing upgrade process
creates one in /var/backup/[old slapd version] that you probably
can use)
4. start slapd (to have it initialize the db structure, this is
needed as slapadd apparently can't create a good lockfile)
5. stop slapd
6. run sed "s/^\(entryCSN:
[0-9]\+\):\([0-9]\+\):\(.\+\)x\(.\+\)#0#\(.\+\)/\1\2\30\4#00#\500/g"
< backup.ldiff | slapadd
7. run chown openldap.openldap [ldap db directory]/* to make sure
that al files are owned by the right user
8. start slapd
and my slapd was up and running again. After applying this fix a dpkg
--configure --pending also works. Perhaps te package maintainers can
incorporate this ldif fix to the upgrade scripts... even though it's a
weird format according to the OpenLDAP mailing lists, it does occur and
hence IMHO should be catered for. Thanks!
Regards,
Frederik
More information about the Pkg-openldap-devel
mailing list