1nisrestore(1M)          System Administration Commands          nisrestore(1M)
2
3
4

NAME

6       nisrestore - restore NIS+ directory backup
7

SYNOPSIS

9       nisrestore [-fv] backup-dir directory...
10
11
12       nisrestore [-fv] -a backup-dir
13
14
15       nisrestore -t backup-dir
16
17

DESCRIPTION

19       nisrestore  restores an existing backup of a NIS+ directory object that
20       was created using nisbackup(1M). The backup-dir is the  UNIX  directory
21       that  contains the NIS+ backup on the server being restored. The nisre‐
22       store command can be used to restore a NIS+ directory object or a  com‐
23       plete  NIS+  database.  It  also  can  be used as an "out of band" fast
24       replication  for  a  new  replica   server   being   initialized.   The
25       rpc.nisd(1M) daemon must be stopped before running nisrestore.
26
27
28       The  first  synopsis  is used to restore a single directory object or a
29       specified list of directory objects. The  directory  can  be  partially
30       qualified  or  fully qualified. The server being restored will be veri‐
31       fied against the list of servers serving the directory. If this  server
32       is  not  configured  to serve this object, nisrestore will exit with an
33       error. The -f option will override this check and force the operation.
34
35
36       The second synopsis will restore all of the directory objects contained
37       in  the  backup-dir.  Again,  the  server will be validated against the
38       serving list for each of the directory objects in  the  backup-dir.  If
39       one  of  the  objects  in the backup-dir are not served by this server,
40       nisrestore will exit with an error. The -f option  will  override  this
41       check and force the operation.
42
43
44       The -a option will attempt to restore all NIS+ objects contained in the
45       backup-dir. If any of these objects are not served by the server,  nis‐
46       restore  will  exit  with  an error. If the backup-dir contains objects
47       that are not served by the server, nisrestore must be executed  without
48       the -a option and the specific directory objects listed.
49
50
51       The  -f option will disable verification of the server being configured
52       to serve the objects being restored. This option should  be  used  with
53       care,  as data could be inadvertently restored to a server that doesn't
54       serve the restored data. This option is required in the case of restor‐
55       ing  a  single  server domain (master server only) or if the other NIS+
56       servers are unavailable for NIS+ lookups.
57
58
59       The combination of options -f and -a should be used with caution, as no
60       validation of the server serving the restored objects will be done.
61
62
63       New  replicas  can  be quickly added to a namespace with the nisrestore
64       command. The steps are as follows.
65
66
67       Configure the new replica on the master server (see nisserver(1M)):
68
69         master# nisserver -R -h replica
70
71
72
73
74       Temporarily stop the rpc.nisd server process on the new replica server:
75
76         replica# svcadm disable -t network/rpc/nisplus:default
77
78
79
80
81       Create a backup of the NIS+ database on the master, which will  include
82       the  new  replica information. See nisbackup(1M). The /backup will need
83       to be exported to the new replica. See share_nfs(1M).
84
85         master# nisbackup -a /backup
86
87
88
89
90       Restore the backup of the NIS+ database on the new replica. Use the  -f
91       option  if  nisrestore  is  unable  to  lookup  the  NIS+ objects being
92       restored. The backup should be available through nfs or similar  means.
93       See share_nfs(1M).
94
95         replica# nisrestore -f -a //nfs-mnt/backup
96
97
98
99
100       Restart  the  rpc.nisd(1M)  process  on the new replica, and the server
101       will immediately be available for service:
102
103         replica# svcadm enable network/rpc/nisplus:default
104
105
106

OPTIONS

108       The following options are supported:
109
110       -a    Restores all directory objects included in the backup-dir  parti‐
111             tion.
112
113
114       -f    Forces  the  restoration of a directory without the validation of
115             the server in the directory object's serving list.
116
117
118       -t    Lists all directory objects contained in backup-dir.
119
120
121       -v    Verbose option. Additional output will be produced upon execution
122             of the command.
123
124

OPERANDS

126       The following options are supported:
127
128       backup-dir    The  UNIX  directory that contains the data files for the
129                     NIS+ directory objects to be restored.
130
131
132       directory     The NIS+ directory object(s) to be restored. This can  be
133                     a fully or partially qualified name.
134
135

EXAMPLES

137       Example  1  Restoring  the  Directory Object on a Replica Server from a
138       Local UFS Partition
139
140
141       To restore the org_dir directory object of  the  domain  foo.com  on  a
142       replica server from a local ufs partition named /var/backup:
143
144
145         replica_server# nisrestore /var/backup org_dir.foo.com.
146
147
148
149       Example  2  Forcing  the  Restore  of  a  Backed up NIS+ Namespace to a
150       Replica Server From the Backup Partition
151
152
153       To force the restore of an entire backed up NIS+ namespace to a replica
154       server from the backup partition named /var/backup:
155
156
157         replica_server# nisrestore -f -a /var/backup
158
159
160
161       Example 3 Restoring the Subdomain on a Master Server From a Backup that
162       Includes Other Directory Objects
163
164
165       To restore the subdomain sub.foo.com on a master server, from a  backup
166       that includes other directory objects:
167
168
169         master_server# nisrestore /var/backup sub.foo.com. \
170          org_dir.sub.foo.com. groups_dir.sub.foo.com.
171
172
173

EXIT STATUS

175       0    Successful completion.
176
177
178       1    An error occurred.
179
180

FILES

182       /backup-dir/backup_list
183
184           This  ASCII  file  contains  a list of all the objects contained in
185           this backup-dir directory. This information can be  displayed  with
186           the -t option.
187
188
189       /backup-dir/directory-object
190
191           A subdirectory that is created in the backup-dir which contains the
192           directory-object backup.
193
194
195       /backup-dir/directory-object/data
196
197           A subdirectory that contains the data files that are  part  of  the
198           directory-object backup.
199
200
201       /backup-dir/directory-object/last.upd
202
203           This  data file contains timestamp information about the directory-
204           object.
205
206
207       /backup-dir/directory-object/data.dict
208
209           A NIS+ data dictionary for all of the  objects  contained  in  this
210           directory-object backup.
211
212

ATTRIBUTES

214       See attributes(5) for descriptions of the following attributes:
215
216
217
218
219       ┌─────────────────────────────┬─────────────────────────────┐
220       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
221       ├─────────────────────────────┼─────────────────────────────┤
222       │Availability                 │SUNWnisu                     │
223       └─────────────────────────────┴─────────────────────────────┘
224

SEE ALSO

226       svcs(1),   NIS+(1),   nisdefaults(1),   nisbackup(1M),   nisserver(1M),
227       rpc.nisd(1M), share_nfs( 1M), svcadm(1M),  nisfiles(4),  attributes(5),
228       smf(5)
229

NOTES

231       NIS+ might not be supported in future releases of the Solaris Operating
232       system. Tools to aid the migration from NIS+ to LDAP are  available  in
233       the    current   Solaris   release.   For   more   information,   visit
234       http://www.sun.com/directory/nisplus/transition.html.
235
236
237       The NIS+ service is managed by the service management facility, smf(5),
238       under the service identifier:
239
240         svc:/network/rpc/nisplus:default
241
242
243
244
245       Administrative actions on this service, such as enabling, disabling, or
246       requesting restart, can be performed using  svcadm(1M).  The  service's
247       status can be queried using the svcs(1) command.
248
249
250
251SunOS 5.11                        13 Aug 2004                   nisrestore(1M)
Impressum