HI.

Struggling a bit, despite looking at various threads here:

http://www.zimbra.com/forums/install...ew-server.html
http://www.zimbra.com/blog/archives/...er_server.html

I'm trying to migrate an existing Zimbra setup from OSX (4.5.10GA) to Debian 4 on a Xen DomU. So far, as a sanity check, my first step was to make sure that Zimbra 5.0RC2 works on the DomU, which it does if I install and set it up from scratch.

So as the first part of my migration, I set up another DomU running Debian Sarge and installed ZCS 4.5.10GA on that.

I then copied over an rsync backup from the Mac of /opt/zimbra and also an exported ldap.ldif file exported on the Mac generated using:

su zimbra
/opt/zimbra/openldap/sbin/slapcat -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif

I've cat'd the ldif and it has entries for the various user accounts, aliases etc.

Moving onto the Debian Sarge DomU, I do an ./install.sh -s to setup the system. Then, given the binaries from my Mac are going to be incompatible for importing the ldap.ldif file, I did NOT blow away the /opt/zimbra directory, but I copied the /opt/zimbra/conf/slapd.conf file and /opt/zimbra/openldap-data/ directory from the Mac to the Debian Sarge DomU, and ran the zmfixperms script.

su zimbra
/opt/zimbra/openldap/sbin/slapadd -f /opt/zimbra/conf/slapd.conf -l /root/ldap.ldif

Which reports:

The first database does not allow slapadd; using the first available one (2)
bdb_db_open: Warning - No DB_CONFIG file found in directory /opt/zimbra/openldap-data: (2)
Expect poor performance for suffix .
bdb(): Program version 4.2 doesn't match environment version
bdb_db_open: Database cannot be opened, err 22. Restore from backup!
bdb(): DB_ENV->lock_id_free interface requires an environment configured for the locking subsystem
bdb(): txn_checkpoint interface requires an environment configured for the transaction subsystem
bdb_db_close: txn_checkpoint failed: Invalid argument (22)
backend_startup_one: bi_db_open failed! (22)
slap_startup failed
So, I emptied the contents of /opt/zimbra/openldap-data and tried again:

The first database does not allow slapadd; using the first available one (2)
bdb_db_open: Warning - No DB_CONFIG file found in directory /opt/zimbra/openldap-data: (2)
Expect poor performance for suffix .
but otherwise seems to populate the DB tables. After this I moved /opt/zimbra/openldap-data/ to /root/ldap_import_backup and blew away /opt/zimbra.

Now I moved the entire /opt/zimbra backup from the Mac to the Debian DomU, and replaced the /opt/zimbra/openldap-data with the backup I just made above.

Then I do one more ./install.sh to upgrade the Zimbra setup, ignoring the mail store check, but selecting the upgrade options, which oddly asks me for the password shutting down Zimbra mail (which isn't running) about 5 times (first time I tried entering the admin password which would have been in the ldap dump, and the last few times I just pressed Return).

After the packages get installed, the installer tries to start up Zimbra, but none of the default settings are populated:

Setting defaults from saved config in /opt/zimbra/.saveconfig/config.save
HOSTNAME=
LDAPHOST=
LDAPPORT=
SNMPTRAPHOST=
SMTPSOURCE=
SMTPDEST=
SNMPNOTIFY=0
SMTPNOTIFY=0
LDAPROOTPW=
LDAPZIMBRAPW=
Restoring existing configuration file from /opt/zimbra/.saveconfig/config.save...done
Operations logged to /tmp/zmsetup.log.10848
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
Setting defaults...Done
Setting defaults from existing config...Warning: null valued key 'mysql_logger_root_password'
Checking for port conflicts
Checking ldap status
Starting ldap
ldap startup failed with exit code 256
Setting defaults from ldap...ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
ERROR: service.FAILURE (system failure: getDirectContext) (cause: javax.naming.CommunicationException localhost:389)
and I'm required to set the hostname etc in the main menu?! This includes parameters like HTTP Port, HTTPS Port, POP ports etc. So I set them, save the config and quit.

Then I try to start Zimbra and I get:

Host XXXXXXXX.XXXXXXX.com
Unable to determine enabled services from ldap.
Unable to determine enabled services. Cache is out of date or doesn't exist.
Joy. Luckily trying to do an 'ldap start' gives me more meaningful stuff:

zimbra@mail:/usr/src/zcs$ ldap start
ldap_url and ldap_master_url cannot be the same on an ldap replica
So I fire up zmlocalconfig and see that ldap_host, ldap_port, ldap_url, ldap_master_url are blank, and ldap_is_master is set to false!?

Ok, so I set them to what they should be, and try 'ldap start' again:

zimbra@mail:/usr/src/zcs$ ldap start
/opt/zimbra/bin/ldap: line 55: kill: (6321) - No such process
Failed to start slapd. Attempting debug start to determine error.
bdb(): PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
bdb_db_close: txn_checkpoint failed: Invalid argument (22)
backend_startup_one: bi_db_open failed! (-30978)
bdb_db_close: alock_close failed
Ok, now I'm completely stumped and fearing that my only solution is going to be an imapsync from 4.5.10GA to the deployment on the DomU. Is there anything I'm missing?

Thanks in advance.

Mezza