ldap export and import

Is it possible to export all the data inside openldap for example using ldapsearch or some other tool to a (ldif?) file and then import everything on another server and put this in a script that would be run every day. So that I could use the other one as a backup when the first/master server is not available?

I have full access to the first/master server, but I can't modify it's configuration so I think I can't set up replication.


Is it possible to export all the data inside openldap for example using ldapsearch or some other tool to a (ldif?) file

Sure, it is possible. slapcat/slapadd is what you're looking for:

slapcat -f /path/to/the/slapd.conf -l backup.ldif
slapadd -v -c -l backup.ldif -f /path/to/the/slapd.conf 

These are basically offline tools, you should stop slapd before proceeding. Maybe you also have to set/fix file permissions after restore.