tventi-backup.8 - plan9port - [fork] Plan 9 from user space | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
tventi-backup.8 (2290B) | |
--- | |
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 -qv | |
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 .B -q | |
39 generates only errors on standard error. | |
40 .PP | |
41 .I Wrarena | |
42 writes the blocks contained in the arena | |
43 .I arenafile | |
44 (typically, the output of | |
45 .IR rdarena ) | |
46 to a Venti server. | |
47 It is typically used to reinitialize a Venti server from backups of the … | |
48 For example, | |
49 .IP | |
50 .EX | |
51 venti/rdarena /dev/sdC0/arenas arena.0 >external.media | |
52 venti/wrarena -h venti2 external.media | |
53 .EE | |
54 .LP | |
55 writes the blocks contained in | |
56 .B arena.0 | |
57 to the Venti server | |
58 .B venti2 | |
59 (typically not the one using | |
60 .BR /dev/sdC0/arenas ). | |
61 .PP | |
62 The | |
63 .B -o | |
64 option specifies that the arena starts at byte | |
65 .I fileoffset | |
66 (default | |
67 .BR 0 ) | |
68 in | |
69 .I arenafile . | |
70 This is useful for reading directly from | |
71 the Venti arena partition: | |
72 .IP | |
73 .EX | |
74 venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas | |
75 .EE | |
76 .LP | |
77 (In this example, 335872 is the offset shown in the Venti | |
78 server's index list (344064) minus one block (8192). | |
79 You will need to substitute your own arena offsets | |
80 and block size.) | |
81 .PP | |
82 Finally, the optional | |
83 .I offset | |
84 argument specifies that the writing should begin with the | |
85 clump starting at | |
86 .I offset | |
87 within the arena. | |
88 .I Wrarena | |
89 prints the offset it stopped at (because there were no more data blocks). | |
90 This could be used to incrementally back up a Venti server | |
91 to another Venti server: | |
92 .IP | |
93 .EX | |
94 last=`{cat last} | |
95 venti/wrarena -h venti2 -o 335872 /dev/sdC0/arenas $last >output | |
96 awk '/^end offset/ { print $3 }' offset >last | |
97 .EE | |
98 .LP | |
99 Of course, one would need to add wrapper code to keep track | |
100 of which arenas have been processed. | |
101 See | |
102 .B /sys/src/cmd/venti/words/backup.example | |
103 for a version that does this. | |
104 .SH SOURCE | |
105 .B \*9/src/cmd/venti/srv | |
106 .SH SEE ALSO | |
107 .MR venti (7) , | |
108 .MR venti (8) | |
109 .SH BUGS | |
110 .I Wrarena | |
111 can't read a pipe or network connection containing an arena; | |
112 it needs a file already containing the entire arena. |