Backup & Restore database LDAP

Posted on Updated on


Sebelum lupa, berikut adalah cara backup dan restore database LDAP yang backendnya menggunakan bdb, kebetulan saya menggunakan OpenLDAP.

a. Cek terlebih dahulu konfigurasi slapd.conf, di mesin Solaris saya, file konfigurasinya berada di /usr/local/etc/openldap/slapd.conf, pada bagian “BDB database definitions”

# BDB database definitions

database        bdb
suffix          "dc=sample,dc=net"
rootdn          "cn=Manager,dc=sample,dc=net"

rootpw          rahasia
directory       /usr/local/var/openldap-data
index           objectClass     eq

b. Backup database ldap

# slapcat -v -l backup-ldap.diff

c. Restore database ldap

# cd /usr/local/var/openldap-data
# rm -rf *
# slapadd -l backup-ldap.diff

Semoga bermanfaat…

Leave a Reply

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