[Date Prev][Date Next] [Chronological] [Thread] [Top]

Full Backup/Restore slapd



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.