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
82 .IR fs (4)).
83 If
84 .I vacfile
85 already exists, an additional backup day is added to the
86 existing hierarchy, behaving as though the
87 .B -d
88 flag was specified giving the most recent backup tree in the archive.
89 Typically, this option
90 is used as part of a nightly backup script.
91 This option cannot be used with
92 .B -d
93 or
94 .BR -f .
95 .TP
96 .BI -b " blocksize
97 Specifies the block size that data will be broken into.
98 The units for the size can be specified by appending
99 .L k
100 to indicate kilobytes.
101 The default is 8k.
102 The size must be in the range
103 of 512 bytes to 52k.
104 .TP
105 .BI -d " oldvacfile
106 Reduce the number of blocks written to Venti by comparing the files to be stored with
107 the contents of an existing
108 .I vac
109 file tree whose score is stored in
110 .IR oldvacfile .
111 .TP
112 .BI -e " exclude
113 Do not include the file or directory specified by
114 .IR exclude .
115 This option may be repeated multiple times.
116 .I Exclude
117 can be a shell pattern as accepted by
118 .MR rc (1) ,
119 with one extension:
120 .B \&...
121 matches any sequence of characters including slashes.
122 .TP
123 .BI -f " vacfile
124 The results of
125 .I vac
126 are placed in
127 .IR vacfile ,
128 or the standard output if no file is given.
129 .TP
130 .BI -i " name
131 Include standard input as one of the input files, storing it in the archive
132 with the specified
133 .IR name .
134 .TP
135 .BI -h " host
136 The network address of the Venti server.
137 The default is taken from the environment variable
138 .BR venti .
139 .\" If this variable does not exist, then the default is the
140 .\" metaname
141 .\" .BR $venti ,
142 .\" which can be configured via
143 .\" .IR ndb (6).
144 .TP
145 .B -m
146 Expand and merge any
147 .I vac
148 archives that are found while reading the input files. This option is
149 useful for building an archive from a collection of existing archives. Each archive is inserted
150 into the new archive as if it had been unpacked in the directory in which it was found. Multiple
151 archives can be unpacked in a single directory and the contents will be merged. To be detected, the
152 archives must end in
153 .LR .vac .
154 Note, an archive is inserted by simply copying the root fingerprint and does not require
155 the archive to be unpacked.
156 .TP
157 .B -q
158 Increase the performance of the
159 .B -a
160 or
161 .B -d
162 options by detecting unchanged files based on a match of the files name and other meta data,
163 rather than examining the contents of the files.
164 .TP
165 .B -s
166 Print out various statistics on standard error.
167 .TP
168 .B -v
169 Produce more verbose output on standard error, including the name of the files added to the archive
170 and the vac archives that are expanded and merged.
171 .TP
172 .BI -x " excfile
173 Read exclude patterns from the file
174 .IR excfile .
175 Blank lines and lines beginning with
176 .B #
177 are ignored.
178 All other lines should be of the form
179 .B include
180 .I pattern
181 or
182 .B exclude
183 .I pattern .
184 When considering whether to include a directory or file
185 in the vac archive,
186 the earliest matching pattern in the file
187 applies.
188 The patterns are the same syntax accepted by the
189 .B -e
190 option.
191 This option may be repeated multiple times.
192 .PP
193 .I Unvac
194 lists or extracts files stored in the vac archive
195 .IR vacfile ,
196 which can be either a vac archive string in the format
197 given above or the name of a file containing one.
198 If
199 .I file
200 arguments are given, only those files or directories
201 will be extracted.
202 The options are:
203 .TP
204 .B -T
205 Set the modification time on extracted files
206 to the time listed in the archive.
207 .TP
208 .B -c
209 Write extracted files to standard output instead of creating a file.
210 .TP
211 .B -d
212 Reduce the number of blocks read from Venti by
213 comparing the files to be stored with their counterparts
214 in the file system.
215 This option cannot be used with
216 .BR -c .
217 .TP
218 .B -t
219 Print a list of the files to standard output rather than extracting them.
220 .TP
221 .B -v
222 If extracting files, print the name of each file and directory
223 to standard error.
224 If listing files, print metadata in addition to the names.
225 .SH SOURCE
226 .B \*9/src/cmd/vac
227 .SH "SEE ALSO"
228 .MR vacfs (4) ,
229 .MR venti (8)