Importing data on the PingDirectory server using offline import
Steps
-
Create a
.ldiffile that contains entries or locate an existing file.Theimport-ldiftool requires a.ldiffile, which conforms to standard LDIF syntax without change records. ThechangeTypeattribute is not allowed in the input LDIF. For information on adding entries to the PingDirectory server, see Managing Entries. -
Stop the PingDirectory server.
-
To import data from an LDIF file to the PingDirectory server, use the
import-ldifcommand.For assistance with the list of options, run
import-ldif --help.In the following example, the data is imported from the
data.ldiffile to theuserRootbackend. Entries rejected because of schema violation are written with the rejection reason to therejects.ldiffile. Skipped entries, written toskipped.ldif, occur if an entry cannot be placed under a branch node in the directory information tree (DIT) or if exclusion filters, such as--excludeBranch,--excludeAttribute, or--excludeFilterare used. The--overwriteoption instructsimport-ldifto overwrite existing skipped and rejected files. The--overwriteExistingEntriesoption indicates that any existing data in the backend should be overwritten, and the--stripTrailingSpacesoption strips trailing spaces on attributes that would otherwise result in an LDIF parsing error.Example:
$ bin/import-ldif --backendID userRoot --ldifFile /path/to/data.ldif --rejectFile rejects.ldif --skipFile skipped.ldif --overwrite --overwriteExistingEntries --stripTrailingSpaces -
Restart the PingDirectory server.