1

Topic: LDAP backup for iRedMail6/iRedOS6

Is there a guide or tutorial on how to migrate iRedMail6/iRedOS6?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: LDAP backup for iRedMail6/iRedOS6

Migrate what?

3 (edited by hata_ph 2010-06-21 16:37:07)

Re: LDAP backup for iRedMail6/iRedOS6

migrate ldap account from 1 iRedOS6 to another iRedOS6 server...

4

Re: LDAP backup for iRedMail6/iRedOS6

Tp migrate accounts, use phpldapadmin or other command line tools to export LDAP data (ldif), then import it in new server.

5

Re: LDAP backup for iRedMail6/iRedOS6

ZhangHuangbin wrote:

Tp migrate accounts, use phpldapadmin or other command line tools to export LDAP data (ldif), then import it in new server.

I will look into that but it would be nice that this function is included in iRedAdmin too....

6

Re: LDAP backup for iRedMail6/iRedOS6

Will provide backup script for iRedAdmin-Pro users later.

7

Re: LDAP backup for iRedMail6/iRedOS6

ZhangHuangbin wrote:

Will provide backup script for iRedAdmin-Pro users later.

Does it mean it will not be available for the free version?

8

Re: LDAP backup for iRedMail6/iRedOS6

Oops, my mistake, it will be available for all iRedMail users. smile

9

Re: LDAP backup for iRedMail6/iRedOS6

ZhangHuangbin wrote:

Oops, my mistake, it will be available for all iRedMail users. smile

Thanks smile

10

Re: LDAP backup for iRedMail6/iRedOS6

ZhangHuangbin wrote:

Will provide backup script for iRedAdmin-Pro users later.

Hi.
Already available backup scripts for iredmail?
Im using iRedMail 0.6.1 with iRedPro Last version to. (installed this week)

Tks
Anderson

11

Re: LDAP backup for iRedMail6/iRedOS6

I am looking at the backup for ldap bakend

http://www.iredmail.org/forum/topic1255 … nldap.html

but I have no idea how to restore the ldap...when I import the ldif file using phpldapadmin, below error show

Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object cn=vmail,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object cn=vmailadmin,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object o=domainAdmins,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object domainname=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object ou=Users,domainName=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object ou=Groups,domainName=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object ou=Aliases,domainName=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object ou=Externals,domainName=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object mail=postmaster@fatimah.local,o=domainAdmins,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object mail=www@fatimah.local,ou=Users,domainName=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object mail=lee@fatimah.local,ou=Users,domainName=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
error    Could not add the object to the LDAP server.
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.
warn    LDIF text import
Could not add object mail=kim@fatimah.local,ou=Users,domainName=fatimah.local,o=domains,dc=fatimah,dc=local
LDAP said:    Constraint violation
Error number:    0x13 (LDAP_CONSTRAINT_VIOLATION)
Description:    Some constraint would be violated by performing the action. This can happen when you try to add a second value to a single-valued attribute, for example.

12 (edited by hata_ph 2010-10-07 15:46:11)

Re: LDAP backup for iRedMail6/iRedOS6

ok...so far I can restore my ldap follow below step

1. /etc/init.d/ldap stop
2. slapadd -v -c -l xxx.ldif
3. /etc/init.d/ldap start

I also have restore below files

