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

Re: Upgrade Ubuntu server will purge OpenLDAP data



Florian Weimer wrote:
* Michael Ströder:

Florian Weimer wrote:
* Onno van der Straaten:

Ubuntu server upgrade from 12.04 to 14.04 LTS will purge the OpenLDAP
directory data.

Is there an Ubuntu bug for this behavior?  It's a bit odd.

One should generally be careful with system upgrades.

AFAIK on-disk-format might change because of Berkeley-DB version upgrade.

Unless OpenLDAP uses the HASH database type,

OpenLDAP abandoned the HASH format in OpenLDAP 2.2.

it's sufficient to
checkpoint the Berkeley DB environment (and perhaps some other
undocumented magic) *before* updating OpenLDAP.  The on-disk format of
B-Tree-type databases is quite stable.

But the environment and logfile formats have changed quite a bit, and while newer BDB versions will open older B+tree DB files, there's no telling what sub-optimal effects that has on operation.

A clean shutdown will do a checkpoint. You will still need to cleanup the environment and logfiles so that the new BDB version doesn't try to use them. (E.g., using db_recover and db_archive - all covered in the BDB documentation so I won't provide details here.)

None of this is ever guaranteed to work. The only upgrade procedure that is documented and will always work is slapcat/slapadd.

(Automated dump and reload might not work for large databases during
automated package upgrades because of the time and disk space
overhead.)

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/