groff 1.23.0 added .MR to its -man macro package. The NEWS file states
that the inclusion of the macro "was prompted by its introduction to
Plan 9 from User Space's troff in August 2020." From d32deab it seems
that the name for Plan 9 from User Space's implementation was suggested
by groff maintainer G. Brandon Robinson.
Not sure if the intention was to make these definitions compatible, but
it would be nice if they were.
Currently, Plan 9 from User Space's .MR expects its second argument to
be parenthesized. groff's .MR does not. This results in extra
parentheses appearing in manual references when viewing Plan 9 from User
Space's manual pages on a system using groff.
113 lines
2.2 KiB
Groff
113 lines
2.2 KiB
Groff
.TH VENTI-BACKUP 8
|
|
.SH NAME
|
|
rdarena, wrarena \- copy arenas between venti servers
|
|
.SH SYNOPSIS
|
|
.PP
|
|
.B venti/rdarena
|
|
[
|
|
.B -qv
|
|
]
|
|
.I arenapart
|
|
.I arenaname
|
|
.PP
|
|
.B venti/wrarena
|
|
[
|
|
.B -o
|
|
.I fileoffset
|
|
]
|
|
[
|
|
.B -h
|
|
.I host
|
|
]
|
|
.I arenafile
|
|
[
|
|
.I clumpoffset
|
|
]
|
|
.SH DESCRIPTION
|
|
.PP
|
|
.I Rdarena
|
|
extracts the named
|
|
.I arena
|
|
from the arena partition
|
|
.I arenapart
|
|
and writes this arena to standard output.
|
|
This command is typically used to back up an arena to external media.
|
|
The
|
|
.B -v
|
|
option generates more verbose output on standard error;
|
|
.B -q
|
|
generates only errors on standard error.
|
|
.PP
|
|
.I Wrarena
|
|
writes the blocks contained in the arena
|
|
.I arenafile
|
|
(typically, the output of
|
|
.IR rdarena )
|
|
to a Venti server.
|
|
It is typically used to reinitialize a Venti server from backups of the arenas.
|
|
For example,
|
|
.IP
|
|
.EX
|
|
venti/rdarena /dev/sdC0/arenas arena.0 >external.media
|
|
venti/wrarena -h venti2 external.media
|
|
.EE
|
|
.LP
|
|
writes the blocks contained in
|
|
.B arena.0
|
|
to the Venti server
|
|
.B venti2
|
|
(typically not the one using
|
|
.BR /dev/sdC0/arenas ).
|
|
.PP
|
|
The
|
|
.B -o
|
|
option specifies that the arena starts at byte
|
|
.I fileoffset
|
|
(default
|
|
.BR 0 )
|
|
in
|
|
.I arenafile .
|
|
This is useful for reading directly from
|
|
the Venti arena partition:
|
|
.IP
|
|
.EX
|
|
venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas
|
|
.EE
|
|
.LP
|
|
(In this example, 335872 is the offset shown in the Venti
|
|
server's index list (344064) minus one block (8192).
|
|
You will need to substitute your own arena offsets
|
|
and block size.)
|
|
.PP
|
|
Finally, the optional
|
|
.I offset
|
|
argument specifies that the writing should begin with the
|
|
clump starting at
|
|
.I offset
|
|
within the arena.
|
|
.I Wrarena
|
|
prints the offset it stopped at (because there were no more data blocks).
|
|
This could be used to incrementally back up a Venti server
|
|
to another Venti server:
|
|
.IP
|
|
.EX
|
|
last=`{cat last}
|
|
venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas $last >output
|
|
awk '/^end offset/ { print $3 }' offset >last
|
|
.EE
|
|
.LP
|
|
Of course, one would need to add wrapper code to keep track
|
|
of which arenas have been processed.
|
|
See
|
|
.B /sys/src/cmd/venti/words/backup.example
|
|
for a version that does this.
|
|
.SH SOURCE
|
|
.B \*9/src/cmd/venti/srv
|
|
.SH SEE ALSO
|
|
.MR venti 7 ,
|
|
.MR venti 8
|
|
.SH BUGS
|
|
.I Wrarena
|
|
can't read a pipe or network connection containing an arena;
|
|
it needs a file already containing the entire arena.
|