[Date Prev][Date Next]
Re: How to backup/restore on remote servers
Josir Gomes <email@example.com> writes:
> Hi folks,
> I just installed a openldap server and I want to test backup/restore
> I have two machines, one is a clone of the second one.The first one I
> add several users and then my test is to restore those users in the
> new machine.
> To backup, it was easy:
> slapcat -l /path/to/your/backup.ldif
> But when I tried to restore,
> I shutdown the samba/ldap service with:
> /etc/init.d/ebox samba stop
> /etc/init.d/ebox slapd stop
> And then I issue: slapadd -l /path/to/your/backup.ldif
> => hdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key/data pair
> already exists (-30996)
> => hdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key/data pair already
> exists (-30996)
> slapadd: could not add entry dn="dc=ebox" (line=1): txn_aborted!
> DB_KEYEXIST: Key/data pair already exists (-30996)
> I understand that there are other records and I can't replace them.
> Do I have to erase everything ?
> Or is there a merge option ?
slapadd(8) is only applicable to initiate a database, that is you can not
overwrite an existing database.
Dieter Klünter | Systemberatung
GPG Key ID:8EF7B6C6