JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Naming and Directory Services (NIS+)
search filter icon
search icon

Document Information


Part I About Naming and Directory Services

1.  Name Service Switch

Part II NIS+ Setup and Configuration

2.  NIS+: An Introduction

3.  NIS+ Setup Scripts

4.  Configuring NIS+ With Scripts

5.  Setting Up the NIS+ Root Domain

6.  Configuring NIS+ Clients

7.  Configuring NIS+ Servers

8.  Configuring an NIS+ Non-Root Domain

9.  Setting Up NIS+ Tables

Part III NIS+ Administration

10.  NIS+ Tables and Information

11.  NIS+ Security Overview

12.  Administering NIS+ Credentials

13.  Administering NIS+ Keys

14.  Administering Enhanced NIS+ Security Credentials

15.  Administering NIS+ Access Rights

16.  Administering NIS+ Passwords

17.  Administering NIS+ Groups

18.  Administering NIS+ Directories

19.  Administering NIS+ Tables

20.  NIS+ Server Use Customization

21.  NIS+ Backup and Restore

Backing Up Your NIS+ Namespace With nisbackup

nisbackup Syntax

What nisbackup Backs Up

NIS+ Backup Target Directory

Maintaining a Chronological Sequence of NIS+ Backups

Backing Up Specific NIS+ Directories

Backing Up an Entire NIS+ Namespace

NIS+ Backup Directory Structure

NIS+ Backup Files

Restoring Your NIS+ Namespace With nisrestore

Prerequisites to Running nisrestore

nisrestore Syntax

Using nisrestore

Using NIS+ Backup/Restore to Set Up Replicas

How to Use NIS+ Backup/Restore to Set Up Replicas

Replacing NIS+ Server Machines

How to Replace NIS+ Server Machines

22.  Removing NIS+

23.  Information in NIS+ Tables

24.  NIS+ Troubleshooting

A.  NIS+ Error Messages

About NIS+ Error Messages

Common NIS+ Namespace Error Messages

B.  Updates to NIS+ During the Solaris 10 Release

Solaris 10 and NIS+



Backing Up Your NIS+ Namespace With nisbackup

The nisbackup command backs up one or more NIS+ directory objects or an entire namespace to a specified UNIX file system directory.

Note - The nisbackup command is always run on a master server. Never run it on a replica server.

The nisbackup command copies the NIS+ namespace data set as of the time the backup command is run. This recording includes all current NIS+ data and also any changes entered into the NIS+ namespace by an authorized network administrator but not yet checkpointed (posted) to the NIS+ tables. The backup operation does not check or correct NIS+ data. If data in a table is corrupt, the corrupt data is backed up as if it were valid data.

The nisbackup command only backs up those directory objects that the machine is master server for. In other words, you can only use nisbackup on a master server. You cannot use nisbackup on a replica server.

If the backup process is interrupted or unable to successfully complete its operation, it halts and restores all previous backup files that were stored in the target directory.

nisbackup Syntax

The nisbackup command uses the following syntax:

nisbackup [-v][-a] backupdir objects


The nisbackup command takes the following options.

Table 21-1 Options for the nisbackup Command

Verbose mode. This mode provides additional information
All. Backs up all NIS+ directory objects that the server is master of. This includes any sub-domain directory objects that this server is the master for. Note that directory objects of subdomains that have their own master servers will not be backed up.

The nisbackup command must be run on the master server for the NIS+ directory objects you are backing up.

When specifying NIS+ directory objects to be backed up, you can use full or partially qualified directory names.

When you back up multi-level directories, the backup files for lower level directories are automatically placed in subdirectories of the target backup directory.

What nisbackup Backs Up

When using nisbackup, keep in mind that nisbackup is server specific. Regardless of whether or not you use the -a option, nisbackup only backs up those directories that the server you are running it on is master of. NIS+ directory objects that have some other master server will not be backed up.

For example, suppose the submaster1 server is master server for the directory objects and also a replica for the directory objects. When you run nisbackup on submaster1, only the directory objects will be backed up.

Some of the implications of this server-specific principle are:

NIS+ Backup Target Directory

While the backup target directory must be available to the server being backed up, it is good practice to use a target directory that is not physically mounted on the server. That way you ensure that if the server is damaged the backup directory is still available.

A separate target directory must be used for each master server being backed up. It is good practice to avoid confusion by including the master server's machine name in the target directory name. For example, the target directory for a nisbackup run on the master1 machine might be named /var/master1_bakup.


Caution - Never back up more than one master server to a given target directory. Always use different target directories for different master servers. This is because each time you backup one or more NIS+ directory objects to a given target directory, previous backup files for those NIS+ directory objects in that directory are overwritten.

Maintaining a Chronological Sequence of NIS+ Backups

There are at least two ways to maintain an historic sequence of backup files:

Backing Up Specific NIS+ Directories

To back up specific NIS+ directory objects, you list those directories after the target backup directory.

For example, to backup the three org_dir directory objects for the root, sales, and manf domains to a /master1_bakup directory, you would run nisbackup on the master1 machine as follows:

master1# nisbackup /var/master1_bakup org_dir org_dir.sales org_dir.manf

Backing Up an Entire NIS+ Namespace

To back up an entire NIS+ namespace you run the nisbackup command on the root master server with the -a option.

When you use the -a option, you do not specify the NIS+ directory objects to be backed up. All NIS+ directory objects on the server and all those of subdomains below it will be automatically backed up.

For example, to backup the namespace to a /master1_bakup directory, you would run nisbackup on the root master as follows:

rootmaster# nisbackup -a /var/master1_bakup

NIS+ Backup Directory Structure

When you perform a back up on a domain, a subdirectory for each NIS+ directory object is created in the backup target directory. The names of these subdirectories match the fully qualified NIS+ directory object name including the trailing period.

If you perform a full backup of an entire NIS+ object using the -a option, then all three of the associated directory objects (domain. org_dir.domain., and groups_dir.domain.) are backed up and three target subdirectories are created. If you are backing up multiple objects, subdirectories are created for every object that you are backing up.

Note that the backup subdirectories for multiple NIS+ directory object are all subdirectories of the parent target backup directory regardless of whether or not they are subdomains. In other words, nisbackup does not reproduce a domain hierarchy under the parent backup target directory, instead all of the back up subdirectories are simple subdirectories of the target directory.

For example, if you backed up the root, sales, and manf directory objects of to a /var/master1_bakup directory, nine subdirectories would be created in the /var/master1_bakup directory as shown in Figure 21-1.

Figure 21-1 Example Directories Created by nisbackup

Diagram shows example directories created by nisbackup

NIS+ Backup Files

The backup target directory contains a backup_list file that lists the NIS+ directory objects most recently backed up to this target directory.

Each of the subdirectories contain two files and a /data subdirectory.

The three files are:

Each of the /data subdirectories contain one or more of the following files: