I have tried this 3 times in a test server running in VMware and whatever i tried, the upgrade to 5.0 always killed all data in the LDAP tree.

Looking through the install/upgrade script:
  1. the LDAP tree is dumped into an LDIF (ldap.bak)
  2. then the openldap-data directory is moved to openldap-data.BAK
  3. the package installation then creates a new openldat-data directory.

But i can't find anything that restores the old data into the new ldap directory.

There is this telling snipped in the log output (hostname edited):
Restoring existing configuration file from /opt/zimbra/.saveconfig/config.save...done
Operations logged to /tmp/zmsetup.12292007-170725.log
Starting ldap...done.
ERROR: account.NO_SUCH_SERVER (no such server: zimbra.test)
ERROR: account.NO_SUCH_SERVER (no such server: zimbra.test)
Setting defaults...ERROR: account.NO_SUCH_SERVER (no such server: zimbra.test)
This happens because the LDAP tree is empty at this point and i guess it should not be.

The installation later then add some ham and spam users. And those are the only ones present in the LDAP after the upgrade.openldap-data.BAK

BTW: moving openldap-data to openldap-data.BAK is another problem. The existens of openldap-data.BAK is not tested before and the install script will happily move openldap-data as a subdirectory into a exisiting openldap-data.BAK directory.