ping-directory Commands

Server Management

setup

Run the interactive setup process to configure the server for the first time.

./setup

Examples:
Run Interactive Setup
./setup
start-server

Start the PingDirectory server.

./start-server

Examples:
Start the server in the foreground
./start-server
stop-server

Stop the PingDirectory server gracefully.

./stop-server

Examples:
Stop the server
./stop-server

Data Operations

ldapsearch

Search for entries in the LDAP directory.

ldapsearch --hostname localhost --port 1389 --baseDN "dc=example,dc=com" "(uid=user.0)"

Examples:
Basic search for a user
ldapsearch --hostname localhost --port 1389 --baseDN "dc=example,dc=com" "(uid=user.0)"
Search with authentication
ldapsearch --hostname localhost --port 1389 --bindDN "cn=Directory Manager" --bindPassword password --baseDN "dc=example,dc=com" "(objectClass=person)"
ldapmodify

Modify directory entries using an LDIF file or standard input.

ldapmodify --hostname localhost --port 1389 --bindDN "cn=Directory Manager" --bindPassword password

Examples:
Modify an entry from a file
ldapmodify -f changes.ldif

Import/export

import-ldif

Efficiently import data into the directory from an LDIF file.

import-ldif --backendID userRoot --ldifFile /path/to/data.ldif

Examples:
Import an LDIF file into the main user backend
import-ldif --backendID userRoot --ldifFile /path/to/data.ldif
export-ldif

Export data from the directory to an LDIF file.

export-ldif --backendID userRoot --ldifFile /path/to/export.ldif

Examples:
Export the main user backend to an LDIF file
export-ldif --backendID userRoot --ldifFile /path/to/export.ldif
backup

Create a backup of one or more directory backends.

backup --backendID userRoot --backupDirectory /path/to/backups

Examples:
Create a backup of the main user backend
backup --backendID userRoot --backupDirectory /path/to/backups
restore

Restore one or more directory backends from a backup.

restore --backupDirectory /path/to/backup/dir

Examples:
Restore from the most recent backup in a directory
restore --backupDirectory /path/to/backups/20230101120000Z

Configuration

dsconfig

View and manage server configuration settings.

dsconfig --hostname localhost --port 4444 --bindDN "cn=Directory Manager" --bindPassword password --no-prompt

Examples:
Get a configuration property
dsconfig get-global-configuration-prop --property-name writability-mode
Set a configuration property
dsconfig set-global-configuration-prop --set writability-mode:internal-only

Performance Testing

searchrate

Run a performance test to measure search operation throughput.

searchrate --hostname localhost --port 1389 --baseDN "dc=example,dc=com" --filter "(uid=user.[1-1000])"

Examples:
Run a simple search rate test
searchrate --hostname localhost --port 1389 --baseDN "dc=example,dc=com" --filter "(uid=user.[1-1000])"
authrate

Run a performance test to measure bind operation throughput.

authrate --hostname localhost --port 1389 --bindDN "uid=user.[1-1000],ou=People,dc=example,dc=com" --bindPassword password

Examples:
Run a simple authentication rate test
authrate --hostname localhost --port 1389 --bindDN "uid=user.[1-1000],ou=People,dc=example,dc=com" --bindPassword password

Maintenance

rebuild-index

Rebuild a specific index within a backend.

rebuild-index --backendID userRoot --index-type vlv --baseDN "dc=example,dc=com"

Examples:
Rebuild a VLV index
rebuild-index --backendID userRoot --index-type vlv --baseDN "dc=example,dc=com"
compact-db

Reclaim disk space by compacting a backend database.

compact-db --backendID userRoot

Examples:
Compact the userRoot backend
compact-db --backendID userRoot