shithub: riscv

Download patch

ref: 8e20bc7515448f92e24128d18426d6370be6b2f6
parent: 2c9e3861a54e22498fb2e3226defe4393b20b202
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Nov 20 19:39:07 EST 2019

vac(1): assimilate manpage additions from plan9port and complete usage lines (thanks joe9)

the usage lines in vac where out of sync with the implementation
and the manpages.

document the -a and -x options, from:

https://github.com/9fans/plan9port/blob/master/man/man1/vac.1

--- a/sys/man/1/vac
+++ b/sys/man/1/vac
@@ -6,6 +6,9 @@
 [
 .B -mqsv
 ] [
+.B -a
+.I vacfile
+] [
 .B -b
 .I blocksize
 ] [
@@ -23,12 +26,15 @@
 ] [
 .B -h
 .I host
+] [
+.B -x
+.I excludefile
 ]
 .I file ...
 .PP
 .B unvac
 [
-.B -Tctv
+.B -Tcdtv
 ] [
 .B -h
 .I host
@@ -70,6 +76,26 @@
 .TF "-d\fI oldvacfile"
 .PD
 .TP
+.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
+(see Plan 9's \fIfs\fR(4)).
+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
 .BI -b " blocksize
 Specifies the block size that data will be broken into.
 The units for the size can be specified by appending
@@ -90,6 +116,12 @@
 Do not include the file or directory specified by
 .IR exclude .
 This option may be repeated multiple times.
+.I Exclude
+can be a shell pattern as accepted by
+.IR rc (1),
+with one extension: 
+.B \&...
+matches any sequence of characters including slashes.
 .TP
 .BI -f " vacfile
 The results of 
@@ -137,6 +169,27 @@
 .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.
+.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
+.I pattern .
+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.
 .PP
 .I Unvac
 lists or extracts files stored in the vac archive
@@ -156,9 +209,12 @@
 .B -c
 Write extracted files to standard output instead of creating a file.
 .TP
-.B -h
-as per
-.IR vac .
+.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 .
 .TP
 .B -t
 Print a list of the files to standard output rather than extracting them.
@@ -167,6 +223,10 @@
 If extracting files, print the name of each file and directory
 to standard error.
 If listing files, print metadata in addition to the names.
+.TP
+.B -h
+as per
+.IR vac .
 .SH SOURCE
 .B /sys/src/cmd/vac
 .SH "SEE ALSO"
--- a/sys/src/cmd/vac/vac.c
+++ b/sys/src/cmd/vac/vac.c
@@ -8,7 +8,7 @@
 void
 usage(void)
 {
-	fprint(2, "vac [-imqsv] [-a archive.vac] [-b bsize] [-d old.vac] [-f new.vac] [-e exclude]... [-h host] file...\n");
+	fprint(2, "vac [-imqsv] [-a archive.vac] [-b bsize] [-d old.vac] [-e exclude] [-f new.vac] [-i name] [-h host] [-x excludefile] file...\n");
 	threadexitsall("usage");
 }