Blob


1 .TH VBACKUP 8
2 .SH NAME
3 vbackup, vcat, vftp, vmount, vnfs \-
4 back up Unix file systems to Venti
5 .SH SYNOPSIS
6 .B vbackup
7 [
8 .B -DVnv
9 ]
10 [
11 .B -s
12 .I secs
13 ]
14 [
15 .B -w
16 .I n
17 ]
18 .I disk
19 [
20 .I score
21 ]
22 .PP
23 .B vcat
24 [
25 .B -z
26 ]
27 .I disk
28 |
29 .I score
30 .B >
31 .I disk
32 .PP
33 .B vftp
34 .I score
35 |
36 .I disk
37 .PP
38 .B vmount
39 [
40 .B -v
41 ]
42 .I addr
43 .I mtpt
44 .PP
45 .B vnfs
46 [
47 .B -ELLRVr
48 ]
49 [
50 .B -a
51 .I addr
52 ]
53 [
54 .B -b
55 .I blocksize
56 ]
57 [
58 .B -c
59 .I cachesize
60 ]
61 .I config
62 .SH DESCRIPTION
63 These programs back up and restore standard
64 Unix file system images stored in
65 .IR venti (8).
66 Images stored in
67 .I venti
68 are named by
69 .IR scores ,
70 which consist of a file system type followed
71 by a colon and forty hexadecimal digits, as in:
72 .IP
73 .EX
74 ffs:0123456789abcdef0123456789abcdef01234567
75 .EE
76 .PP
77 (The hexadecimal data is the SHA1 hash of the Venti
78 root block representing the file system image.)
79 .PP
80 These programs expect the environment variable
81 .B $venti
82 to be set to the network address of the Venti server to use
83 (for example,
84 .B yourhost
85 or
86 .BR tcp!yourhost!venti ).
87 .PP
88 .I Vbackup
89 copies the file system stored on
90 .I disk
91 to the Venti server and prints the
92 score for the newly-stored image.
93 The argument
94 .I disk
95 should be a disk or disk partition device
96 that would be appropriate to pass to
97 .IR mount (8).
98 .PP
99 The optional argument
100 .I score
101 is the score of a previous backup of the disk image.
102 If
103 .I score
104 is given,
105 .I vbackup
106 will not write to Venti any blocks that have not changed
107 since the previous backup.
108 This is only a speed optimization: since the blocks are already
109 stored on Venti they need not be sent to the Venti server again.
110 .PP
111 The options to
112 .I vbackup
113 are:
114 .TP
115 .B -D
116 Turn on debugging output.
117 .TP
118 .B -V
119 Trace interactions with Venti server.
120 .TP
121 .B -m \fImntname
122 Set backup name:
123 this name is used in the printed
124 .B mount
125 command.
126 The default is the name returned by
127 .I sysname
128 (see
129 .IR getuser (3)).
130 .TP
131 .B -n
132 No-op mode: do not write any blocks to the server
133 .TP
134 .B -v
135 Print verbose output.
136 .TP
137 .B -w \fIn
138 Write parallelism: keep
139 .I n
140 writes to the server in progress at a time.
141 .TP
142 .B -s \fIsecs
143 Status interval: every
144 .I secs
145 seconds, print a line tracking progress of the backup.
146 .PD
147 .PP
148 When
149 .I vbackup
150 finishes, it prints a single line of the form
151 .IP
152 .EX
153 mount /\fImntname\fL/\fIyyyy\fL/\fImmdd\fL/\fImntpath\fL \fIscore\fL \fIyyyy\fL/\fImmdd\fL/\fIhhmm
154 .EE
155 .LP
156 This line is a valid configuration line for
157 .I vnfs
158 .RI ( q.v. ).
159 .I Mntpath
160 is the path on which
161 .I disk
162 is currently mounted.
163 .PP
164 .I Vcat
165 writes the named disk image to standard output.
166 Unused file system blocks are printed zeroed regardless
167 of their actual content.
168 .PP
169 By default,
170 .I vcat
171 will assume that its standard output is seekable
172 .RI ( i.e.,
173 it has been redirected to a file or disk)
174 and seek over unused blocks instead of writing to them.
175 The
176 .B -z
177 option causes
178 .I vcat
179 to zero unused blocks instead.
180 .PP
181 .I Vftp
182 presents an
183 .IR ftp (1)-like
184 interface to a physical or backed-up disk image.
185 It is used mainly for debugging.
186 Type
187 .B help
188 at the
189 .B vftp>
190 prompt for a list of commands.
191 .PP
192 .I Vmount
193 mounts the NFS service at the network connection
194 .I address
195 onto
196 .IR mountpoint .
197 On most operating systems,
198 .I vmount
199 must be run by the user
200 .BR root .
201 .PP
202 .I Vnfs
203 serves, using the
204 NFS version 3 protocol,
205 one or more disk images in a synthetic tree defined
206 by the configuration file
207 .IR config .
208 .I Vnfs
209 serves both NFS mount protocol
210 and NFS protocol
211 RPCs at
212 .IR addr
213 (default
214 .BR udp!*!nfs ).
215 The options are:
216 .TP
217 .B -E
218 Disable `encrypted' handles.
219 By default handles are encrypted with a random key to avoid
220 leaking information about the backed-up file systems.
221 If encryption is disabled, the NFS handles exposed to the client
222 may leak information about the root scores of the disks as well
223 as inode numbers.
224 .TP
225 .B -L
226 Local service only: serve only requests from the loopback interface (127.0.0.1).
227 .TP
228 .B -LL
229 Local service only, with paranoia: serve only requests from loopback,
230 and only from the first source port that sends a request.
231 This option is intended to be used to make sure that once the local
232 host has mounted the service, no other local users can access it.
233 .TP
234 .B -R
235 Print all NFS and NFS mount RPCs to standard error.
236 .TP
237 .B -V
238 Print all Venti transactions to standard error.
239 .TP
240 .BI -a " addr
241 Serve requests on
242 .IR addr
243 (see above).
244 .TP
245 .BI -b " blocksize
246 Set block size used by the in-memory venti block cache.
247 Must be as large as the maximum block size in any
248 file system mentioned in the configuration.
249 .TP
250 .BI -c " cachesize
251 Set the number of blocks stored by the in-memory venti cache.
252 .TP
253 .B -r
254 Respond to all requests with a Sun RPC rejection.
255 This is useful during debugging.
256 .PD
257 .PP
258 .I Config
259 is a text file describing the
260 backup hierarchy for
261 .I vnfs
262 to serve.
263 Lines beginning with a sharp
264 .RB ( # )
265 are ignored.
266 The rest of the file is a sequence of commands, one per line.
267 The commands are:
268 .TP
269 .BI mount " mtpt score time
270 Add the file system with the given
271 .I score
272 to the tree at the mount point
273 .IR mtpt .
274 The path to the mount point will be created
275 if necessary.
276 If
277 .B /dev/null
278 is given as the score, an empty file system is mounted at
279 .IR mtpt ,
280 excluding
281 .IR mtpt 's
282 contents from view.
283 .I Time
284 is the modification time to return for the directory
285 .IR mtpt ,
286 either a decimal number of seconds since the epoch
287 or a string of the form
288 .IB yyyy / mmdd / hhmm
289 giving the year, month, day, hour, and minute.
290 .RI ( Vnfs
291 does not use the modification time of the root in order
292 to avoid accessing every mounted file system on common
293 actions like
294 .B ls
295 .B -l
296 .BR /dump/sys/2005 .)
297 .TP
298 .BI allow " ip\fR[\fL/\fImask\fR]
299 .TP
300 .BI deny " ip\fR[\fL/\fImask\fR]
301 These two commands define access permissions based on IP address.
302 The optional
303 .I mask
304 can be a decimal number (24) or an equivalent IP mask (255.255.255.0).
305 Each request is filtered through the rules listed in the configuration file.
306 The first rule that matches is used.
307 If any
308 .B allow
309 or
310 .B deny
311 rules are given, the default action is to reject the request.
312 In the absence of any rules, the default action is to accept all requests.
313 .PD
314 .SH EXAMPLES
315 .PP
316 Running on the server
317 .IR bob ,
318 back up the file system stored on
319 .BR /dev/da0s1a ,
320 which is mounted on
321 .BR /home :
322 .IP
323 .EX
324 % vbackup /dev/da0s1a
325 mount /bob/2005/0510/home ffs:0123456789abcdef\fI...\fP 2005/0510/0831
327 .EE
328 .PP
329 Serve that backup and a few others in a tree reminiscent
330 of Plan 9's dump file system, but hide each day's contents of
331 .B /tmp :
332 .IP
333 .EX
334 % cat config
335 mount /bob/2005/0510 ffs:0123456789abcdef\fI...\fP 2005/0510/0829
336 mount /bob/2005/0510/home ffs:0123456789abcdef\fI...\fP 2005/0510/0831
337 mount /bob/2005/0510/tmp /dev/null 1
338 mount /bob/2005/0511 ffs:0123456789abcdef\fI...\fP 2005/0511/0827
339 mount /bob/2005/0511/home ffs:0123456789abcdef\fI...\fP 2005/0511/0828
340 mount /bob/2005/0511/tmp /dev/null 1
341 % vnfs -b 16k -c 1k config
343 .EE
344 .PP
345 Mount the backups on a client machine using
346 .IR vmount :
347 .IP
348 .EX
349 # vmount udp!yourserver!nfs /dump
350 # ls /dump/bob/2005
351 0510
352 0511
354 .EE
355 .PP
356 (Users of fancy shells may need to quote the address argument.)