86714944452a34fc706c1e5f6c8111e5f66bd59d
[debian/amanda] / docs / topten.txt
1
2 Chapter 20. Collection of the top ten Amanda questions. And answers.
3 Prev  Part IV. Various Information                              Next
4
5 -------------------------------------------------------------------------------
6
7 Chapter 20. Collection of the top ten Amanda questions. And answers.
8
9
10 Stefan G. Weichinger
11
12 Original text; Conversion to Docbook/XML
13 AMANDA Core Team
14 <sgw@amanda.org>
15 Table of Contents
16
17
18   Reason_for_starting_this_list.
19
20   the_DLE-question
21
22   the_localhost-question
23
24   the_friday-tape-question
25
26   the_multiple-dumps-question
27
28   the_mailing-list-question
29
30   the_distro-question
31
32   the_index-question
33
34   the_tapetype-questions
35
36   the_size-question
37
38   the_GUI-question
39
40   the_holding-disk_question
41
42   ...
43
44
45  Reason for starting this list.
46
47 Jon LaBadie once wrote to me:
48 " I think a good "what is Amanda", "how is it different", "can I use it in my
49 setup", "why is it so different" kinda document is needed to stop the constant
50 "how do I put 10 dumps on one tape", or "how do I make Amanda do full backups
51 on saturday and incrementals ..." queries off the list :)) "
52 Stefan G. Weichinger
53
54  the DLE-question
55
56 A posting from the amanda-users mailing-list (mailto://amanda-users@amanda.org)
57 asked:
58 "What, please, is a "DLE"? May it mean: Down Loadable Entity ??? Stupid. Do
59 Less Errors ??? Stupid again. Hmmmm ..."
60 People consulting the amanda-users-mailinglist for the first time often get
61 confused by the use of the abbreviation DLE.
62 It has become very common for regular mailinglist-participants to use the
63 abbreviation DLE, which means in its long form
64 DiskList Entry
65 A DLE refers to one entry in the disklist of an Amanda-configuration. General
66 usage was to describe them as partitions, or file systems. But in fact they do
67 not have to be either. They can be directory trees, or multiple trees, or trees
68 with some branches cut off. So the more generic term DLE was coined.
69
70  the localhost-question
71
72 People get something like:
73
74   >Amanda Backup Client Hosts Check
75   >--------------------------------
76   >ERROR: localhost: [access as amanda not allowed from
77   >amanda@localhost.localdomain] amandahostsauth failed
78
79 and ask "Why?"
80 SHORT ANSWER:
81 DO NOT USE "localhost" as host entry in your disklist entries (aka DLEs). Use
82 the FQDN (Fully Qualified Domain Name) instead.
83 In Amanda-releases newer than 2004-03-22 there is a WARNING issued when you use
84 something like "localhost" or localhost.localdomain.net in your disklist.
85 Example (applies to Linux, syntax may be different on other systems):
86
87   $ hostname --fqdn
88   oops1.oops.co.at
89
90   $ cat disklist
91   oops1.oops.co.at /root root-tar # do it like this
92   localhost        /root root-tar # DON'T DO IT LIKE THIS
93
94 GOOD ANSWER (provided by John R. Jackson):
95 There are (at least) two things going on here and they should have their own
96 question/answer.
97 Completely independent of the "localhost" vs. FQDN issue are the people who get
98 this message because of any number of problems. Let me reword the error and
99 then give some typical goofs:
100
101   ERROR: some.amanda.client: access as amanda not allowed from
102   amanda@some.amanda.server
103   amandahostsauth failed
104
105 (error message reformatted here ...)
106 The first thing to understand is how to read this message. When it says "access
107 as amanda ..." it is telling you the client side ( amandad) is running as user
108 "amanda". The "... from amanda@some.amanda.server" part tells you the server
109 trying to connect is "some.amanda.server" and the Amanda command (e.g. amcheck
110 or amdump) is running as user "amanda".
111 The user names are typically the same on both client and server, but some
112 situations use different names and it is important to understand which is
113 which. For instance, amrecover connects as root ("... from
114 root@some.amanda.server") regardless of what the usual Amanda user is.
115 Potential problems:
116
117 * "some.server" is not spelled exactly that way in ~amanda/.amandahosts. A
118   typical error is to not use a fully qualified name (although simple typos
119   happen as well). For instance, this line:
120
121
122   some  amanda
123
124 does not match "some.amanda.server" even though both names may be equivalent.
125 When Amanda looks up the host name in .amandahosts, it uses the exact name it
126 lists in the message. It does not try to look up abbreviations.
127 The only exception to this is that the lookup is case insensitive.
128
129 * The user name listed in ~amanda/.amandahosts is not the one trying to connect
130   from the server. In particular, watch out for the "root" case listed above
131   for amrecover. The Amanda server typically needs lines like this in its
132   .amandahosts file:
133
134
135   some.amanda.client    root
136
137
138 * There are permission problems on the client preventing user "amanda" from
139   reading its own .amandahosts file. Make sure the file itself is readable to
140   the user "amanda" and all the parent directories down to it can be traversed.
141   A simple test is:
142
143
144   su - amanda -c "cat ~amanda/.amandahosts"
145
146 Now, back to the localhost issue. This:
147 Do NOT USE "localhost" as host entry in your disklist entries (aka DLEs). Use
148 the FQDN (Fully Qualified Domain Name) instead.
149 is not really an answer, more of a command :-).
150 There are a couple of reasons to NOT use "localhost". First is amrecover will
151 not work as expected. When it connects to the server (even though they are the
152 same machine), the server will look for the matching DLE's using the real host
153 name, not "localhost". The sethost command inside amrecover can "fix" this, but
154 why not just set it up right in the first place?
155 Another reason to not use "localhost" is because it helps with future changes.
156 As the Amanda configuration grows, it's not at all unusual to take a server and
157 make it a client of a new, larger, server. But now "localhost" does not point
158 to the same machine it used to. If the FQDN of the machine had been used all
159 along, this upgrade would have been much easier.
160 There is also no performance reason (any more) to use "localhost" instead of
161 the FQDN. Modern OS network stacks know to shortstop packets destined for the
162 local machine and never let them hit the wire. Yes, I'm old enough to remember
163 when they didn't :-).
164
165  the friday-tape-question
166
167 "How do I make Amanda do full backups on Saturday and incrementals ... ?"
168 "My backup screwed up on tuesday and now it keeps asking for the tuesday tape
169 even though it is wednesday!"
170 ANSWER:
171 The short answer is: You can't.
172 The longer answer is: You can. But you should not.
173 The reason: Amanda is designed to schedule your backups. Let "her" do it.
174 When you want to make the best use of Amanda, you have to let go the classic
175 schedule where one used to have one tape dedicated to each day of the week, and
176 one for the friday.
177 The main difference in concept is this:
178 In the classic backup scheme you said:
179 "I want to have incremental backups from Mo-Th and a full backup on Fr."
180 Using Amanda you say:
181 "I want to have at least one full backup in 5 days."
182 So you don't have to specify exactly WHEN the full backup should happen. You
183 just tell Amanda some goals it should reach and let it work out the details.
184 There are several advantages in this:
185 Imagine that you have your classic backup-schedule running fine. Everything is
186 calculated and designed well, so your tape gets filled well each night.
187 Now one user generates an unforeseen huge amount of data. For example, he
188 duplicates one big data-directory by mistake.
189 So the size of the directory raises within one day, maybe for multiple GBs.
190 Would your classic backup-scheme catch that? Or would it run out of tape,
191 simply because it was not calculated to have that filesystem with that size?
192 Amanda would try to catch it (and most of the time succeed ...).
193 As there is the estimate-phase before actually dumping something, Amanda can
194 look at the DLEs and determine the actual size at the time. It also determines
195 the size of an incremental backup so it can test for the Plan B to just run a
196 level-1 if it does not work out to do a level-0 for that DLE.
197 If the size of the DLE is much bigger than it has been the run before, Amanda
198 still tries to meet your goals. It just reschedules stuff, combining full and
199 incremental backups to meet the goals as good as possible.
200 So you can think of it as some algorithm which lets Amanda adapt to your data.
201 If you set the goals in a reasonable way, Amanda will just do the rest.
202
203  the multiple-dumps-question
204
205 "How do I put 10 dumps on one tape?"
206 ANSWER (provided by Jon LaBadie):
207 Use another backup scheduler.
208 This question is most often asked by individual computer users as a cost
209 consideration.
210 Amanda was developed at the University of Maryland Computing Center for use in
211 moderately sized computer centers. That it can be used by users of small
212 computers is a testament to its designers and maintainers.
213 While it may seem cost effective to put as many dumps as possible on a single
214 tape, in a computing center that would be considered a very risky decision. The
215 loss of, or damage to, a single tape would be the loss of many days worth of
216 dumps. That is too much to chance.
217 Thus, Amanda was designed to never overwrite a non-Amanda tape, nor an Amanda
218 tape from a different configuration, nor an Amanda tape from the current
219 configuration that is still "active", i.e. has backups on the tape more recent
220 than the dumpcycle length.
221 If you still feel you want Amanda to put multiple dumps on a single tape, there
222 is a crude way to accomplish your goal.
223 But first ask yourself, "If my data is worth so little that I can not afford a
224 few more tapes, why am I backing it up?"
225
226 Note
227
228 Most of the time it won't be YOU paying for the tapes as you may be working for
229 some company. If your boss tries to force you into doing this multiple-dumps-
230 on-one-tape thing, be sure to point him at this risk. Business people tend to
231 understand the price-difference between some tapes and a major data-loss.
232 Stefan G. Weichinger
233 A common way to put multiple dumps on a single tape is to let them accumulate
234 on the holding disk and use the amflush command when you want to put them on
235 tape. I.e. if you want a weeks' worth of backups on a single tape, leave the
236 tape out for a week. Then stick it in and run amflush.
237 (Better make sure you have sufficient disk space on your holding disk.)
238 Note, a slight variant of this is to have the parameter autoflush in
239 amanda.conf set to "yes". (Users of older Amanda-releases should check out if
240 their version already supports that parameter.)
241 Then after several dumps have collected in the holding disk, put the tape in
242 before that day's amdump is scheduled. amdump will both flush the holding disk
243 to tape and add the regularly scheduled dump.
244
245  the mailing-list-question
246
247 "How do i get off this damn mailing list?"
248 ANSWER:
249 Frequent users of the Amanda-users-mailing-list get mails like containing
250 "unsubscribe"
251 as people are trying desperately to get off the list.
252 Everyone that subscribes to Amanda-users gets a mail in which the following is
253 contained:
254 >Welcome to the amanda-users mailing list!
255 >Please save this message for future reference. Thank you.
256 >If you ever want to remove yourself from this mailing list, >you can send mail
257 to <Majordomo@amanda.org> with the following >command in the body of your email
258 message:
259 > unsubscribe amanda-users
260 Did you see that? You have to send your mail to <Majordomo@amanda.org>, and NOT
261 to <amanda-users@amanda.org> !
262
263  the distro-question
264
265 "Where can i get binary distributions of Amanda?"
266 ANSWER:
267 It is well known that various distributions of Linux contain precompiled
268 packages of Amanda-servers and -clients.
269 Due to the design of the Amanda source code, in which MANY features can be
270 configured at compile-time, it is heavily and heartily recommended to take the
271 effort and roll your own special flavour.
272 Thinking about these things before actually doing backups with Amanda will help
273 you in many ways. And you get the benefits of compiling your own paths/devices/
274 configurations right into your Amanda-binaries. You also get the benefit of a
275 much more improved understanding of the way Amanda does backups.
276
277  the index-question
278
279 "Why does amrecover say there are no index files?"
280 ANSWER:
281 It is very likely that Amanda is right about that. Check your dumptypes and
282 make sure they include the line:
283
284   index yes
285
286 If this is the case and you still get that message, recheck the installation of
287 your amindexd-binary.
288 Is the line in your (x)inetd-configuration pointing to the proper binary? Is
289 this line active (= uncommented)? Did (x)inetd reread that configuration since
290 that line was edited?
291
292  the tapetype-questions
293
294 " amtapetype has been running for 9 days, is this normal?"
295 "Will Amanda work with my frozboz tape drive/library?"
296 "Which device is my changer?"
297 " amtapetype is broken, it says my 200GB tape only holds 65GB."
298 "My file marks are HUGE, 1.3MB (on a 200GB tape, i.e. about 0.05% of the total
299 capacity, or expressed another way, maybe 2 mm of a 125000 mm tape ...)"
300 ANSWER:
301 It is crucial to tell Amanda the truth about the tape-device(s) you want to
302 use. Given the wrong values, Amanda can't calculate proper dumpsizes, free
303 tape-space or make valuable use of compression.
304 Before you consider running amtapetype, think twice. Twice.
305 As tapedrives tend to be produced by not-so-small companies and as those not-
306 so-small companies tend to produce more than one unit to maximize profits, it
307 is very likely that someone else has the same device you have or at least one
308 that uses the same technology.
309 Many people have already run amtapetype to determine the proper values to fill
310 in their amanda.conf-files. Browse the example amanda.conf in your Amanda-
311 tarball for various tapetypes. Browse the Amanda-FAQ on http://www.amanda.org.
312 Chances are high that you find just your device described.
313 As in every other topic discussed in internet mailing lists, please try finding
314 an answer there before asking on the Amanda-users list.
315 If your device is so exotic that even the Amanda-users can't help you, you
316 still have your copy of amtapetype.
317 Before you start running it, note this:
318
319 * DISABLE hardware compression on your drive.
320
321 A common mistake is to have hw-compression enabled. amtapetype uses random data
322 to test for the size and speed of your drive. Random data is pretty bad at
323 getting compressed. In fact it gets even bigger so the results given back are
324 useless. Disable it even if you are planning to use your drive with enabled hw-
325 compression.
326
327 * Expect it running long.
328
329 As you can read in the man page, amtapetype writes the full tape twice, which
330 can be a lot of data for modern drives (approaching a TByte). It also writes
331 tape marks every 10 MBytes (by default) which forces the drive to flush its
332 internal buffers and slows the process down. You can shorten this by giving
333 amtapetype a better estimate of the expected capacity:
334 $ amtapetype -e 100g -f /dev/nst0
335 This "prepares" amtapetype to expect a tape with 100 GB capacity.
336 If amtapetype really runs for 9 days, you can be pretty sure there is something
337 wrong with your approach.
338 And for the filemark-size: Just read the question again.
339
340  the size-question
341
342 "How do I back up a partition that won't fit on a tape?"
343 aka
344 "Can Amanda span one file over multiple tapes?"
345 ANSWER:
346 There are two basic rules when it comes to these things:
347
348 * Amanda supports using more than one tape in a single run of amdump
349 * Amanda does not support splitting a dump image across tapes
350
351 The first rule lets you make use of two or more tapes for a single amdump when
352 using a tapechanger-robot or a tape-library. You could even use multiple tapes
353 with the chg-manual-script, waiting patiently for one tape to be filled, then
354 change tapes manually.
355 No matter how many tapes you can put in your robot or how long you can stay
356 awake to change tapes you can NOT split the backup image of one of your
357 disklist entries (aka DLEs) across multiple tapes. No way.
358 So you may ask the first question listed above. As the size of harddisk- drives
359 grows steadily it is not uncommon to have multiple hundreds of gigabytes of
360 harddrive capacity in one system. Compared to the size of your maybe not-so-
361 shiny-anymore tapedrive this seems (and maybe is) huge.
362 What to do?
363 Don't split your dump image (it can't be done), split your DLEs.
364 You have to use GNU-tar in your dumptypes for this.
365 Try to redefine your disklist as in the following example:
366
367   fatboy  /bigmama_BIGDIR  /bigmama {     # a big subdirectory
368   comp-user-tar
369   include "./bigdir"
370   }
371   fatboy  /bigmama_FILES01 /bigmama {     # all files beginning with...
372   nocomp-user-tar
373   include "./file[01]*"
374   }
375   fatboy  /bigmama_FILES23 /bigmama {
376   nocomp-user-tar
377   include "./file[23]*"
378   }
379   ...
380   fatboy  /bigmama_REST /bigmama {        # Catch-all
381   nocomp-user-tar
382   exclude "./file[0-9]*"
383   exclude append "./bigdir"
384   }
385
386 (example taken from a mail by Paul Bijnens on the Amanda-users-list)
387 The trick is to form several chunks of data of which each fits on tape. In the
388 example above the chunks are formed by regular expressions matching files named
389 like file00, file123 and file9999. You have to look at your DLEs to find the
390 patterns describing your chunks.
391 As this technique forms data-chunks that fit on your tape it also helps Amanda
392 to schedule your backups more flexible. Having more and smaller DLEs, the
393 planner has more variations to possibly schedule your backups, so this will
394 help getting nice output from amadmin <conf> balance, too.
395
396 Note
397
398 DLE-spanning might be supported by Amanda in a future release.
399
400  the GUI-question
401
402 "Is anyone working on a GUI for Amanda?"
403 ANSWER:
404 Actually there are people working on GUIs for Amanda. Aside from that the
405 question really is: "Does anyone need a GUI for Amanda?"
406 Given the fact that backups tend to be run at night while people tend to sleep,
407 who would need a fancy GUI showing 3D-backup-diagrams via X11? The only part of
408 backups where GUIs maybe could add some comfort is recovery for unexperienced
409 users.
410
411  the holding-disk question
412
413 "Why does it say "Some dumps may have been left in the holding disk." and there
414 is nothing in the holding disk?"
415 ANSWER:
416 The third word in the message. Some dumps MAY have been left.
417
418  ...
419
420 Please feel free to suggest additions and corrections. Write to the amanda-
421 users-mailinglist at mailto://amanda-users@amanda.org.
422
423 Note
424
425 Refer to http://www.amanda.org/docs/topten.html for the current version of this
426 document.
427 -------------------------------------------------------------------------------
428
429 Prev                     Up                          Next
430 Chapter 19. Amanda FAQ  Home  Chapter 21. Amanda WISHLIST
431