The tool binds to the Directory Server locally or remotely and validates the LDIF file to determine whether it violates the server's schema. Elements that do not conform to the schema are rejected and written to standard output. You can specify the output filepath to which the rejected entries and reasons for their rejection are written. The validate-ldif tool works with regular non-compressed LDIF files or gzip-compressed LDIF files.

  • To validate an LDIF file, run the validate-ldif tool.

    Make sure the server is online before running this command.

    To process large files faster, you can set the number of threads for validation. The tool also provides options to skip specified schema elements if you are only validating certain items, such as attributes only.

    $ bin/validate-ldif --ldifFile /path/to/data.ldif \ 
      --rejectFile rejectedEntries
    1. Optional: To view the arguments, use the --help option.
    1 of 200 entries (0 percent) were found to be invalid. 
    1 undefined attributes were encountered. 
    Undefined attribute departmentname was encountered 1 times.