I am trying to setup backup and restore and make sure it works.
Please note that database size on ldap.old
is lot more then the ldap
. The /var/lib/ldap.old
is my existing database. I have renamed /var/lib/ldap
for backup/restore testing.
I am getting the following error when restoring. Because of this I am not sure I have successfully restored everything.
...
added: "uid=user11123,ou=Abcd,ou=Industry Professional,dc=testdomain,dc=org" (0001cc9f)
added: "uid=user13123,ou=Abcd,ou=Industry Professional,dc=testdomain,dc=org" (0001cca0)
Error, entries missing!
entry 79870: ou=industryprofessional,dc=testdomain,dc=org
entry 79871: ou=abcd professional,ou=industryprofessional,dc=testdomain,dc=org
Disk usage:
[root@openldap]# du -khs ldap ldap.old/
3.3G ldap
4.0G ldap.old/
Here is my backup / restore process:
Backup:
slapcat -v -l backup_openldap.ldif
Restore:
/etc/init.d/ldap stop
mv /var/lib/ldap /var/lib/ldap.old
mkdir /var/lib/ldap
chown ldap:ldap ldap
chmod go-rwx ldap
cp –rfp /var/lib/ldap.old/DB_CONFIG /var/lib/ldap
slapadd –v –l /backup/openldap/backup_ldap2.diff
chown ldap:ldap *
/etc/init.d/ldap start
How do I validate that I have restore all records successfully?