tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Updating openldap-server requires db4_recover

Another problem I ran into (the second time!) while updating openldap-server 
is, that, for reasons probably only known to the OpenLDAP gurus, a clean 
shutdown of slapd leaves the database in a state where a db_recover is needed 
in order to upgrade to a more recent DB4 version.
In practice, this means that, If you don't think about it, you will upgrade 
openldap-server, which will update db4, and then slapd will refuse to start 
telling you the database is corrupt and you need to restore from a backup.
What you really have to do is to re-install the OLD version of db4 (and thus 
de-install the new openldap-server), then run db4_recover from the OLD version 
of DB4, then re-upgrade to the new version of db4 (which lets you re-install 
the new version of openldap-server).
After that, slapd will start fine. Using db4_upgrade from the new DB4 won't do 

So how to fix that? The only somewhat sensible way that comes to my mind is to 
add a db4_recover -h <path-to-openldap-data> in the DEINSTALL script of 
openldap-server. Of course, that won't be of any use if you really just 
de-install (but doesn't harm either). But it will help if you de-install for an 

Home | Main Index | Thread Index | Old Index