Solaris Naming Administration Guide

Restoring Your NIS+ Namespace With nisrestore

The nisrestore command recreates NIS+ directory objects to match the data stored in backup files created with the nisbackup command. This command can be used to restore NIS+ servers, replace directory objects that have become corrupted, or down load NIS+ data on to a new NIS+ server.

Prerequisites to Running nisrestore

In order to use nisrestore the target machine that will be receiving the NIS+ data from nisrestore must have already been set up as an NIS+ server. (See Solaris Naming Setup and Configuration Guide for a detailed description of setting up NIS+ servers.) This means that:


Caution - Caution -

In addition to the three pre-requisites listed above, the rpc.nisd daemon must not be running on the machine. If necessary, you must kill rpc.nisd before running nisrestore.


nisrestore Syntax

The nisrestore command uses the following syntax:


nisrestore [-fv][-a][-t] backupdir [directory_objects]

Where:

The nisrestore command takes the following options:

Table 15-2 Options for the nisbackup Command

Option 

Purpose 

-a

All. Restores all of the NIS+ directory objects contained in the backup directory. 

-f

Forces the restoration without validating that the server is listed in the directory object's serving list. This option must be used when restoring a root master server or if you get an "unable to lookup object" type of error. 

-v

Verbose mode. This mode provides additional information 

-t

This option lists all of the NIS+ directory objects stored in the backup directory. No restoration of objects takes place. 

Using nisrestore

To restore NIS+ data from NIS+ backup files, use the nisrestore command.

For example, to restore the org_dir.doc.com. directory object on the replica1 server, you would log in as root on replica1, make sure that the prerequisites described in "Prerequisites to Running nisrestore " have been met and then run nisrestore as shown below:


replica1# nisrestore /var/master1_bakup org_dir.doc.com.

The following points apply to nisrestore:


master1# nisrestore -f -a /var/master1_bakup