vac 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 -b
  10. .I blocksize
  11. ] [
  12. .B -d
  13. .I oldvacfile
  14. ] [
  15. .B -e
  16. .I exclude
  17. ] [
  18. .B -f
  19. .I vacfile
  20. ] [
  21. .B -i
  22. .I name
  23. ] [
  24. .B -h
  25. .I host
  26. ]
  27. .I file ...
  28. .PP
  29. .B unvac
  30. [
  31. .B -Tctv
  32. ] [
  33. .B -h
  34. .I host
  35. ]
  36. .I vacfile
  37. [
  38. .I file ...
  39. ]
  40. .SH DESCRIPTION
  41. .I Vac
  42. creates an archival copy of Plan 9 file trees on Venti. It can be used
  43. to build a simple backup system. One of the unusual properties of Venti is
  44. that duplicate blocks are detected and coalesced. When
  45. .I vac
  46. is used on a file tree that shares data with an existing archive, the consumption of
  47. storage will be approximately equal to an incremental backup.
  48. This reduction in storage consumption occurs transparently to the user.
  49. .PP
  50. As an optimization, the
  51. .B -d
  52. and
  53. .B -q
  54. options, described below, can be used to explicitly create an archive relative to an existing archive.
  55. These options do not change the resulting archive generated by
  56. .IR vac ,
  57. but simply reduce the number of write operations to Venti.
  58. .PP
  59. The output of
  60. .I vac
  61. is the hexadecimal representation of the SHA1 fingerprint of the root of the archive, in this format:
  62. .IP
  63. .EX
  64. vac:64daefaecc4df4b5cb48a368b361ef56012a4f46
  65. .EE
  66. .PP
  67. The options to
  68. .I vac
  69. are:
  70. .TF "-d\fI oldvacfile"
  71. .PD
  72. .TP
  73. .BI -b " blocksize
  74. Specifies the block size that data will be broken into.
  75. The units for the size can be specified by appending
  76. .L k
  77. to indicate kilobytes.
  78. The default is 8k.
  79. The size must be in the range
  80. of 512 bytes to 52k.
  81. .TP
  82. .BI -d " oldvacfile
  83. Reduce the number of blocks written to Venti by comparing the files to be stored with
  84. the contents of an existing
  85. .I vac
  86. file tree whose score is stored in
  87. .IR oldvacfile .
  88. .TP
  89. .BI -e " exclude
  90. Do not include the file or directory specified by
  91. .IR exclude .
  92. This option may be repeated multiple times.
  93. .TP
  94. .BI -f " vacfile
  95. The results of
  96. .I vac
  97. are placed in
  98. .IR vacfile ,
  99. or the standard output if no file is given.
  100. .TP
  101. .BI -i " name
  102. Include standard input as one of the input files, storing it in the archive
  103. with the specified
  104. .IR name .
  105. .TP
  106. .BI -h " host
  107. The network address of the Venti server.
  108. The default is taken from the environment variable
  109. .BR venti .
  110. If this variable does not exist, then the default is the
  111. metaname
  112. .BR $venti ,
  113. which can be configured via
  114. .IR ndb (6).
  115. .TP
  116. .B -m
  117. Expand and merge any
  118. .I vac
  119. archives that are found while reading the input files. This option is
  120. useful for building an archive from a collection of existing archives. Each archive is inserted
  121. into the new archive as if it had been unpacked in the directory in which it was found. Multiple
  122. archives can be unpacked in a single directory and the contents will be merged. To be detected, the
  123. archives must end in
  124. .LR .vac .
  125. Note, an archive is inserted by simply copying the root fingerprint and does not require
  126. the archive to be unpacked.
  127. .TP
  128. .B -q
  129. Increase the performance of the
  130. .B -d
  131. option by detecting unchanged files based on a match of the files name and other meta data,
  132. rather than examining the contents of the files.
  133. .TP
  134. .B -s
  135. Print out various statistics on standard error.
  136. .TP
  137. .B -v
  138. Produce more verbose output on standard error, including the name of the files added to the archive
  139. and the vac archives that are expanded and merged.
  140. .PP
  141. .I Unvac
  142. lists or extracts files stored in the vac archive
  143. .IR vacfile ,
  144. which can be either a vac archive string in the format
  145. given above or the name of a file containing one.
  146. If
  147. .I file
  148. arguments are given, only those files or directories
  149. will be extracted.
  150. The options are:
  151. .TP
  152. .B -T
  153. Set the modification time on extracted files
  154. to the time listed in the archive.
  155. .TP
  156. .B -c
  157. Write extracted files to standard output instead of creating a file.
  158. .TP
  159. .B -h
  160. as per
  161. .IR vac .
  162. .TP
  163. .B -t
  164. Print a list of the files to standard output rather than extracting them.
  165. .TP
  166. .B -v
  167. If extracting files, print the name of each file and directory
  168. to standard error.
  169. If listing files, print metadata in addition to the names.
  170. .SH SOURCE
  171. .B /sys/src/cmd/vac
  172. .SH "SEE ALSO"
  173. .IR vacfs (4),
  174. .IR venti (8)