IBM Support

Backing up LDAP records prior to modification

Troubleshooting


Problem

When performing any modification of LDAP records a backup of the current records is advised. An efficient method of backing up your existing LDAP records is to export them into an LDIF file prior to starting the modification tasks. In the event that LDAP records are accidentally lost or modified, the LDIF file can be used to efficiently restore the records.

Resolving The Problem

When performing any modification of LDAP records a backup of the current records is advised. An efficient method of backing up your existing LDAP records is to export them into an LDIF file prior to starting the modification tasks. In the event that LDAP records are accidentally lost or modified, the LDIF file can be used to efficiently restore the records.

 
From the IBM i command line type
DB2LDIF LDIFSTMF('/home/backup.ldif') 

This will result in all records being exported to an LDAP Data Interchange Format (LDIF) file:

After an .LDIF file has been captured you are free to modify LDAP records per normal processes.

In the event that some or all LDAP records are accidentally deleted, the LDAP server can be ended and the LDIF file can be imported with the command LDIF2DB LDIFSTMF('/home/backup.ldif')
This will restore deleted records with no updates to the other records present.

In the event that some or all LDAP records are accidentally modified, the damaged records must be removed so they can be replaced with an earlier version. Once the records have been removed the LDAP server can be ended and the LDIF file can be imported 

The LDAP file can also be used to move the records to another LDAP server. Prior to being able to import the records, the suffixes that the records are stored in must be defined in the new LDAP server. This is done by first going to LDAP Properties on the SOURCE of the records and select Properties, then from the Database/Suffixes tab note the Suffixes defined. Those same suffixes would need to be defined on the TARGET LDAP server before all the records from the SOURCE can successfully import.
image-20221206085517-1
 
image-20221206091413-3
image-20221206092833-5


 

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CJ2AAM","label":"IBM i Tivoli Directory Server"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3.0;7.4.0;7.5.0"}]

Historical Number

667175906

Document Information

Modified date:
13 September 2023

UID

nas8N1010423