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
chmod go-rwx /var/lib/ldap
cp –rfp /var/lib/ldap.old/DB_CONFIG /var/lib/ldap
slapadd –v –l backup_openldap.ldif
chown ldap:ldap /var/lib/ldap
/etc/init.d/ldap start
How do I validate that I have restore all records successfully?