PingDirectory

Running an online LDIF import

You can run LDIF imports while the server is online from another remote server.

The online import is similar to the offline import, except that you must provide information about how to connect and authenticate to the target server.

To schedule an LDIF file to begin importing at a specific time, use the --task and --start YYYYMMDDhhmmss options of the import-ldif tool.

You can also specify email addresses of users to notify when the import process completes. You can notify them regardless of success or failure or only if the import fails.

Performing an online LDIF import

Steps

  1. Confirm the PingDirectory server is online.

  2. To import data from an LDIF, use the import-ldif command.

    Example:

    $ bin/import-ldif --task --hostname server1 --port 389 \
      --bindDN uid=admin,dc=example,dc=com --bindPassword password \
      --backendID userRoot --ldifFile userRoot.ldif

Scheduling an online import

Steps

  1. Confirm the PingDirectory server is online.

  2. To import data from an LDIF file at a scheduled time, use the import-ldif command.

    To specify a time in the UTC time zone, include a trailing Z. Otherwise, the time zone defaults to the time zone configured on the server.

    Example:

    $ bin/import-ldif --task \
      --hostname server1 \
      --port 389 \
      --bindDN uid=admin,dc=example,dc=com \
      --bindPassword password \
      --backendID userRoot \
      --ldifFile /path/to/data.ldif \
      --start 20111026010000 \
      --completionNotify import-complete@example.com \
      --errorNotify import-failed@example.com

    Result:

    Import task 2011102617321510 scheduled to start Oct 26, 2011 1:00:00 AM CDT
  3. To confirm that you successfully scheduled your import task, use the manage-tasks command to view a summary of all tasks on the system.

    Example:

    $ bin/manage-tasks --summary

    Result:

    ID	           Type   Status
    -----------------------------------------------
    2011102617321510 Import Waiting on start time
  4. To monitor the progress of this task, use the manage-tasks tool.

    Use the task ID of the import task. If you cannot find the task ID, use the --summary option to view a list of all tasks scheduled on the PingDirectory server.

    Example:

    $ bin/manage-tasks --info 2011102617321510

    Result:

    Task                    Details
    -----------------------------------------------------
    ID                      2011102617321510
    Type                    Import
    Status                  Waiting on start time
    Scheduled Start Time    Oct 26, 2011 1:00:00 AM CDT
    Actual Start Time
    Completion Time
    Dependencies Failed     None
    Dependency Action       None
    Email Upon Completion   admin@example.com
    Email Upon Error        admin@example.com
    
    Import        Options
    ----------------------------
    LDIF File	 /path/to/data.ldif
    Backend ID	userRoot

Canceling a scheduled import

Steps

  • To cancel the scheduled task, run the manage-tasks tool.

    Example:

    $ bin/manage-tasks --cancel 2011102417321510