Blob


1 .TH VENTI-BACKUP 8
2 .SH NAME
3 rdarena, wrarena \- copy arenas between venti servers
4 .SH SYNOPSIS
5 .PP
6 .B venti/rdarena
7 [
8 .B -v
9 ]
10 .I arenapart
11 .I arenaname
12 .PP
13 .B venti/wrarena
14 [
15 .B -o
16 .I fileoffset
17 ]
18 [
19 .B -h
20 .I host
21 ]
22 .I arenafile
23 [
24 .I clumpoffset
25 ]
26 .SH DESCRIPTION
27 .PP
28 .I Rdarena
29 extracts the named
30 .I arena
31 from the arena partition
32 .I arenapart
33 and writes this arena to standard output.
34 This command is typically used to back up an arena to external media.
35 The
36 .B -v
37 option generates more verbose output on standard error.
38 .PP
39 .I Wrarena
40 writes the blocks contained in the arena
41 .I arenafile
42 (typically, the output of
43 .IR rdarena )
44 to a Venti server.
45 It is typically used to reinitialize a Venti server from backups of the arenas.
46 For example,
47 .IP
48 .EX
49 venti/rdarena /dev/sdC0/arenas arena.0 >external.media
50 venti/wrarena -h venti2 external.media
51 .EE
52 .LP
53 writes the blocks contained in
54 .B arena.0
55 to the Venti server
56 .B venti2
57 (typically not the one using
58 .BR /dev/sdC0/arenas ).
59 .PP
60 The
61 .B -o
62 option specifies that the arena starts at byte
63 .I fileoffset
64 (default
65 .BR 0 )
66 in
67 .I arenafile .
68 This is useful for reading directly from
69 the Venti arena partition:
70 .IP
71 .EX
72 venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas
73 .EE
74 .LP
75 (In this example, 335872 is the offset shown in the Venti
76 server's index list (344064) minus one block (8192).
77 You will need to substitute your own arena offsets
78 and block size.)
79 .PP
80 Finally, the optional
81 .I offset
82 argument specifies that the writing should begin with the
83 clump starting at
84 .I offset
85 within the arena.
86 .I Wrarena
87 prints the offset it stopped at (because there were no more data blocks).
88 This could be used to incrementally back up a Venti server
89 to another Venti server:
90 .IP
91 .EX
92 last=`{cat last}
93 venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas $last >output
94 awk '/^end offset/ { print $3 }' offset >last
95 .EE
96 .LP
97 Of course, one would need to add wrapper code to keep track
98 of which arenas have been processed.
99 See
100 .B /sys/src/cmd/venti/backup.example
101 for a version that does this.
102 .SH SOURCE
103 .B \*9/src/cmd/venti/srv
104 .SH SEE ALSO
105 .IR venti (7),
106 .IR venti (8)