/etc/dovecot-ldap.conf
/etc/policyd.conf
/etc/policyd_sender_throttle.conf
/etc/postfix/ldap*.cf
/var/vmail/*
chown -R vmail:vmail /var/vmail/*

But I cannot log in to my webmail. Below is my /var/log/maillog

login as: root
root@192.168.4.83's password:
Last login: Thu Oct  7 12:09:32 2010
[root@mail ~]# mcedit /var/log/maillog
/var/log/maillog   [B---]  0 L:[416+18 434/437] *(33333/33954b)= O  79 0x4F
Oct  7 12:04:42 mail amavis[1788]: Found decoder for    .cab  at /usr/bin/cabextract
Oct  7 12:04:42 mail amavis[1788]: No decoder for       .tnef tried: tnef
Oct  7 12:04:42 mail amavis[1788]: Internal decoder for .tnef
Oct  7 12:04:42 mail amavis[1788]: Found decoder for    .exe  at /usr/bin/unrar; /usr/bin/lha; /usr/bin/arj
Oct  7 12:04:42 mail amavis[1788]: Using primary internal av scanner code for ClamAV-clamd
Oct  7 12:04:42 mail amavis[1788]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Oct  7 12:04:42 mail amavis[1788]: Creating db in /var/amavis/db/; BerkeleyDB 0.36, libdb 4.3
Oct  7 12:04:43 mail postfix/postfix-script[1854]: warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
Oct  7 12:04:43 mail postfix/postfix-script[1859]: starting the Postfix mail system
Oct  7 12:04:43 mail postfix/master[1860]: daemon started -- version 0.6.0, configuration /etc/postfix
Oct  7 12:04:44 mail policyd: starting policyd v1.82
Oct  7 12:04:44 mail policyd: connecting to mysql database: 127.0.0.1
Oct  7 04:04:44 mail policyd: mysql_real_connect(): Access denied for user 'policyd'@'localhost' (using password: YES)
Oct  7 12:04:44 mail pysieved[1931]: Listening on INADDR_ANY port 2000
Oct  7 12:09:38 mail roundcube: MDB2 Error: insufficient permissions (-27): _doConnect: [Error message: Access denied for user 'roundcube'@'localhost' (using
Oct  7 12:09:38 mail roundcube: [07-Oct-2010 12:09:38 +0800]: DB Error: _doConnect: [Error message: Access denied for user 'roundcube'@'localhost' (using pas
Oct  7 12:15:11 mail roundcube: [07-Oct-2010 12:15:11 +0800]: IMAP Error: Authentication for www@fatimah.local failed (LOGIN): "a001 NO Temporary authenticat
Oct  7 12:16:30 mail roundcube: [07-Oct-2010 12:16:30 +0800]: IMAP Error: Authentication for www@fatimah.local failed (LOGIN): "a001 NO Temporary authenticat
Oct  7 12:19:27 mail roundcube: [07-Oct-2010 12:19:27 +0800]: IMAP Error: Authentication for lee@fatimah.local failed (LOGIN): "a001 NO Temporary authenticat
Oct  7 12:22:41 mail roundcube: [07-Oct-2010 12:22:41 +0800]: IMAP Error: Authentication for www@fatimah.local failed (LOGIN): "a001 NO Temporary authenticat

login as: root
root@192.168.4.83's password:
Last login: Thu Oct  7 12:09:32 2010
[root@mail ~]# mcedit /var/log/maillog

[root@mail ~]# mcedit /var/log/dovecot.log
cot: Oct 07 12:22:26 Warning: Killed with signal 15
cot: Oct 07 12:22:26 Info: dovecot v1.1.20 starting up (core dumps disabled)
cot: Oct 07 12:22:26 Error: auth(default): LDAP: binding failed (dn cn=vmail,dc=fatimah,dc=local): Invalid credentials
cot: Oct 07 12:22:35 Error: auth(default): LDAP: binding failed (dn cn=vmail,dc=fatimah,dc=local): Invalid credentials
cot: Oct 07 12:22:41 Info: imap-login: Disconnected (auth failed, 1 attempts): user=<www@fatimah.local>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
cot: Oct 07 12:24:53 Error: auth(default): LDAP: binding failed (dn cn=vmail,dc=fatimah,dc=local): Invalid credentials
cot: Oct 07 12:25:00 Info: imap-login: Disconnected (auth failed, 1 attempts): user=<www@fatimah.local>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

13

Re: LDAP backup for iRedMail6/iRedOS6

It seem my vmail and vmailadmin password in ldap is not correct. The vmail and vmailadmin password did not recover from the old server when I import the back ldif file. But other users that from the old server is working fine. What is the proper way of backup and restoring ldap data?

14

Re: LDAP backup for iRedMail6/iRedOS6

Do anyone have any idea?

15

Re: LDAP backup for iRedMail6/iRedOS6

Nobody is doing backup for iRedMail6????

16

Re: LDAP backup for iRedMail6/iRedOS6

hata_ph wrote:

Nobody is doing backup for iRedMail6????

Anyone is doing backup for LDAP based iRedMail?

17

Re: LDAP backup for iRedMail6/iRedOS6

Reference: http://iredmail.org/wiki/index.php?titl … FAQ/Backup

18

Re: LDAP backup for iRedMail6/iRedOS6

I am re-testing iRedOS with LDAP-backend. I was wondering do iRedMail with LDAP store data to mysql? Cause when I migrate to a new server, I do below step and all it work.

1. /etc/init.d/ldap stop
2. slapadd -v -c -l xxx.ldif
3. /etc/init.d/ldap start
4. restore /var/vmail
5. chown -R vmail:vmail /var/vmail