Topic: Migrate ldap database from old server to new server

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
Hi ,

I am trying to migrate ldap database from iRedMail-0.6 version to iRedMail-0.8.1

I followed the article http://www.iredmail.org/wiki/index.php? … AQ/Backup, after restoring the ldiff data , I am not able to login to new servers phpldapadmin with the credentials of new server which is in iRedMail-0.8.1/iRedMail.tips and also with the credentials of phpldapadmin of old server. I am getting error in phpldapadmin as below
"unable to connect to ldap server My ldap server.
Error:Invalid credentials for user" 

Kindly advice how to restore ldap database from old server iRedMail-6.0 to iRedMail-0.81.

Kindly suggest a way  how to export the mail users and their password from old server and import to new server.



Re: Migrate ldap database from old server to new server

Did you see below section:

IMPORTANT NOTE: If you're restoring LDIF data (exported on an old iRedMail server) to a new iRedMail server, you MUST login to phpLDAPadmin on new iRedMail server and reset passwords of below two DNs. Because they're hard-coded in many config files. For example, /etc/postfix/ldap/*.cf, /etc/dovecot/dovecot-ldap.conf.

- cn=vmail,dc=xxx,dc=xxx
- cn=vmailadmin,dc=xxx,dc=xxx

The new passwords you should use can be found in the root directory of iRedMail installation directory on NEW iRedMail server, for example, /root/iRedMail-0.8.1/iRedMail.tips. Below is the sample of the passwords in file iRedMail.tips:

Please login to phpLDAPadmin with cn=Manager,dc=xx,dc=xx on NEW iRedMail server to reset passwords of above two DNs.



Re: Migrate ldap database from old server to new server

Hi Zhang,

While installing new server I have given the ldap  suffix as : dc=mail,dc=mydomain,dc=com, but in old server it is different as dc=abcd,dc=com.

I need a clarification whether the ldap suffix should be same as in the old server.



Re: Migrate ldap database from old server to new server


1: Backup LDAP server on old server. I assume you get a backup file: /root/backup.old.ldif.
2: Modify /root/backup.old.ldif, replace old LDAP suffix by the new one.
3: Restore modified backup.old.ldif on new server.