vac 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. Option to
  68. .I vac
  69. are:
  70. .TP
  71. .BI -b " blocksize
  72. Specifies the block size that data will be broken into.
  73. The units for the size can be specified by appending
  74. .L k
  75. to indicate kilobytes.
  76. The default is 8k.
  77. The size must be in the range
  78. of 512 bytes to 52k.
  79. .TP
  80. .BI -d " oldvacfile
  81. Reduce the number of blocks written to Venti by comparing the files to be stored with
  82. the contents of an existing
  83. .I vac
  84. file tree whose score is stored in
  85. .IR oldvacfile .
  86. .TP
  87. .BI -e " exclude
  88. Do not include the file or directory specified by
  89. .IR exclude .
  90. This option may be repeated multiple times.
  91. .TP
  92. .BI -f " vacfile
  93. The results of
  94. .I vac
  95. are placed in
  96. .IR vacfile ,
  97. or the standard output if no file is given.
  98. .TP
  99. .BI -i " name
  100. Include standard input as one of the input files, storing it in the archive
  101. with the specified
  102. .IR name .
  103. .TP
  104. .BI -h " host
  105. The network address of the Venti server.
  106. The default is taken from the environment variable
  107. .BR venti .
  108. If this variable does not exist, then the default is the
  109. metaname
  110. .BR $venti ,
  111. which can be configured via
  112. .IR ndb (6).
  113. .TP
  114. .B -m
  115. Expand and merge any
  116. .I vac
  117. archives that are found while reading the input files. This option is
  118. useful for building an archive from a collection of existing archives. Each archive is inserted
  119. into the new archive as if it had been unpacked in the directory in which it was found. Multiple
  120. archives can be unpacked in a single directory and the contents will be merged. To be detected, the
  121. archives must end in
  122. .LR .vac .
  123. Note, an archive is inserted by simply copying the root fingerprint and does not require
  124. the archive to be unpacked.
  125. .TP
  126. .B -q
  127. Increase the performance of the
  128. .B -d
  129. option by detecting unchanged files based on a match of the files name and other meta data,
  130. rather than examining the contents of the files.
  131. .TP
  132. .B -s
  133. Print out various statistics on standard error.
  134. .TP
  135. .B -v
  136. Produce more verbose output on standard error, including the name of the files added to the archive
  137. and the vac archives that are expanded and merged.
  138. .PP
  139. .I Unvac
  140. lists or extracts files stored in the vac archive
  141. .IR vacfile ,
  142. which can be either a vac archive string in the format
  143. given above or the name of a file containing one.
  144. If
  145. .I file
  146. arguments are given, only those files or directories
  147. will be extracted.
  148. The options are:
  149. .TP
  150. .B -T
  151. Set the modification time on extracted files
  152. to the time listed in the archive.
  153. .TP
  154. .B -c
  155. Write extracted files to standard output instead of creating a file.
  156. .TP
  157. .B -t
  158. Print a list of the files to standard output rather than extracting them.
  159. .TP
  160. .B -v
  161. If extracting files, print the name of each file and directory
  162. to standard error.
  163. If listing files, print metadata in addition to the names.
  164. .SH SOURCE
  165. .B /sys/src/cmd/vac
  166. .SH "SEE ALSO"
  167. .IR vacfs (4),
  168. .IR venti (8)