| VBACKUP(8) | VBACKUP(8)
| NAME
| vbackup, vcat, vftp, vmount, vnfs – back up Unix file systems to Venti
SYNOPSIS
| `vbackup` [ `−DVinv` ] [ `−M` mtpt ] [ `−m` host ] [ `−s` secs ] [ `−w` n ] disk [ score ]
`vcat` [ `−z` ] disk | score `>` disk
`vftp` score | disk
`vmount` [ `−v` ] addr mtpt
`vnfs` [ `−ELLRVir` ] [ `−a` addr ] [ `−b` blocksize ] [ `−c` cachesize ] config
DESCRIPTION
| These programs back up and restore standard Unix file system images stored in venti(8). Images stored in venti are named by scores, which consist of a file system type followed by a colon and forty hexadecimal digits, as in:
| `ffs:0123456789abcdef0123456789abcdef01234567
`
(The hexadecimal data is the SHA1 hash of the Venti root block representing the file system image.)
These programs expect the environment variable `$venti` to be set to the network address of the Venti server to use (for example, `yourhost` or `tcp!yourhost!venti`).
Vbackup copies the file system stored on disk to the Venti server and prints the score for the newly-stored image. The argument disk should be a disk or disk partition device that would be appropriate to pass to mount(8).
The optional argument score is the score of a previous backup of the disk image. If score is given, vbackup will not write to Venti any blocks that have not changed since the previous backup. This is only a speed optimization: since the blocks are already stored on Venti they need not be sent to the Venti server again.
The options to vbackup are: `−D` Turn on debugging output. `−V` Trace interactions with Venti server. `−m` host
| `−M` mtpt Set names used to construct the path in the `mount command.` The default host is the name returned by sysname (see getuser(3)). The default mtpt is the place where disk is currently mounted.
Set backup mount point:
| this name is also used in the printed `mount` command. The default is the name returned by sysname (see getuser(3)).
`−n` No-op mode: do not write any blocks to the server `−i` Read scores incrementally from the previous backup as needed, rather than prefetching them. `−v` Print verbose output. `−w` n Write parallelism: keep n writes to the server in progress at a time. `−s` secs
| Status interval: every secs seconds, print a line tracking progress of the backup.
When vbackup finishes, it prints a single line of the form
| `mount /`host`/`yyyy`/`mmdd`/`mtpt score yyyy`/`mmdd`/`hhmm
This line is a valid configuration line for vnfs (q.v.). Mntpath is the path on which disk is currently mounted.
Vcat writes the named disk image to standard output. Unused file system blocks are printed zeroed regardless of their actual content.
By default, vcat will assume that its standard output is seekable (i.e., it has been redirected to a file or disk) and seek over unused blocks instead of writing to them. The `−z` option causes vcat to zero unused blocks instead.
Vftp presents an ftp(1)-like interface to a physical or backed-up disk image. It is used mainly for debugging. Type `help` at the `vftp>` prompt for a list of commands.
Vmount mounts the NFS service at the network connection address onto mountpoint. On most operating systems, vmount must be run by the user `root`. Because address is passed to the host OS kernel rather than interpreted by dial(3), it must be only an IP address, not a full dial address.
Vnfs serves, using the NFS version 3 protocol, one or more disk images in a synthetic tree defined by the configuration file config. Vnfs serves both NFS mount protocol and NFS protocol RPCs at addr (default `udp!*!nfs`). The options are: `−E` Disable ‘encrypted’ handles. By default handles are encrypted with a random key to avoid leaking information about the backed-up file systems. If encryption is disabled, the NFS handles exposed to the client may leak information about the root scores of the disks as well as inode numbers. `−L` Local service only: serve only requests from the loopback interface (127.0.0.1). `−LL` Local service only, with paranoia: serve only requests from loopback, and only from the first source port that sends a request. This option is intended to be used to make sure that once the local host has mounted the service, no other local users can access it. `−R` Print all NFS and NFS mount RPCs to standard error. `−V` Print all Venti transactions to standard error. `−a` addr
| Serve requests on addr (see above).
`−b` blocksize
| Set block size used by the in-memory venti block cache. Must be as large as the maximum block size in any file system mentioned in the configuration.
`−c` cachesize
| Set the number of blocks stored by the in-memory venti cache.
`−i` Run in “insecure” mode, allowing remote root users to use uid and gid 0 and read any file. (Normally, remote root is mapped to uid and gid –1 and has no special permissions.) `−r` Respond to all requests with a Sun RPC rejection. This is useful during debugging.
Config is a text file describing the backup hierarchy for vnfs to serve. Lines beginning with a sharp (`#`) are ignored. The rest of the file is a sequence of commands, one per line. The commands are: `mount` mtpt score time
| Add the file system with the given score to the tree at the mount point mtpt. The path to the mount point will be created if necessary. If `/dev/null` is given as the score, an empty file system is mounted at mtpt, excluding mtpt’s contents from view. Time is the modification time to return for the directory mtpt, either a decimal number of seconds since the epoch or a string of the form yyyy`/`mmdd`/`hhmm giving the year, month, day, hour, and minute. (Vnfs does not use the modification time of the root in order to avoid accessing every mounted file system on common actions like `ls −l /dump/sys/2005`.)
`allow` ip[`/`mask] `deny` ip[`/`mask]
| These two commands define access permissions based on IP address. The optional mask can be a decimal number (24) or an equivalent IP mask (255.255.255.0). Each request is filtered through the rules listed in the configuration file. The first rule that matches is used. If any `allow` or `deny` rules are given, the default action is to reject the request. In the absence of any rules, the default action is to accept all requests.
Reading the special file `/dump/+refreshconfig` causes vnfs to reload config. The read returns either the string `ok` or an error message.
EXAMPLES
| Running on the server bob, back up the file system stored on `/dev/da0s1a`, which is mounted on `/home`:
| `% vbackup /dev/da0s1a mount /bob/2005/0510/home ffs:0123456789abcdef`... `2005/0510/0831 %
`
Serve that backup and a few others in a tree reminiscent of Plan 9’s dump file system, but hide each day’s contents of `/tmp :
| % cat config mount /bob/2005/0510 ffs:0123456789abcdef
`
| ... `2005/0510/0829 mount /bob/2005/0510/home ffs:0123456789abcdef`... `2005/0510/0831 mount /bob/2005/0510/tmp /dev/null 1 mount /bob/2005/0511 ffs:0123456789abcdef`... `2005/0511/0827 mount /bob/2005/0511/home ffs:0123456789abcdef`... `2005/0511/0828 mount /bob/2005/0511/tmp /dev/null 1 % vnfs −b 16k −c 1k config %
`
Mount the backups on a client machine using vmount:
| `# vmount udp!yourserver!nfs /dump # ls /dump/bob/2005 0510 0511 #
`
(Users of fancy shells may need to quote the address argument.)