man(1) Manual page archive

     VAC(1)                                                     VAC(1)

          vac, unvac - create, extract a vac archive on Venti

          vac [ -mqsv ] [ -a vacfile ] [ -b blocksize ] [ -d
          oldvacfile ] [ -e exclude ] [ -f vacfile ] [ -i name ] [ -h
          host ] [ -x excludefile ] file ...

          unvac [ -Tcdtv ] [ -h host ] vacfile [ file ... ]

          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 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 trans-
          parently to the user.

          As an optimization, the -d and -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 vac, but simply reduce the number of
          write operations to Venti.

          The output of vac is the hexadecimal representation of the
          SHA1 fingerprint of the root of the archive, in this format:


          The options are:

          -a vacfile
               Specifies that vac should create or update a backup
               archive, inserting the files under an extra two levels
               of directory hierarchy named yyyy/mmdd (year, month,
               day) in the style of the dump file system (see Plan 9's
               fs(4)).  If vacfile already exists, an additional
               backup day is added to the existing hierarchy, behaving
               as though the -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 -d or -f.

          -b blocksize
               Specifies the block size that data will be broken into.
               The units for the size can be specified by appending
               `k' to indicate kilobytes.  The default is 8k.  The
               size must be in the range of 512 bytes to 52k.

     VAC(1)                                                     VAC(1)

          -d oldvacfile
               Reduce the number of blocks written to Venti by compar-
               ing the files to be stored with the contents of an
               existing vac file tree whose score is stored in

          -e exclude
               Do not include the file or directory specified by
               exclude. This option may be repeated multiple times.
               Exclude can be a shell pattern as accepted by rc(1),
               with one extension: ... matches any sequence of charac-
               ters including slashes.

          -f vacfile
               The results of vac are placed in vacfile, or the stan-
               dard output if no file is given.

          -i name
               Include standard input as one of the input files, stor-
               ing it in the archive with the specified name.

          -h host
               The network address of the Venti server.  The default
               is taken from the environment variable venti.

          -m   Expand and merge any 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 `.vac'.  Note,
               an archive is inserted by simply copying the root fin-
               gerprint and does not require the archive to be

          -q   Increase the performance of the -a or -d options by
               detecting unchanged files based on a match of the files
               name and other meta data, rather than examining the
               contents of the files.

          -s   Print out various statistics on standard error.

          -v   Produce more verbose output on standard error, includ-
               ing the name of the files added to the archive and the
               vac archives that are expanded and merged.

          -x excfile
               Read exclude patterns from the file excfile. Blank
               lines and lines beginning with # are ignored.  All
               other lines should be of the form include pattern or

     VAC(1)                                                     VAC(1)

               exclude 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 -e option.  This option
               may be repeated multiple times.

          Unvac lists or extracts files stored in the vac archive
          vacfile, which can be either a vac archive string in the
          format given above or the name of a file containing one.  If
          file arguments are given, only those files or directories
          will be extracted.  The options are:

          -T   Set the modification time on extracted files to the
               time listed in the archive.

          -c   Write extracted files to standard output instead of
               creating a file.

          -d   Reduce the number of blocks read from Venti by compar-
               ing the files to be stored with their counterparts in
               the file system.  This option cannot be used with -c.

          -t   Print a list of the files to standard output rather
               than extracting them.

          -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.


          vacfs(4), venti(8)