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