Undeleting a soft-deleted entry using the same RDN - PingDirectory - 9.2

PingDirectory 9.2

bundle
pingdirectory-92
ft:publication_title
PingDirectory 9.2
Product_Version_ce
PingDirectory 9.2
category
Product
pd-92
pingdirectory
ContentType_ce

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-dn is 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=com   
The --allowUndelete option sends the soft undelete request control to the server.