1

Topic: [LDAP] Error restore with slapadd command

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): old: 0.9.4 new 0.9.8
- Linux/BSD distribution name and version: ubuntu server 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): ldap
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi there!
Im trying to install in a new test server the latest version of iRedMail 0.9.8
My server in production is in v0.9.4 so i do daily backup in my NAS server.

I following step by step the documentation about to restore LDAP and right now im trying to do the next command:
slapadd -f /etc/ldap/slapd.conf -l /home/user/2018-09-04-03_00_01.ldif
with OpenLDAP server off
But this is the error:

slapadd: line 1: database #1 (dc=example,dc=com) not configured to hold "dc=myname"; no database configured for that naming context
_                       0.37% eta   none elapsed            none spd 486.9 k/s
Closing DB...

whats wrong?

----

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

2

Re: [LDAP] Error restore with slapadd command

fjmr wrote:

slapadd: line 1: database #1 (dc=example,dc=com) not configured to hold "dc=myname"; no database configured for that naming context

Does your /etc/ldap/slapd.conf contain any database which is named "dc=myname"?
Or, does your backup LDIF file contain any "dc=myname"?

3

Re: [LDAP] Error restore with slapadd command

ZhangHuangbin wrote:
fjmr wrote:

slapadd: line 1: database #1 (dc=example,dc=com) not configured to hold "dc=myname"; no database configured for that naming context

Does your /etc/ldap/slapd.conf contain any database which is named "dc=myname"?
Or, does your backup LDIF file contain any "dc=myname"?

Sorry, the error was:

slapadd: line 1: database #1 (dc=myname,dc=com) not configured to hold "dc=myname"; no database configured for that naming context
_                       0.37% eta   none elapsed            none spd 486.9 k/s
Closing DB...

So y check both files and i saw that they have "myname" typed in.

cat to the file slapd.conf:

#######################################################################
# Databases
#######################################################################
#database monitor
#access to *
#    by dn.exact="cn=Manager,dc=myname,dc=com"
#    by * none

# Database used to store mail accounts
database    mdb
suffix      dc=myname,dc=com
directory   /var/lib/ldap/myname.com

4

Re: [LDAP] Error restore with slapadd command

Try to add "-b" option for slapadd like this:

slapadd -f /etc/ldap/slapd.conf -l /home/user/2018-09-04-03_00_01.ldif -b dc=myname,dc=com