Blob


1 .TH VAC 1
2 .SH NAME
3 vac, unvac \- create, extract a vac archive on Venti
4 .SH SYNOPSIS
5 .B vac
6 [
7 .B -mqsv
8 ] [
9 .B -a
10 .I vacfile
11 ] [
12 .B -b
13 .I blocksize
14 ] [
15 .B -d
16 .I oldvacfile
17 ] [
18 .B -e
19 .I exclude
20 ] [
21 .B -f
22 .I vacfile
23 ] [
24 .B -i
25 .I name
26 ] [
27 .B -h
28 .I host
29 ] [
30 .B -x
31 .I excludefile
32 ]
33 .I file ...
34 .PP
35 .B unvac
36 [
37 .B -Tcdtv
38 ] [
39 .B -h
40 .I host
41 ]
42 .I vacfile
43 [
44 .I file ...
45 ]
46 .SH DESCRIPTION
47 .I Vac
48 creates an archival copy of Plan 9 file trees on Venti. It can be used
49 to build a simple backup system. One of the unusual properties of Venti is
50 that duplicate blocks are detected and coalesced. When
51 .I vac
52 is used on a file tree that shares data with an existing archive, the consumption of
53 storage will be approximately equal to an incremental backup.
54 This reduction in storage consumption occurs transparently to the user.
55 .PP
56 As an optimization, the
57 .B -d
58 and
59 .B -q
60 options, described below, can be used to explicitly create an archive relative to an existing archive.
61 These options do not change the resulting archive generated by
62 .IR vac ,
63 but simply reduce the number of write operations to Venti.
64 .PP
65 The output of
66 .I vac
67 is the hexadecimal representation of the SHA1 fingerprint of the root of the archive, in this format:
68 .IP
69 .EX
70 vac:64daefaecc4df4b5cb48a368b361ef56012a4f46
71 .EE
72 .PP
73 The options are:
74 .TP
75 .BI -a " vacfile
76 Specifies that vac should create or update a backup archive, inserting
77 the files under an extra two levels of directory hierarchy named
78 .I yyyy/mmdd
79 (year, month, day)
80 in the style of the dump file system
81 (see Plan 9's \fIfs\fR(4)).
82 If
83 .I vacfile
84 already exists, an additional backup day is added to the
85 existing hierarchy, behaving as though the
86 .B -d
87 flag was specified giving the most recent backup tree in the archive.
88 Typically, this option
89 is used as part of a nightly backup script.
90 This option cannot be used with
91 .B -d
92 or
93 .BR -f .
94 .TP
95 .BI -b " blocksize
96 Specifies the block size that data will be broken into.
97 The units for the size can be specified by appending
98 .L k
99 to indicate kilobytes.
100 The default is 8k.
101 The size must be in the range
102 of 512 bytes to 52k.
103 .TP
104 .BI -d " oldvacfile
105 Reduce the number of blocks written to Venti by comparing the files to be stored with
106 the contents of an existing
107 .I vac
108 file tree whose score is stored in
109 .IR oldvacfile .
110 .TP
111 .BI -e " exclude
112 Do not include the file or directory specified by
113 .IR exclude .
114 This option may be repeated multiple times.
115 .I Exclude
116 can be a shell pattern as accepted by
117 .IR rc (1),
118 with one extension:
119 .B \&...
120 matches any sequence of characters including slashes.
121 .TP
122 .BI -f " vacfile
123 The results of
124 .I vac
125 are placed in
126 .IR vacfile ,
127 or the standard output if no file is given.
128 .TP
129 .BI -i " name
130 Include standard input as one of the input files, storing it in the archive
131 with the specified
132 .IR name .
133 .TP
134 .BI -h " host
135 The network address of the Venti server.
136 The default is taken from the environment variable
137 .BR venti .
138 .\" If this variable does not exist, then the default is the
139 .\" metaname
140 .\" .BR $venti ,
141 .\" which can be configured via
142 .\" .IR ndb (6).
143 .TP
144 .B -m
145 Expand and merge any
146 .I vac
147 archives that are found while reading the input files. This option is
148 useful for building an archive from a collection of existing archives. Each archive is inserted
149 into the new archive as if it had been unpacked in the directory in which it was found. Multiple
150 archives can be unpacked in a single directory and the contents will be merged. To be detected, the
151 archives must end in
152 .LR .vac .
153 Note, an archive is inserted by simply copying the root fingerprint and does not require
154 the archive to be unpacked.
155 .TP
156 .B -q
157 Increase the performance of the
158 .B -a
159 or
160 .B -d
161 options by detecting unchanged files based on a match of the files name and other meta data,
162 rather than examining the contents of the files.
163 .TP
164 .B -s
165 Print out various statistics on standard error.
166 .TP
167 .B -v
168 Produce more verbose output on standard error, including the name of the files added to the archive
169 and the vac archives that are expanded and merged.
170 .TP
171 .BI -x " excfile
172 Read exclude patterns from the file
173 .IR excfile .
174 Blank lines and lines beginning with
175 .B #
176 are ignored.
177 All other lines should be of the form
178 .B include
179 .I pattern
180 or
181 .B exclude
182 .I pattern .
183 When considering whether to include a directory or file
184 in the vac archive,
185 the earliest matching pattern in the file
186 applies.
187 The patterns are the same syntax accepted by the
188 .B -e
189 option.
190 This option may be repeated multiple times.
191 .PP
192 .I Unvac
193 lists or extracts files stored in the vac archive
194 .IR vacfile ,
195 which can be either a vac archive string in the format
196 given above or the name of a file containing one.
197 If
198 .I file
199 arguments are given, only those files or directories
200 will be extracted.
201 The options are:
202 .TP
203 .B -T
204 Set the modification time on extracted files
205 to the time listed in the archive.
206 .TP
207 .B -c
208 Write extracted files to standard output instead of creating a file.
209 .TP
210 .B -d
211 Reduce the number of blocks read from Venti by
212 comparing the files to be stored with their counterparts
213 in the file system.
214 This option cannot be used with
215 .BR -c .
216 .TP
217 .B -t
218 Print a list of the files to standard output rather than extracting them.
219 .TP
220 .B -v
221 If extracting files, print the name of each file and directory
222 to standard error.
223 If listing files, print metadata in addition to the names.
224 .SH SOURCE
225 .B \*9/src/cmd/vac
226 .SH "SEE ALSO"
227 .IR vacfs (4),
228 .IR venti (8)