[EN] Simple LDAP dump script

less than 1 minute read

source: wikimedia.org
A few days ago my friend ask me if I can send him some simple ldap dump script. I have one old script that I made a year ago that I use to backup my home media center LDAP instance. Bash + a few standard Linux and OpenLdap tools.


  • Main idea: create simple script that will store recent backups for a few days. 
  • All old backups should be remove after $RETENTION time ( in days).
  • Slapcat could be done in online mode but you can have a problem with dump consistency.
  • Probably in your lab you don't need to kill all the processes that have something in common with slapd (kill section lines from 15-21).