On Thu, Jun 21, 2012 at 11:33 AM, galemberti greg galemberti@hotmail.com wrote:
Hi, I want to implement a full backup procedureĀ of my LDAP (schema, ACL, Data ...).
- To save my schema i used the command: "slapcat -H
ldap:///cn={4}my,cn=schema,cn=config -l schema.ldif"
- To save my config, i used the command: "slapcat -H
ldap:///olcDatabase={1}hdb,cn=config = config -l config.ldif
- To save my accounts, i used the command: "slapcat -H ldap:///dc=my,dc=my
-l accounts.ldif
Now, when I want to test the restore on another server :
- To restore my schema i used the command: "sudo -u openldap slapadd -v -b
cn=config -l schema.ldiff " > OK
- To restore my accounts i used the command: "sudo -u openldap slapadd -v -c
-b cn=config -l accounts.ldiff " > OK
- To restore my config i used the command: "sudo -u openldap slapadd -v -c
-b olcDatabase={1}hdb,cn=config -l config.ldiff > KO. Indeed the slapadd command does not update the record so I get an error because they already exist. Also, how do I restore my configuration?
Tks for your help
PS : i use a debian squeeze server.
If you go to https://help.ubuntu.com/12.04/serverguide/openldap-server.html#ldap-backup, that is how I run my backups. And, I have tested the restore procedure. Bottom line:
o The backend db (config.ldif in that page) has all the schemas and config stuff. So, you do not need to bother saving schemas separately or anything like that. o The frontend db (example.com.ldif) has the account stuff.
There are other ways to yank those databases, but I was kinda lazy.