aboutsummaryrefslogtreecommitdiff
path: root/man/man1/vbackup.1
blob: 72d93e73a9b8928f2e76b991006d4d9270dfb3fb (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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
.TH VBACKUP 8
.SH NAME
vbackup, vcat, vftp, vmount, vmount0, vnfs \- 
back up Unix file systems to Venti
.SH SYNOPSIS
.B vbackup
[
.B -DVnv
]
[
.B -s
.I secs
]
[
.B -w
.I n
]
.I disk
[
.I score
]
.PP
.B vcat
[
.B -z
]
.I disk
|
.I score
.B >
.I disk
.PP
.B vftp
.I disk
|
.I score
.PP
.B vmount
[
.B -v
]
.I addr
.I mtpt
.PP
.B vmount0
[
.B -v
]
[
.B -h
.I handle
]
.I addr
.I mtpt
.PP
.B vnfs
[
.B -LLMRVr
]
[
.B -a
.I addr
]
[
.B -m
.I mntaddr
]
[
.B -b
.I blocksize
]
[
.B -c
.I cachesize
]
.I config
.SH DESCRIPTION
These programs back up and restore standard
Unix file system images stored in
.IR venti (8).
Images stored in
.I venti
are named by
.IR scores ,
which consist of a file system type followed
by a colon and forty hexadecimal digits, as in:
.IP
.EX
ffs:0123456789abcdef0123456789abcdef01234567
.EE
.PP
(The hexadecimal data is the SHA1 hash of the Venti
root block representing the file system image.)
.PP
These programs expect the environment variable
.B $venti
to be set to the network address of the Venti server to use
(for example,
.B yourhost
or
.BR tcp!yourhost!venti ).
.PP
.I Vbackup
copies the file system stored on
.I disk
to the Venti server and prints the 
score for the newly-stored image.
The argument
.I disk
should be a disk or disk partition device
that would be appropriate to pass to
.IR mount (8).
.PP
The optional argument
.I score
is the score of a previous backup of the disk image.
If
.I score
is given, 
.I vbackup
will not write to Venti any blocks that have not changed
since the previous backup.
This is only a speed optimization: since the blocks are already
stored on Venti they need not be sent to the Venti server again.
.PP
The options to
.I vbackup
are:
.TP
.B -D
.TP
.B -V
.TP
.B -n
.TP
.B -v
.TP
.B -w \fIn
.TP
.B -s \fIsecs
.PP
.I Vcat
writes the named disk image to standard output.
Unused file system blocks are printed zeroed regardless
of their actual content.
.PP
If the
.B -z
flag is given, 
.I vcat
will attempt to seek over unused blocks instead of writing to them.
The
.B -z
flag should only be used when standard output is seekable
.RI ( i.e. ,
when it has been redirected to a file or disk).
.PP
.I Vftp
presents the
file system image named by
.I disk
or
.I score
in a shell-like
interactive session.
Type
.B help
at the
.B vftp>
prompt for details.
.PP
.I Vmount
mounts the NFS service at the network connection
.I address
onto
.IR mountpoint .
On most operating systems,
.I vmount
must be run by the user
.BR root .
.PP
.I Vmount0
is a simple C program that 
.I vmount
uses if 
.IR mount (8)
does not suffice.
.PP
.I Vnfs
serves, using the
NFS version 3 protocol,
one or more disk images in a synthetic tree defined
by the configuration file
.IR config .
.I Vnfs
announces NFS service at
.IR addr 
(default
.BR udp!*!nfs )
and NFS mount service at
.IR mntaddr
(default
.BR udp!*!\fI999 ),
registering both with the port mapper.
If no port mapper is found running (on port 111),
.I vnfs
starts its own port mapper.
The options are:
.TP
.B -r
Reply to all NFS requests with RPC rejections.
.TP
.B -M
Do not announce an NFS mount service.
.TP
.B -P
Do not register service with the port mapper.
.TP
.B -a


.SH EXAMPLES
.PP
Back up the file system stored on
.BR /dev/da0s1a :
.IP
.EX
% vbackup /dev/da0s1a
ffs:0123456789abcdef0123456789abcdef01234567
% 
.EE
.PP
Serve that backup and a few others in a tree reminiscent
of Plan 9's dump file system, but hide each day's contents of
.B /tmp :
.IP
.EX
% cat config
mount /2005/0510 ffs:0123456789abcdef\fI...\fP
mount /2005/0510/home ffs:0123456789abcdef\fI...\fP
mount /2005/0510 ffs:0123456789abcdef\fI...\fP
mount /2005/0510/home ffs:0123456789abcdef\fI...\fP
hide /*/*/tmp
% vnfs -m -b 16k -c 1k config
% 
.EE
.PP
Mount the backups on a client machine using
.IR vmount :
.IP
.EX
# vmount udp!yourserver!nfs /dump
# ls /dump
2005
# 
.EE
.PP
Mount the backups using the standard NFS mount program:
.IP
.EX
# mount -t nfs -o soft,intr,ro,nfsv3,rsize=8192,timeo=100 \
	-o nfsvers=3,nolock,noatime,nodev,nosuid \
.EE