When you decide to undelete a soft-deleted entry, if the original Relative
Distinguished Name (RDN), such as
uid=user.1, is still available, you can
perform the undelete using that same RDN.
To undelete a soft-deleted entry, use ldapmodify with the
--allowUndelete option and target the specific soft-deleted entry
that you want to restore. In an LDIF file or from the command line, specify the
dn:<target entry> attribute, which is
the distinguished name (DN) that the entry is undeleted to, and the
ds-undelete-from-dn attribute, which is the entry that is undeleted
from. An undelete requires the
add changetype so that the entry can be
re-added to the server.
To undelete a soft-deleted entry using the same RDN, run the command
ldapmodify with the --allowUndelete option and
target the specific soft-deleted entry that you want to restore.
The first DN is the entry to undelete to and the
ds-undelete-from-dnis the soft-delete entry to undelete from.
$ bin/ldapmodify --allowUndelete dn: uid=user.1,ou=People,dc=example,dc=com changetype:add ds-undelete-from-dn: entryUUID=4e9b7847-edcb-3791-b11b- 7505f4a55af4+uid=user.1,ou=People,dc=example,dc=comThe --allowUndelete option sends the soft undelete request control to the server.