1 | .ll 6i |
---|
2 | .TH TRACK 8 "18 April 1988" |
---|
3 | .UC 4 |
---|
4 | .SH NAME |
---|
5 | track \- maintain files between machines |
---|
6 | .SH SYNOPSIS |
---|
7 | .B track |
---|
8 | [ |
---|
9 | .B \- FSTcdfimnpqsvwx |
---|
10 | ] |
---|
11 | .I subscriptionlist |
---|
12 | .SH DESCRIPTION |
---|
13 | .B Track |
---|
14 | supports a |
---|
15 | .I librarian/subscriber |
---|
16 | model of file update. |
---|
17 | That is, subscribing machines are able, but not obliged, to stay in synch with |
---|
18 | librarian machines' file-system contents. |
---|
19 | .PP |
---|
20 | The file |
---|
21 | .I subscriptionlist |
---|
22 | contains a description of those files, directories, devices, & links |
---|
23 | which are to be kept up-to-date on the subscriber machines. |
---|
24 | The |
---|
25 | .I subscriptionlist's |
---|
26 | file-system-description must follow a particular syntax, |
---|
27 | which is described in subscriptionlist(5). |
---|
28 | For a prototype, see the usual default, /srvd/usr/athena/lib/slists/sys_rvd. |
---|
29 | The general default is <workdir>/slists/sys_rvd, where <workdir> is |
---|
30 | the "local working directory", as described under the -W option below. |
---|
31 | .PP |
---|
32 | When |
---|
33 | .B track |
---|
34 | is invoked with the |
---|
35 | .B \-w |
---|
36 | option (i.e. as the |
---|
37 | .I librarian |
---|
38 | machine), |
---|
39 | .B track |
---|
40 | follows the |
---|
41 | .I subscriptionlist's |
---|
42 | directions to traverse the librarian's file-system, and creates a |
---|
43 | .I statfile(5) |
---|
44 | containing currentness information about the files that are available to |
---|
45 | subscribing machines. |
---|
46 | The |
---|
47 | .I statfile's |
---|
48 | default path is /srvd/etc/athena/lib/stats/sys_rvd. |
---|
49 | The |
---|
50 | .I currentness |
---|
51 | information recorded in the statfile includes |
---|
52 | file-type, mod-time, uid, gid, permissions, device-type, link-value & checksum. |
---|
53 | This is a performance-hack, allowing the subscribers to avoid |
---|
54 | net-accesses except when librarian files need to be copied. |
---|
55 | The |
---|
56 | .I statfile |
---|
57 | is not particularly legible. |
---|
58 | .PP |
---|
59 | When |
---|
60 | .B track |
---|
61 | is invoked without |
---|
62 | .B \-w |
---|
63 | (i.e. as the |
---|
64 | .I subscriber |
---|
65 | machine), |
---|
66 | the |
---|
67 | .I librarian |
---|
68 | machine is specified as an NFS mount-point with the -F option |
---|
69 | (default: /srvd). |
---|
70 | .B Track |
---|
71 | uses the |
---|
72 | .I subscriptionlist |
---|
73 | to decide what local files are to be considered for possible updating. |
---|
74 | The |
---|
75 | .I statfile |
---|
76 | represents the librarian's exported files, and |
---|
77 | .B track |
---|
78 | uses it to decide whether each local file should be updated: |
---|
79 | any differences in currentness will cause |
---|
80 | .B track |
---|
81 | to update the local file from the librarian's version. |
---|
82 | .PP |
---|
83 | It is possible for the librarian & subscribers to use different |
---|
84 | .I subscriptionlists. |
---|
85 | In general, the librarian "exports" a catalog (the |
---|
86 | .I statfile |
---|
87 | ), and each subscriber may "import" as much or as little of this catalog's |
---|
88 | offering as he wishes. |
---|
89 | If the librarian's & subscribers' |
---|
90 | .I subscriptionlists |
---|
91 | differ, only those files which are specified in both lists can be updated. |
---|
92 | .PP |
---|
93 | .B Track |
---|
94 | is unforgiving when writing a statfile, so as to prevent confused updates. |
---|
95 | It tries to forgive errors when updating, so as to discourage partial updates. |
---|
96 | Any errors are logged in the file /usr/adm/TRACKLOG. |
---|
97 | The TRACKLOG is useful for patching an update that breaks. |
---|
98 | .PP |
---|
99 | The most commonly-used options are: |
---|
100 | .TP |
---|
101 | .B \-F<fromdir> |
---|
102 | Specify the source ( librarian) root-directory or mount-point. |
---|
103 | The default value is /srvd. |
---|
104 | .TP |
---|
105 | .B \-I |
---|
106 | Ignore file-protections ( uid, gid, mode-bits) when tracking as a subscriber. |
---|
107 | However, if track creates a file on the subscriber, |
---|
108 | the copy will get the librarian's copy's protections. |
---|
109 | .TP |
---|
110 | .B \-T<todir> |
---|
111 | Specify the destination root directory, or mount-point. The default is /. |
---|
112 | .TP |
---|
113 | .B \-W<workdir> |
---|
114 | Change the local working directory (i.e. the directory on the local machine) to |
---|
115 | .I workdir. |
---|
116 | The default is /mnt/etc/athena/lib, where /mnt is the librarian mount-point. |
---|
117 | The working directory is the place where |
---|
118 | .B track |
---|
119 | will look for the |
---|
120 | .I subscriptionlist |
---|
121 | (default: slists/sys_rvd), |
---|
122 | and the |
---|
123 | .I statfile |
---|
124 | (default: stats/sys_rvd). |
---|
125 | In order to write a statfile (-w option), |
---|
126 | .B track |
---|
127 | must have permission to write in the local working directory. |
---|
128 | .TP |
---|
129 | .B \-c |
---|
130 | When updating, |
---|
131 | compare each regular file's checksum with |
---|
132 | the corresponding checksum on the librarian-mountpoint. |
---|
133 | The librarian's checksums are always recorded in the |
---|
134 | .I statfile. |
---|
135 | -c slows the update, |
---|
136 | but the checksums enable track to detect file-system corruption. |
---|
137 | .TP |
---|
138 | .B \-f |
---|
139 | Force the update. Don't be gentle about what is destroyed. Normally |
---|
140 | .B track |
---|
141 | is very cautious about files being destroyed by an update. |
---|
142 | .TP |
---|
143 | .B \-n |
---|
144 | Do nothing, just produce a list of files that need updating (disabled by \-w), |
---|
145 | and the anticipated consequences of doing the update. |
---|
146 | This output goes to stderr, but not into the TRACKLOG. |
---|
147 | .TP |
---|
148 | .B \-s <statfile> |
---|
149 | .B \-s - |
---|
150 | Use the named file as the statfile, or use stdio if "-s -" is used. |
---|
151 | The default is <workdir>/stats/sys_rvd, where <workdir> is the working-dir |
---|
152 | specified by the -W option. |
---|
153 | .TP |
---|
154 | .B \-v |
---|
155 | Produces a very verbose description of what is happening during the update: |
---|
156 | which files get updated, and why. This output goes to stderr, but not |
---|
157 | into the TRACKLOG. |
---|
158 | .TP |
---|
159 | .B \-w |
---|
160 | Write out a |
---|
161 | .I statfile. |
---|
162 | This flag is always used by the |
---|
163 | .I librarian |
---|
164 | machine and never used by the |
---|
165 | .I subscriber |
---|
166 | machine(s). |
---|
167 | This option turns on -c. |
---|
168 | .PP |
---|
169 | The less commonly-used options: |
---|
170 | .TP |
---|
171 | .B \-d |
---|
172 | Include devices and special files in update. |
---|
173 | .TP |
---|
174 | .B \-m[recipient] |
---|
175 | ( Currently broken) Mail stdout and stderr to the recipient. |
---|
176 | The default recipient is root. |
---|
177 | .TP |
---|
178 | .B \-p |
---|
179 | Parse only and produce a verbose description of the fields in the |
---|
180 | .I subscriptionlist. |
---|
181 | This can be useful when |
---|
182 | .B track |
---|
183 | complains about syntax errors |
---|
184 | in the subscriptionlist. |
---|
185 | The output goes to stderr. |
---|
186 | .TP |
---|
187 | .B \-q |
---|
188 | Be quiet, i.e. don't complain about non-fatal errors. |
---|
189 | The most common non-fatal error occurs when the |
---|
190 | .I librarian's |
---|
191 | statfile is out-of-date, so that the subscriber tries to import files |
---|
192 | which no longer exist on the |
---|
193 | .I librarian. |
---|
194 | .TP |
---|
195 | .B \-x |
---|
196 | Display debugging information ( minimal). |
---|
197 | .TP |
---|
198 | .B \-S <max_path_depth> |
---|
199 | Specify deeper path stacks; this is an internal implementation parameter. |
---|
200 | .B Track |
---|
201 | is supposed to tell you when to use -S, and how to use it. |
---|
202 | Since the default depth accomodates pathnames with ~50 components, |
---|
203 | this option is seldom used. |
---|
204 | .SH EXAMPLES |
---|
205 | .in 8 |
---|
206 | .ti -8 |
---|
207 | track |
---|
208 | .ti -4 |
---|
209 | Update the local root's contents from the corresponding contents of |
---|
210 | /srvd, according to the constraints specified in the default subscriptionlist |
---|
211 | & statfile. This is what the Athena script update_ws does. |
---|
212 | .ti -8 |
---|
213 | track \-p daily |
---|
214 | .ti -4 |
---|
215 | Parse the |
---|
216 | .I subscriptionlist |
---|
217 | named "daily" and print a verbose |
---|
218 | listing of the contents. This command is very helpful when trying to debug |
---|
219 | freshly modified |
---|
220 | .I subscriptionlists. |
---|
221 | .ti -8 |
---|
222 | track \-w hourly |
---|
223 | .ti -4 |
---|
224 | Act as the |
---|
225 | .I librarian |
---|
226 | and output a |
---|
227 | .I statfile |
---|
228 | for the |
---|
229 | .I subscriptionlist |
---|
230 | named "hourly". |
---|
231 | .sp 1 |
---|
232 | .ti -8 |
---|
233 | track hourly \-w \-q |
---|
234 | .ti -4 |
---|
235 | Same as above, but non-fatal errors will be ignored. |
---|
236 | .sp 1 |
---|
237 | .ti -8 |
---|
238 | attach paris:root |
---|
239 | .br |
---|
240 | .ti -8 |
---|
241 | track daily -F/paris/root |
---|
242 | .ti -4 |
---|
243 | Act as a |
---|
244 | .I subscriber |
---|
245 | machine and get the updates from root directory on the machine named "paris". |
---|
246 | .sp 1 |
---|
247 | .ti -8 |
---|
248 | track \-n daily |
---|
249 | .ti -4 |
---|
250 | Act as a |
---|
251 | .I subscriber, |
---|
252 | but do not perform any updates. |
---|
253 | Instead, print a listing of the updates that should be made. This is analogous |
---|
254 | to "make \-n". Invoking |
---|
255 | .B track |
---|
256 | with the |
---|
257 | .B \-n |
---|
258 | flag is a safe way to preview what will happen before |
---|
259 | .B track |
---|
260 | is turned loose on a new machine. |
---|
261 | .sp 1 |
---|
262 | .ti -8 |
---|
263 | track -w sys_rvd -s - -F/source \\ |
---|
264 | .ti -8 |
---|
265 | .br |
---|
266 | | track sys_rvd -s - -F/source -T/target -c |
---|
267 | .ti -4 |
---|
268 | Backup to /target those of /source's contents that are specified in sys_rvd, |
---|
269 | but only if /target has a different version. |
---|
270 | It is best to run this on /target's machine, so that only reads are networked. |
---|
271 | .in -8 |
---|
272 | .SH FILES |
---|
273 | /source/4.3/etc.athena/track/* |
---|
274 | .br |
---|
275 | /srvd/etc/athena/lib/slists/sys_rvd |
---|
276 | .br |
---|
277 | /srvd/etc/athena/lib/stats/sys_rvd |
---|
278 | .br |
---|
279 | /usr/adm/TRACKLOG |
---|
280 | .br |
---|
281 | /tmp/sys_rvd.started |
---|
282 | .SH SEE ALSO |
---|
283 | subscriptionlist(5), statfile(5), permissions(5), cron(8) |
---|
284 | .PP |
---|
285 | When Network File Systems Aren't Enough: Automatic File Distribution Revisited |
---|
286 | .br |
---|
287 | .ti 5 |
---|
288 | by Daniel Nachbar |
---|
289 | .SH AUTHOR |
---|
290 | Daniel Nachbar (AT&T); |
---|
291 | rewritten for bug-fixing, speed, -c option, & extra link-support |
---|
292 | by Don Davis (Athena); NFS-conversion done by Rob French (Athena). |
---|
293 | .SH BUGS |
---|
294 | .br |
---|
295 | -m option doesn't work. |
---|
296 | .sp 1 |
---|
297 | If, under -n, the subscriptionlist-entry's topmost target directory |
---|
298 | doesn't exist, |
---|
299 | the simulated update raises many more errors than would the true update. |
---|
300 | .sp 1 |
---|
301 | Needs a -C (comparison mount-point) option. |
---|