This commit is contained in:
rsc 2005-07-18 22:41:58 +00:00
parent 9f95eb6fd6
commit 3aec33fee9
20 changed files with 635 additions and 541 deletions

View file

@ -311,6 +311,7 @@ the
variable in
.IR mk (1),
.IR namespace (1),
.IR netfiles (1),
.IR page (1),
.IR psfonts (1),
.IR rio (1),

View file

@ -65,11 +65,16 @@ Examine changes in block.c:
hist -d block.c
.EE
.SH FILES
.TF /dump
.TP
.B /dump
by convention, root of dump file system
.PD
.SH SOURCE
.B /home/am3/rsc/src/backup/cmd/history.c
.SH SEE ALSO
.IR yesterday (1)
.IR yesterday (1),
.IR vbackup (8)
.SH BUGS
Should be called
.IR history ,

View file

@ -1,263 +0,0 @@
.TH VBACKUP 8
.SH NAME
vbackup, vcat, vftp, vmount, vmount0, vnfs \-
back up Unix file systems to Venti
.SH SYNOPSIS
.B vbackup
[
.B -DVnv
]
[
.B -s
.I secs
]
[
.B -w
.I n
]
.I disk
[
.I score
]
.PP
.B vcat
[
.B -z
]
.I disk
|
.I score
.B >
.I disk
.PP
.B vftp
.I disk
|
.I score
.PP
.B vmount
[
.B -v
]
.I addr
.I mtpt
.PP
.B vmount0
[
.B -v
]
[
.B -h
.I handle
]
.I addr
.I mtpt
.PP
.B vnfs
[
.B -LLMRVr
]
[
.B -a
.I addr
]
[
.B -m
.I mntaddr
]
[
.B -b
.I blocksize
]
[
.B -c
.I cachesize
]
.I config
.SH DESCRIPTION
These programs back up and restore standard
Unix file system images stored in
.IR venti (8).
Images stored in
.I venti
are named by
.IR scores ,
which consist of a file system type followed
by a colon and forty hexadecimal digits, as in:
.IP
.EX
ffs:0123456789abcdef0123456789abcdef01234567
.EE
.PP
(The hexadecimal data is the SHA1 hash of the Venti
root block representing the file system image.)
.PP
These programs expect the environment variable
.B $venti
to be set to the network address of the Venti server to use
(for example,
.B yourhost
or
.BR tcp!yourhost!venti ).
.PP
.I Vbackup
copies the file system stored on
.I disk
to the Venti server and prints the
score for the newly-stored image.
The argument
.I disk
should be a disk or disk partition device
that would be appropriate to pass to
.IR mount (8).
.PP
The optional argument
.I score
is the score of a previous backup of the disk image.
If
.I score
is given,
.I 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.
.PP
The options to
.I vbackup
are:
.TP
.B -D
.TP
.B -V
.TP
.B -n
.TP
.B -v
.TP
.B -w \fIn
.TP
.B -s \fIsecs
.PP
.I Vcat
writes the named disk image to standard output.
Unused file system blocks are printed zeroed regardless
of their actual content.
.PP
If the
.B -z
flag is given,
.I vcat
will attempt to seek over unused blocks instead of writing to them.
The
.B -z
flag should only be used when standard output is seekable
.RI ( i.e. ,
when it has been redirected to a file or disk).
.PP
.I Vftp
presents the
file system image named by
.I disk
or
.I score
in a shell-like
interactive session.
Type
.B help
at the
.B vftp>
prompt for details.
.PP
.I Vmount
mounts the NFS service at the network connection
.I address
onto
.IR mountpoint .
On most operating systems,
.I vmount
must be run by the user
.BR root .
.PP
.I Vmount0
is a simple C program that
.I vmount
uses if
.IR mount (8)
does not suffice.
.PP
.I Vnfs
serves, using the
NFS version 3 protocol,
one or more disk images in a synthetic tree defined
by the configuration file
.IR config .
.I Vnfs
announces NFS service at
.IR addr
(default
.BR udp!*!nfs )
and NFS mount service at
.IR mntaddr
(default
.BR udp!*!\fI999 ),
registering both with the port mapper.
If no port mapper is found running (on port 111),
.I vnfs
starts its own port mapper.
The options are:
.TP
.B -r
Reply to all NFS requests with RPC rejections.
.TP
.B -M
Do not announce an NFS mount service.
.TP
.B -P
Do not register service with the port mapper.
.TP
.B -a
.SH EXAMPLES
.PP
Back up the file system stored on
.BR /dev/da0s1a :
.IP
.EX
% vbackup /dev/da0s1a
ffs:0123456789abcdef0123456789abcdef01234567
%
.EE
.PP
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
.B /tmp :
.IP
.EX
% cat config
mount /2005/0510 ffs:0123456789abcdef\fI...\fP
mount /2005/0510/home ffs:0123456789abcdef\fI...\fP
mount /2005/0510 ffs:0123456789abcdef\fI...\fP
mount /2005/0510/home ffs:0123456789abcdef\fI...\fP
hide /*/*/tmp
% vnfs -m -b 16k -c 1k config
%
.EE
.PP
Mount the backups on a client machine using
.IR vmount :
.IP
.EX
# vmount udp!yourserver!nfs /dump
# ls /dump
2005
#
.EE
.PP
Mount the backups using the standard NFS mount program:
.IP
.EX
# mount -t nfs -o soft,intr,ro,nfsv3,rsize=8192,timeo=100 \
-o nfsvers=3,nolock,noatime,nodev,nosuid \
.EE

View file

@ -85,7 +85,7 @@ If the
.B -z
option is given,
.I write
truncates the block before writing it to the server.
zero truncates the block before writing it to the server.
.PP
.I Copy
expects
@ -114,14 +114,15 @@ and
.B -r
option control
.IR copy 's
behavior upon encountering errors while reading
from srchost.
reaction to errors reading
from
.IR srchost .
.I Copy
always prints information to standard error
about each read error.
By default,
.I copy
immediately exits after printing the first error.
exits after printing the first error.
If the
.B -i
option is given, read errors are ignored.
@ -138,12 +139,11 @@ It writes the new root score to standard output.
.B \*9/src/cmd/venti/cmd
.SH SEE ALSO
.IR vac (1),
.IR vbackup (1),
.IR venti (3),
.IR vacfs (4),
.IR vnfs (4),
.IR venti (7),
.IR vbackup (8),
.IR venti (8)
.SH BUGS
There should be programs to read and write
streams and directories.
venti files and directories.

View file

@ -84,16 +84,15 @@ Restore your profile from yesterday:
yesterday -c ~/.profile
.EE
.SH FILES
.TF /dump
.B /dump
by convention, root of the dump file system
.PD
.SH SOURCE
.B /usr/local/bin/yesterday
.SH SEE ALSO
.IR diff (1),
.IR hist (1)
.IR hist (1),
.IR vbackup (8)
.SH BUGS
Backups are only available on
.B amsterdam
and
.BR toil .
.PP
It's hard to use this command without singing.