summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/nsdc.8.in
blob: ac17ad664924950fe6963c607bdea80f5ef100a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
.TH "NSDC" "8" "Nov  1, 2012" "NLnet Labs" "NSDC 3.2.14"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
.LP
.B nsdc
\- Name Server Daemon (NSD) control script.
.SH "SYNOPSIS"
.LP
.B nsdc
.RB [ \-c
.IR configfile ]
.I start
|
.I stop
|
.I reload
|
.I rebuild
|
.I restart
|
.I running
|
.I update
|
.I notify
|
.I patch
.SH "DESCRIPTION"
.LP
.B Nsdc
is the shell script that used to control nsd(8) and nsd\-zonec(8) from 
.B NSD
distribution.
.B Nsdc
is also suitable to be linked into
.I /etc/rc.d
directory on
.I BSD
like systems for automatic startup of nsd(8) at boot time.
.P
At every invokation,
.B nsdc
will try to read the nsd.conf(5) configuration file. An example of 
such configuration file is distributed with the
.B NSD
package as
.IR nsd.conf.sample .
The config file is checked for errors before it is used, see 
nsd\-checkconf(8).
.P
Possible
.B nsdc
applications are:
.TP
.I start
Start nsd(8).
.TP
.I stop
Shut down nsd(8) by sending 
.I SIGTERM 
to it. 
.TP
.I reload
Initiate nsd(8) name space database reload by sending
.IR SIGHUP.
.TP 
.I rebuild
Rebuild the nsd(8) database by invoking nsd\-zonec(8) with appropriate 
arguments.
.TP 
.I restart
Restart nsd(8). This equals to nsdc stop && nsdc start.
.TP
.I running
Check whether nsd(8) is running. Returns error message and error 
code if it is not running, and no message and zero error code 
otherwise. 
.TP
.I update
Updates all the slave zones which have
.I allow\-notify:
from localhost (127.0.0.1 or ::1) allowed.
If a TSIG key is specified for the allow\-notify statement in the 
config file, it will be used to secure the notify. Note that NSD 
keeps track of zone timeouts automatically, this is only needed if 
you want to manually force updates by sending notify messages to the 
localhost. 
.P
.RS
Another method you can use is to stop nsd, delete the xfrd.state
file and then start nsd again. It will try to update all zones.
This method does not require allow\-notify: statements.
.RE
.TP
.I notify
Sends notify messages to all the slaves for all the zones that have the
.I notify:
keyword in the
.I nsd.conf
file. If a TSIG key is specified for a notify statement, it will be 
used to secure the notification message to that slave server.
.TP
.I patch
Merge zone transfer changes back to zone files. It reads in the nsd 
database (nsd.db) and difffile (ixfr.db), and overwrites the zone 
text files if they have been updated. Running this regularly 
ensures that the difffile does not grow infinitely. If any zone text
files have been changed (including those of the master zones), the
nsd.db is rebuild and nsd is reloaded.
.SH "OPTIONS"
.TP
.B \-c\fI configfile
Specify configfile to use instead of the default
.IR @nsdconfigfile@ .
.SH "FILES"
.TP
@nsdconfigfile@
Configuration file for nsd to change default pathnames and
.B NSD 
flags. The zone names, pathnames to zone files and access control 
lists are also in nsd.conf(5).
.TP
@dbfile@
default
.B NSD
database
.TP
@dbfile@.lock
Lockfile for the
.B NSD
database access by operator tools.
.TP
@difffile@
Journal of zone transfers, the diff file containing the new zone 
contents transferred.
.TP
@xfrdfile@
State for the zone transfer process of 
.BR NSD. 
Contains timeouts for the zones and whether zones are expired.
.TP
@pidfile@
the process id of the name server.
.SH "DIAGNOSTICS"
.LP
.B Nsdc
will return zero return code if operation was successful and
an error message to standard output plus a non\-zero return code
otherwise.
.SH "SEE ALSO"
.LP
nsd(8), nsd.conf(5), nsd\-checkconf(8), nsd\-notify(8), 
nsd\-patch(8), nsd\-xfer(8), nsd\-zonec(8)
.SH "AUTHORS"
.LP
.B NSD
was written by NLnet Labs and RIPE NCC joint team. Please see
CREDITS file in the distribution for further details.
.SH "BUGS"
Syntax checking of the config file is rudimentary and error 
messages may be wrong. If you do a nsdc patch, whilst a (long) zone 
transfer is busy, the zone transfer contents will be partially 
lost. After a reload, this will be detected and the zone transfer 
should be restarted. The reload that happens at the end of nsdc 
patch also frees up memory churn in 
.B NSD 
caused by zone transfers.