HOWTO restore an OpenLDAP server from backup

5 March 2012 — 3 Comments

Just a quick instruction on howto restore an OpenLDAP server using a ‘ldif’-backup-file:

1. Setup the server

2. Configure the ‘slapd’ package, be sure to use the right database name. It’s a bit confusing: you enter it as ldaptree.company.com, but this will be used to create an empty database. Make sure it matches your backup ldif structure.

3. Make sure OpenLDAP is stopped

4. Read the backupdata into the OpenLDAP database using slapadd program

slapadd -c -l backup.ldif

The -c continues on errors, which might be necessary for example because the ‘root’ is already created. You can also run without it, and fix any errors by hand in the backup.ldif file. -l specifies the file to read from.

5. Fix permissions, make sure ‘openldap’ is both user/group owner

6. Start OpenLDAP and the server should be up & running again!

3 responses to HOWTO restore an OpenLDAP server from backup

  1. 
    Subhash C. Bijarniya 18 February 2014 at 12:52

    Good clear and correct………………….

    Regards

    Subhash C. Bijarniya

Trackbacks and Pingbacks:

  1. HOWTO backup an OpenLDAP server | Remi Bergsma's blog - March 7, 2012

    […] a previous post I described howto restore a OpenLDAP server from backup . But how to backup Open […]

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s