manpages.info - online man pages   

SunOS man pages : nisrestore (1)

Maintenance Commands                               nisrestore(1M)

NAME

nisrestore - restore NIS+ directory backup

SYNOPSIS

nisrestore [ -fv ] backup-dir directory ... nisrestore [ -fv ] -a backup-dir nisrestore -t backup-dir

DESCRIPTION

nisrestore restores an existing backup of a NIS+ directory object that was created using nisbackup(1M). The backup- dir is the UNIX directory that contains the NIS+ backup on the server being restored. The nisrestore command can be used to restore a NIS+ directory object or a complete NIS+ database. It also can be used as an "out of band" fast replication for a new replica server being initialized. The rpc.nisd(1M) daemon must be stopped before running nisre- store. The first synopsis is used to restore a single directory object or a specified list of directory objects. The direc- tory can be partially qualified or fully qualified. The server being restored will be verified against the list of servers serving the directory. If this server is not config- ured to serve this object, nisrestore will exit with an error. The -f option will override this check and force the operation. The second synopsis will restore all of the directory objects contained in the backup-dir. Again, the server will be validated against the serving list for each of the direc- tory objects in the backup-dir. If one of the objects in the backup-dir are not served by this server, nisrestore will exit with an error. The -f option will override this check and force the operation.

OPTIONS

-a Restores all directory objects included in the backup-dir partition. -f Forces the restoration of a directory without the validation of the server in the directory object's serving list. -t Lists all directory objects contained in backup-dir. -v Verbose option. Additional output will be produced upon execution of the command. SunOS 5.8 Last change: 3 Jul 1996 1 Maintenance Commands nisrestore(1M)

OPERANDS

backup-dir The UNIX directory that contains the data files for the NIS+ directory objects to be restored. directory The NIS+ directory object(s) to be restored. This can be a fully or partially qualified name.

EXAMPLES

Example 1: Restoring the org_dir directory object of the domain foo.com on a replica server from a local ufs parti- tion named /var/backup. To restore the org_dir directory object of the domain foo.com on a replica server from a local ufs partition named /var/backup: replica_server# nisrestore /var/backup org_dir.foo.com. Example 2: Forcing the restore of an entire backed up NIS+ namespace to a replica server from the backup partition named /var/backup. To force the restore of an entire backed up NIS+ namespace to a replica server from the backup partition named /var/backup: replica_server# nisrestore -f -a /var/backup Example 3: Restoring the subdomain sub.foo.com on a master server, from a backup that includes other directory objects. To restore the subdomain sub.foo.com on a master server, from a backup that includes other directory objects: master_server# nisrestore /var/backup sub.foo.com. \ org_dir.sub.foo.com. groups_dir.sub.foo.com.

EXIT STATUS

0 Successful completion. 1 An error occurred.

FILES

/backup-dir/backup_list This ascii file contains a list of all the objects contained in this backup-dir directory. This infor- mation can be displayed with the -t option. /backup-dir/directory-object A subdirectory that is created in the backup-dir SunOS 5.8 Last change: 3 Jul 1996 2 Maintenance Commands nisrestore(1M) which contains the directory-object backup. /backup-dir/directory-object/data A subdirectory that contains the data files that are part of the directory-object backup. /backup-dir/directory-object/last.upd This data file contains timestamp information about the directory-object. /backup-dir/directory-object/data.dict A NIS+ data dictionary for all of the objects con- tained in this directory-object backup.

ATTRIBUTES

See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWnisu | |_____________________________|_____________________________|

SEE ALSO

nis+(1), nisdefaults(1), nisbackup(1M), nisserver(1M), rpc.nisd(1M), share_nfs( 1M), nisfiles(4), attributes(5)

NOTES

The -a option will attempt to restore all NIS+ objects con- tained in the backup-dir. If any of these objects are not served by the server, nisrestore will exit with an error. If the backup-dir contains objects that are not served by the server, nisrestore must be executed without the -a option and the specific directory objects listed. The -f option will disable verification of the server being configured to serve the objects being restored. This option should be used with care, as data could be inadvertently restored to a server that doesn't serve the restored data. This option is required in the case of restoring a single server domain (master server only) or if the other NIS+ servers are unavailable for NIS+ lookups. The combination of options -f and -a should be used with caution, as no validation of the server serving the restored objects will be done. New replicas can be quickly added to a namespace with the nisrestore command. The steps are as follows. SunOS 5.8 Last change: 3 Jul 1996 3 Maintenance Commands nisrestore(1M) Configure the new replica on the master server (see nisserver(1M)): master# nisserver -R -h replica Kill the rpc.nisd server process on the new replica server: replica# kill rpc.nisd-pid Create a backup of the NIS+ database on the master, which will include the new replica information (see nisbackup(1M)). The /backup will need to be exported (see share_nfs(1M)) to the new replica: master# nisbackup -a /backup Restore the backup of the NIS+ database on the new replica. Use the -f option if nisrestore is unable to lookup the NIS+ objects being restored. The backup should be available through nfs or similar means (see share_nfs(1M)): replica# nisrestore -f -a //nfs-mnt/backup Restart the rpc.nisd(1M) process on the new replica, and the server will immediately be available for service. SunOS 5.8 Last change: 3 Jul 1996 4