Solaris Naming Setup and Configuration Guide

How to Configure a Replica Server With NIS+ Commands

In this example, the master server is named master1, and the new replica is named replica2.

  1. Log in to the domain's master server.

  2. Make sure that rpc.nisd is running.

  3. Add the replica to the domain.

    Run the nismkdir command with the -s option. The example below adds the replica machine named replica2 to the doc.com.domain.


    master1# nismkdir -s replica2 doc.com. 
    master1# nismkdir -s replica2 org_dir.doc.com. 
    master1# nismkdir -s replica2 groups_dir.doc.com.

    When you run the nismkdir command on a directory object that already exists, it does not recreate the directory but modifies it, according to the flags you provide. In this case, the -s flag assigns the domain an additional replica server. You can verify that the replica was added by examining the directory object's definition, using the niscat -o command.


    Caution - Caution -

    Never run nismkdir on the replica machine. Running nismkdir on a replica creates communications problems between the master and the replicas.


    Your new replica is now configured. You can now load your NIS+ data set on to the replica. You can do this in two ways:

    • nisping. If you do nothing, your master server will use the nisping command to load your namespace data on to your newly configured replica server. If your namespace is large, this process can take hours. During this process, requests for naming information can be delayed. See " Using nisping to Load Data on to a Replica Server" for details.

    • Backup and restore. You can interrupt the transfer of data via nisping and use the NIS+ backup and restore capabilities to load your namespace data on to a newly configured replica server, as described in "Using nisrestore to Load Data on to a Replica Server". Because it is so much faster and more efficient, this is the preferred method.