12.10 Using the Client to Repair a Database

The eDirectory Management Toolbox (eMBox) Client is a command line Java client that gives you remote access to DSRepair. Because the Client can be run in batch mode, you can use it to do unattended repairs using the eDirectory DSRepair eMTool.

The emboxclient.jar file is installed on your server as part of eDirectory. You can run it on any machine with a JVM. For more information on the Client, see Using the Command Line Client.

12.10.1 Using the DSRepair eMTool

  1. Run the Client in interactive mode by entering the following at the command line:

    java -cp path_to_the_file/emboxclient.jar -i

    (If you have already put the emboxclient.jar file in your class path, you only need to enter java -i.)

    The Client prompt appears:

     Client>
  2. Log in to the server you want to repair by entering the following:

    login -s server_name_or_IP_address -p port_number 
    -u username.context -w password -n

    The port number is usually 80 or 8028, unless you have a Web server that is already using the port. The -n option opens a nonsecure connection.

    The Client will indicate whether the login is successful.

  3. Enter a repair command, using the following syntax:

    dsrepair.task options

    For example, dsrepair.ufr performs an unattended full repair.

    dsrepair.rld -a -v repairs the local database using the Repair All Local Replicas and Check Local References options.

    A space must be between each switch. The order of the switches is not important.

    The Client will indicate whether the repair is successful.

    See DSRepair eMTool Options for more information on the DSRepair eMTool options.

  4. Log out from the Client by entering the following command:

    logout
  5. Exit the Client by entering the following command:

    exit

12.10.2 DSRepair eMTool Options

The following tables lists the DSRepair eMTool options. You can also use the list -t dsrepair command in the Client to list the DSRepair options with details. See Listing eMTools and Their Services for more information.

Option

Description

rso -o -d

Single object repair Object ID in hex Object DN

rts

Time synchronization

rss

Report synchronization status of all partitions

rld -l -t -d -p -i -f -c -o -a -m -v

  • Repair local database

  • Lock eDirectory database during entire repair

  • Use temporary eDirectory database during repair

  • Maintain original unrepaired database

  • Perform database structure check

  • Perform database structure and index check

  • Reclaim database free space

  • Perform tree structure check

  • Rebuild operational schema

  • Repair all local replicas

  • Validate mail directories and stream files

  • Check local references

ufr

Unattended full repair

rsn -o -d

Repair selected server's network address Object ID in hex Object DN

ran

Repair all network addresses

rsr -p -d

Repair selected replica Partition ID Partition DN

rer

Repair every replica

ror -p -d

Repair selected replica ring Partition ID Partition DN

rar

Repair replica ring, all replicas

ssa -p -d

Report the replica synchronization status of all servers Partition ID Partition DN

cer

Check external references

rao -p -d -s -d

Receive all objects for this replica Partition ID Partition DN Server ID Server DN

sao -p -d -s -d

Send all objects to every replica in the ring Partition ID Partition DN Server ID Server DN

dne -p -d

Repair time stamps and declare a new epoch Partition ID Partition DN

sri -p -d

Schedule immediate synchronization Partition ID Partition DN Server ID Server DN

sks -p -d -s -d

Synchronize the replica on the selected server Partition ID Partition DN Server ID Server DN

ske -p -d

Synchronize the replica on all servers Partition ID Partition DN

dsr -p -d

Destroy the selected replica on this server Partition ID Partition DN

xsr -p -d -s -d

Remove this server from the replica ring Partition ID Partition DN Server ID Server DN

dnm -p -d

Designate this server as the new master replica Partition ID Partition DN

dul

Delete unknown leaf objects