Used: openldap-servers-2.4.23-34.el6_5.1.x86_64
Task: create script for crontab to create scheduled database full backup.
slapcat- create file in the default format, LDIF.slapcatcan be done whileslapdrunning.To restore file after
slapcat-slapaddmust be used (notldapadd).slapcat/adddoesn't require password.slapaddcan be done only whenslapdstopped (and corresponding database is empty).
Example:
$ slapcat -f /etc/openldap/slapd.conf -b "dc=db_1" -l db_1_backup.ldif
$ slapadd -l db_1_backup.ldif
Instead of slapcat/add - let's take a look at ldapsearch/add:
ldapsearch- creates file with almost same information asslapcat;ldapadd- can use file fromldapsearch, doesn't requireslapdto be stopped;ldapadd/search- requires password.
Example:
$ ldapsearch -D "cn=root,dc=db_1" -W -b "dc=db_1" "dc=db_1" -LLL > db_1_backup2.ldif
$ ldapadd -x -D "cn=root,dc=db_1" -W -f db_1_backup2.ldif
So - The Question is:
Am I missing anything in this tools description?
What else is difference between
ldapadd/slapaddandladpsearch/slapcat?