[Date Prev][Date Next]
How to backup/restore on remote servers
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
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
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 ?
I know that there is a replication service but those two servers will
not be on the same network (ie. one server will not communicate with the
other) so I think this approach does not apply.
Any tip or suggestion will be very welcome.
Thanks in advance,