2011-03-30 13:49:47 +00:00
|
|
|
.TH VAC 1
|
|
|
|
.SH NAME
|
|
|
|
vac, unvac \- create, extract a vac archive on Venti
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B vac
|
|
|
|
[
|
2021-05-30 12:30:50 +00:00
|
|
|
.B -mqstv
|
2011-03-30 13:49:47 +00:00
|
|
|
] [
|
2019-11-20 23:39:07 +00:00
|
|
|
.B -a
|
|
|
|
.I vacfile
|
|
|
|
] [
|
2011-03-30 13:49:47 +00:00
|
|
|
.B -b
|
|
|
|
.I blocksize
|
|
|
|
] [
|
|
|
|
.B -d
|
|
|
|
.I oldvacfile
|
|
|
|
] [
|
|
|
|
.B -e
|
|
|
|
.I exclude
|
|
|
|
] [
|
|
|
|
.B -f
|
|
|
|
.I vacfile
|
|
|
|
] [
|
|
|
|
.B -i
|
|
|
|
.I name
|
|
|
|
] [
|
|
|
|
.B -h
|
|
|
|
.I host
|
2019-11-20 23:39:07 +00:00
|
|
|
] [
|
|
|
|
.B -x
|
|
|
|
.I excludefile
|
2011-03-30 13:49:47 +00:00
|
|
|
]
|
|
|
|
.I file ...
|
|
|
|
.PP
|
|
|
|
.B unvac
|
|
|
|
[
|
2019-11-20 23:39:07 +00:00
|
|
|
.B -Tcdtv
|
2011-03-30 13:49:47 +00:00
|
|
|
] [
|
|
|
|
.B -h
|
|
|
|
.I host
|
|
|
|
]
|
|
|
|
.I vacfile
|
|
|
|
[
|
|
|
|
.I file ...
|
|
|
|
]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I Vac
|
|
|
|
creates an archival copy of Plan 9 file trees on Venti. It can be used
|
|
|
|
to build a simple backup system. One of the unusual properties of Venti is
|
|
|
|
that duplicate blocks are detected and coalesced. When
|
|
|
|
.I vac
|
|
|
|
is used on a file tree that shares data with an existing archive, the consumption of
|
|
|
|
storage will be approximately equal to an incremental backup.
|
|
|
|
This reduction in storage consumption occurs transparently to the user.
|
|
|
|
.PP
|
|
|
|
As an optimization, the
|
|
|
|
.B -d
|
|
|
|
and
|
|
|
|
.B -q
|
|
|
|
options, described below, can be used to explicitly create an archive relative to an existing archive.
|
|
|
|
These options do not change the resulting archive generated by
|
|
|
|
.IR vac ,
|
|
|
|
but simply reduce the number of write operations to Venti.
|
|
|
|
.PP
|
|
|
|
The output of
|
|
|
|
.I vac
|
|
|
|
is the hexadecimal representation of the SHA1 fingerprint of the root of the archive, in this format:
|
|
|
|
.IP
|
|
|
|
.EX
|
|
|
|
vac:64daefaecc4df4b5cb48a368b361ef56012a4f46
|
|
|
|
.EE
|
|
|
|
.PP
|
|
|
|
The options to
|
|
|
|
.I vac
|
|
|
|
are:
|
|
|
|
.TF "-d\fI oldvacfile"
|
|
|
|
.PD
|
|
|
|
.TP
|
2019-11-20 23:39:07 +00:00
|
|
|
.BI -a " vacfile
|
|
|
|
Specifies that vac should create or update a backup archive, inserting
|
|
|
|
the files under an extra two levels of directory hierarchy named
|
|
|
|
.I yyyy/mmdd
|
|
|
|
(year, month, day)
|
|
|
|
in the style of the dump file system
|
2021-08-24 21:45:37 +00:00
|
|
|
(see \fIfs\fR(4)).
|
2019-11-20 23:39:07 +00:00
|
|
|
If
|
|
|
|
.I vacfile
|
|
|
|
already exists, an additional backup day is added to the
|
|
|
|
existing hierarchy, behaving as though the
|
|
|
|
.B -d
|
|
|
|
flag was specified giving the most recent backup tree in the archive.
|
|
|
|
Typically, this option
|
|
|
|
is used as part of a nightly backup script.
|
|
|
|
This option cannot be used with
|
|
|
|
.B -d
|
|
|
|
or
|
|
|
|
.BR -f .
|
|
|
|
.TP
|
2011-03-30 13:49:47 +00:00
|
|
|
.BI -b " blocksize
|
|
|
|
Specifies the block size that data will be broken into.
|
|
|
|
The units for the size can be specified by appending
|
|
|
|
.L k
|
|
|
|
to indicate kilobytes.
|
|
|
|
The default is 8k.
|
|
|
|
The size must be in the range
|
|
|
|
of 512 bytes to 52k.
|
|
|
|
.TP
|
|
|
|
.BI -d " oldvacfile
|
|
|
|
Reduce the number of blocks written to Venti by comparing the files to be stored with
|
|
|
|
the contents of an existing
|
|
|
|
.I vac
|
|
|
|
file tree whose score is stored in
|
|
|
|
.IR oldvacfile .
|
|
|
|
.TP
|
|
|
|
.BI -e " exclude
|
|
|
|
Do not include the file or directory specified by
|
|
|
|
.IR exclude .
|
|
|
|
This option may be repeated multiple times.
|
2019-11-20 23:39:07 +00:00
|
|
|
.I Exclude
|
|
|
|
can be a shell pattern as accepted by
|
|
|
|
.IR rc (1),
|
|
|
|
with one extension:
|
|
|
|
.B \&...
|
|
|
|
matches any sequence of characters including slashes.
|
2011-03-30 13:49:47 +00:00
|
|
|
.TP
|
|
|
|
.BI -f " vacfile
|
|
|
|
The results of
|
|
|
|
.I vac
|
|
|
|
are placed in
|
|
|
|
.IR vacfile ,
|
|
|
|
or the standard output if no file is given.
|
|
|
|
.TP
|
|
|
|
.BI -i " name
|
|
|
|
Include standard input as one of the input files, storing it in the archive
|
|
|
|
with the specified
|
|
|
|
.IR name .
|
|
|
|
.TP
|
|
|
|
.BI -h " host
|
|
|
|
The network address of the Venti server.
|
|
|
|
The default is taken from the environment variable
|
|
|
|
.BR venti .
|
|
|
|
If this variable does not exist, then the default is the
|
|
|
|
metaname
|
|
|
|
.BR $venti ,
|
|
|
|
which can be configured via
|
|
|
|
.IR ndb (6).
|
|
|
|
.TP
|
|
|
|
.B -m
|
|
|
|
Expand and merge any
|
|
|
|
.I vac
|
|
|
|
archives that are found while reading the input files. This option is
|
|
|
|
useful for building an archive from a collection of existing archives. Each archive is inserted
|
|
|
|
into the new archive as if it had been unpacked in the directory in which it was found. Multiple
|
|
|
|
archives can be unpacked in a single directory and the contents will be merged. To be detected, the
|
|
|
|
archives must end in
|
|
|
|
.LR .vac .
|
|
|
|
Note, an archive is inserted by simply copying the root fingerprint and does not require
|
|
|
|
the archive to be unpacked.
|
|
|
|
.TP
|
|
|
|
.B -q
|
|
|
|
Increase the performance of the
|
|
|
|
.B -d
|
|
|
|
option by detecting unchanged files based on a match of the files name and other meta data,
|
|
|
|
rather than examining the contents of the files.
|
|
|
|
.TP
|
|
|
|
.B -s
|
|
|
|
Print out various statistics on standard error.
|
|
|
|
.TP
|
2021-05-30 12:30:50 +00:00
|
|
|
.B -t
|
|
|
|
Exclude files and directories with the temporary flag set.
|
|
|
|
.TP
|
2011-03-30 13:49:47 +00:00
|
|
|
.B -v
|
|
|
|
Produce more verbose output on standard error, including the name of the files added to the archive
|
|
|
|
and the vac archives that are expanded and merged.
|
2019-11-20 23:39:07 +00:00
|
|
|
.TP
|
|
|
|
.BI -x " excfile
|
|
|
|
Read exclude patterns from the file
|
|
|
|
.IR excfile .
|
|
|
|
Blank lines and lines beginning with
|
|
|
|
.B #
|
|
|
|
are ignored.
|
|
|
|
All other lines should be of the form
|
|
|
|
.B include
|
|
|
|
.I pattern
|
|
|
|
or
|
|
|
|
.B exclude
|
2021-08-24 21:45:37 +00:00
|
|
|
.IR pattern .
|
2019-11-20 23:39:07 +00:00
|
|
|
When considering whether to include a directory or file
|
|
|
|
in the vac archive,
|
|
|
|
the earliest matching pattern in the file
|
|
|
|
applies.
|
|
|
|
The patterns are the same syntax accepted by the
|
|
|
|
.B -e
|
|
|
|
option.
|
|
|
|
This option may be repeated multiple times.
|
2011-03-30 13:49:47 +00:00
|
|
|
.PP
|
|
|
|
.I Unvac
|
|
|
|
lists or extracts files stored in the vac archive
|
|
|
|
.IR vacfile ,
|
|
|
|
which can be either a vac archive string in the format
|
|
|
|
given above or the name of a file containing one.
|
|
|
|
If
|
|
|
|
.I file
|
|
|
|
arguments are given, only those files or directories
|
|
|
|
will be extracted.
|
|
|
|
The options are:
|
|
|
|
.TP
|
|
|
|
.B -T
|
|
|
|
Set the modification time on extracted files
|
|
|
|
to the time listed in the archive.
|
|
|
|
.TP
|
|
|
|
.B -c
|
|
|
|
Write extracted files to standard output instead of creating a file.
|
|
|
|
.TP
|
2019-11-20 23:39:07 +00:00
|
|
|
.B -d
|
|
|
|
Reduce the number of blocks read from Venti by
|
|
|
|
comparing the files to be stored with their counterparts
|
|
|
|
in the file system.
|
|
|
|
This option cannot be used with
|
|
|
|
.BR -c .
|
2011-03-30 13:49:47 +00:00
|
|
|
.TP
|
|
|
|
.B -t
|
|
|
|
Print a list of the files to standard output rather than extracting them.
|
|
|
|
.TP
|
|
|
|
.B -v
|
|
|
|
If extracting files, print the name of each file and directory
|
|
|
|
to standard error.
|
|
|
|
If listing files, print metadata in addition to the names.
|
2019-11-20 23:39:07 +00:00
|
|
|
.TP
|
|
|
|
.B -h
|
|
|
|
as per
|
|
|
|
.IR vac .
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/vac
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR vacfs (4),
|
|
|
|
.IR venti (8)
|