Imported Upstream version 3.1.0
[debian/amanda] / ndmp-src / ThingsToTry
1 THINGS TO TRY
2 =============
3
4 Check the build:
5
6         % ndmjob -help
7         % ndmjob -v
8
9 The Query tests are about like the Connectathon
10 NDMPvX-COMMON tests.
11
12 Query your DATA agent:
13
14         % ndmjob -q -Dmyhost,logon,passwd
15
16 Query your DATA agent, force NDMPv2
17
18         % ndmjob -q -Dmyhost/2,logon,passwd
19
20 Query your DATA agent, force NDMPv3
21
22         % ndmjob -q -Dmyhost/3,logon,passwd
23
24 Query resident DATA agent. Force NDMPv2 and NDMPv3.
25
26         % ndmjob -q -D./2
27         % ndmjob -q -D./3
28
29 Query your TAPE agent:
30
31         % ndmjob -q -Tmyhost,logon,passwd
32
33 Query your ROBOT (see -help for DEV,CTRL,SID,LUN)
34
35         % ndmjob -q -Rmyhost,logon,passwd -r DEV,CTRL,SID,LUN
36
37 Query your DATA agent, produce a log file
38
39         % ndmjob -q -Dmyhost,logon,passwd -L log-file
40
41 Query your DATA agent, produce a detailed log file
42
43         % ndmjob -q -Dmyhost,logon,passwd -L log-file -d5
44
45 Query your DATA agent, produce a very detailed log file,
46 verbose to stdout
47
48         % ndmjob -q -Dmyhost,logon,passwd -L log-file -d6 -v
49
50
51 From here down, combinations of forcing NDMPv2/v3 on
52 each the DATA and TAPE agent are possible. These
53 tests correspond to the Connectathon NDMPvX-TAPE
54 and NDMPvX-DATA tests.
55
56
57 Run a test series on your TAPE agent. If things get
58 dicey, produce a log and check it
59
60         % ndmjob -o test-tape -T myhost,logon,passwd -f /dev/whatever
61         % ndmjob -o test-mover -T myhost,logon,passwd -f /dev/whatever
62
63 Resident TAPE agent test
64
65         % rm -f FakeTape
66         % touch FakeTape
67
68         % ndmjob -o test-tape -T./2 -f FakeTape
69         % ndmjob -o test-mover -T./2 -f FakeTape
70
71         % ndmjob -o test-tape -T./3 -f FakeTape
72         % ndmjob -o test-mover -T./3 -f FakeTape
73
74
75
76 Create a small directory system, like /tmp/test-data.
77 About 100 files amounting to about 5mb should be good.
78 A couple of big files in there would be good.
79
80         cd /tmp
81         tar xzvf tough.tgz.bin
82
83 Create a backup to your TAPE agent. Create an index
84 in file c-index.
85
86         % ndmjob -c \
87                 -D. -C /tmp -F tough -I c-index \
88                 -Tmyhost,logon,passwd -f /dev/whatever
89
90 Recover the file index. Your DATA agent might not implement
91 NDMPx_DATA_START_RECOVER_FILEHIST, but that doesn't matter.
92 This is using the NDMJOB resident DATA agent, and it does.
93 This first test will read the entire tape.
94
95         % ndmjob -t \
96                 -D. -I t-seq-index \
97                 -Tmyhost,logon,passwd -f /dev/whatever
98
99         % diff c-index t-seq-index
100
101 Now, do the same thing, but enable direct access. The
102 NDMJOB DATA agent will issue DATA_READ requests and
103 pick through the image stream to get to just the tar
104 headers.
105
106         % ndmjob -t \
107                 -D. -I t-dir-index -E RECOVER_DIRECT=yes \
108                 -Tmyhost,logon,passwd -f /dev/whatever
109
110         % diff c-index t-dir-index
111
112
113 Same series using only resident agents
114
115         % ndmjob -cvv \
116                 -D. -C /tmp -F tough -I c-index \
117                 -f FakeTape
118
119         % ndmjob -tvv \
120                 -D. -I t-seq-index -E RECOVER_DIRECT=no \
121                 -f FakeTape
122
123         % diff c-index t-seq-index
124
125         % ndmjob -tvv \
126                 -D. -I t-dir-index -E RECOVER_DIRECT=yes \
127                 -f FakeTape
128
129         % diff c-index t-dir-index
130
131
132 Same series using only resident DATA and TAPE on local host
133
134         % ndmjob -o daemon &
135
136         % ndmjob -cvv \
137                 -D. -C /tmp -F tough -I c-index \
138                 -Tlocalhost,ndmp,ndmp -f FakeTape
139
140         % ndmjob -tvv \
141                 -D. -I t-seq-index -E RECOVER_DIRECT=no \
142                 -Tlocalhost,ndmp,ndmp -f FakeTape
143
144         % diff c-index t-seq-index
145
146         % ndmjob -tvv \
147                 -D. -I t-dir-index -E RECOVER_DIRECT=yes \
148                 -Tlocalhost,ndmp,ndmp -f FakeTape
149
150         % diff c-index t-dir-index
151
152
153 Same series using DATA and TAPE on local host. This is
154 like the Connectathon NDMPvX-LOCAL tests:
155
156         % ndmjob -o daemon &
157
158         % ndmjob -cvv \
159                 -Dlocalhost,, -C /tmp -F tough -I c-index \
160                 -f FakeTape
161
162         % ndmjob -tvv \
163                 -Dlocalhost,, -I t-seq-index -E RECOVER_DIRECT=no \
164                 -f FakeTape
165
166         % diff c-index t-seq-index
167
168         % ndmjob -tvv \
169                 -Dlocalhost,, -I t-dir-index -E RECOVER_DIRECT=yes \
170                 -Tlocalhost,, -f FakeTape
171
172         % diff c-index t-dir-index
173
174
175
176 If you have a tape robot, you MUST specify -m MEDIA options.
177 The next set of tests verifies NDMP_MOVER window handling
178 and discovery.
179
180 Create a backup that crosses two tapes. This assumes
181 a tape in each address 100 and 101. Your addresses
182 will probably be different. The -m@100/2m says to put
183 at most 2mb on the first tape. This is a NDMP_MOVER_SET_WINDOW
184 during create, which is convention but not part of the spec.
185
186         % ndmjob -c \
187                 -D. -C /tmp -F test-data -I c-index \
188                 -Tmyhost,logon,passwd -f /dev/whatever \
189                 -r DEV,CTRL,SID,LUN \
190                 -m@100/2m -m@101
191
192 Now, read it back. If your NDMP_MOVER is returning the
193 proper error codes, this will automatically discover
194 the window sizes as it proceeds. Notice that the -m
195 options do not give window size.
196
197         % ndmjob -t \
198                 -D. -I t-index \
199                 -Tmyhost,logon,passwd -f /dev/whatever \
200                 -r DEV,CTRL,SID,LUN \
201                 -m@100 -m@101
202
203 That'll get you started.