Imported Upstream version 2.4.4p3
[debian/amanda] / docs / INSTALL
1 Amanda INSTALLATION NOTES
2
3 This document covers the compilation, installation, and runtime setup
4 of Amanda 2.4.2 and higher.
5
6 0. BEFORE DOING ANYTHING
7
8     A.  Read this document all the way through.
9
10     B.  Consult the docs/SYSTEM.NOTES file for installation notes
11         specific to particular operating systems.  There is often
12         important information there, so don't forget this step.
13
14     C.  Read docs/UPGRADE if you are upgrading from a previous Amanda
15         version.  There are some issues that you will need to be aware
16         of.
17
18     D.  If you are using KERBEROS authentication, read docs/KERBEROS
19         for details on installing and running the kerberized version of
20         Amanda.
21
22     E.  Check the Amanda Patches Page, www.amanda.org/patches.html.
23
24 1. COMPILING THE AMANDA SOURCES
25
26 If you have multiple architectures, you only need to install the whole
27 Amanda package on the tape server host (the one with tape drive).  On
28 the backup client hosts (the ones you are going to dump), you only need
29 to compile some of the Amanda programs (see section 1.2.H below).
30
31 1.1. SOURCE CONFIGURATION:
32
33     A.  Amanda can optionally make use of the following packages to
34         back up different types of clients or clients with different
35         filesystem dumping programs.  If you wish to use GNU tar to
36         back up filesystems, we can install version 1.12 or 1.13.25.
37         gnutar 1.12 can be found at:
38
39                 ftp://ftp.gnu.org/pub/gnu/tar/tar-1.12.tar.gz
40  
41         Apply the patch from patches/tar-1.12.patch.  The first hunk
42         may be enough, unless it's a SunOS4 host.  Read more about the
43         patches in the patch file itself.
44
45         gnutar 1.13.25 can be found at:
46
47                 ftp://alpha.gnu.org/pub/gnu/tar/tar-1.13.25.tar.gz
48
49         Samba allows Unix systems to talk to PC clients.  Amanda can
50         back up Microsoft Windows clients using Samba:
51
52                 http://www.samba.org
53
54         Read docs/SAMBA for configuration tips and known limitations.
55
56         Look at http://www.amanda.org/patches.html for up to date
57         information on patches.
58
59     B.  If you wish to make use of some of the scripts that come with
60         Amanda, you will need to install Perl.  You can get Perl from
61         any CPAN site.  
62             ftp://ftp.cpan.org/pub/CPAN/src/perl-5.6.1.tar.gz
63
64
65     C.  One of the programs included in this package is amplot,
66         which reads a data file that Amanda generates for each dump
67         and translates that information in it into a nice picture that
68         can be used to determine how your installation is doing and if
69         any parameters need to be changed.  To use amplot, you need a
70         version of awk that understands command line variable
71         substitutions, such as nawk or gawk, which is available from
72
73             ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.1.tar.gz
74
75         Amplot also required that gnuplot be installed on your system.
76         Gnuplot is available at
77
78             http://www.gnuplot.org/
79             ftp://ftp.gnuplot.org/pub/gnuplot
80
81     D.  The process of building Amanda requires that some other
82         packages be installed on your system.  The following packages
83         are used:
84
85             ftp://ftp.gnu.org/pub/gnu/readline/readline-4.2.tar.gz
86                 amrecover optionally uses the readline library for its
87                 command-line edition mechanisms.  This library itself
88                 requires either termcap, curses or ncurses.  termcap
89                 is preferred, and it may be obtained from:
90             ftp://ftp.gnu.org/pub/gnu/termcap/termcap-1.3.tar.gz
91
92         If you wish to edit and enhance Amanda, you may need to install
93         the following tools.  Autoconf and automake are required if you
94         are going to rebuild the Makefiles and auto configuration scripts.
95         Bison is only needed if you are going to work on the index server
96         and client code.
97
98             ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.53.tar.gz
99             ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.3.tar.gz
100             ftp://ftp.gnu.org/pub/gnu/bison/bison-1.27.tar.gz
101             ftp://ftp.gnu.org/pub/gnu/flex/flex-2.5.4a.tar.gz
102
103     E.  Read about the different configuration options available for
104         building and running Amanda.  To see the options, do both:
105
106             a.  Run `./configure --help' to see the available options
107                 that configure takes.
108             b.  Read the example/config.site file which gives longer
109                 descriptions to the same options as in step a).
110
111     F.  Choose which user and group you will run the dumps under.
112         Common choices for user are `bin' or another user specifically
113         created for Amanda, such as `amanda'; common choices for group
114         are `operator' or `disk'.  If you do not specify
115         --with-user=<username> and --with-group=<groupname>, configure
116         will abort.  Also choose the default name for your
117         configuration, such as `csd' or `DailySet1').  This name is
118         used by the Amanda commands to choose one of multiple possible
119         configurations.  You may specify it using the
120         --with-config=<confgname>.
121
122     G.  Decide where Amanda will live.  You need to choose a root
123         directory for Amanda.  Let this root directory be called
124         $prefix.  Unless you change the default behavior with the
125         appropriate command line options, Amanda will install itself
126         as.  Listed below each directory is the appropriate
127         configure option to change the location of this part of
128         Amanda.
129
130             $prefix/sbin                Amanda server side programs
131                                         --sbindir=
132             $prefix/libexec             Amanda backup client programs
133                                         --libexecdir=
134             $prefix/lib                 Amanda dynamic libraries
135                                         --libdir=
136             $prefix/etc/amanda          Runtime configuration files
137                                         --with-configdir=
138             $prefix/var/amanda/gnutar-lists
139                                         Directory for GNUtar lists (client)
140                                         --with-gnutar-listdir=
141             $prefix/man                 Directory for manual pages
142                                         --mandir=
143
144         Note that the GNU tar listdir should be a local filesystem on
145         each client that is going to be backed up with GNU tar.  If it 
146         really must be NFS-mounted, make sure the filesystem is
147         exported so that the client has root access to it.
148
149     H.  Decide if you are compiling Amanda on a server only or a
150         client only platform.  If you have a particular operating system
151         that will only be a Amanda client and will never run as the
152         master tape host, then add the --without-server option to
153         configure.  In the unlikely case that you have a particular
154         operating system that will serve as the tape host and you do
155         not wish to back up any machines that run this operating system,
156         add the --without-client option to the configure options.
157         There are many other configuration switches for amanda.  You
158         may learn more about them by running `configure --help' and by
159         reading examples/config.site.
160
161     I.  Now configure Amanda.  There are two ways of doing this.  If
162         you are running Amanda on a single OS, then probably the first
163         method works better for you.  If you need to support multiple
164         platforms, then the second method will work better.
165
166             a.  Run `configure' with the appropriate command line
167                 options.  You will probably want to remember the
168                 command line options for future builds of Amanda.
169
170             b.  Edit example/config.site and install it in the directory
171                 $prefix/etc or $prefix/share.  When `configure' runs
172                 the next time it will look for this file and use it to
173                 configure Amanda.
174
175 1.2. BUILDING AND INSTALLING THE BINARIES
176
177     A.  Back at the top-level source directory, build the sources:
178                 1. make
179                 2. su root; make install
180         If you want to change the compiler flags, you can do so like
181         this:
182                 make CFLAGS="-O3 -Wall"
183
184     B.  If you have built with USE_VERSION_SUFFIXES, you will want to
185         create symlinks to the version you wish to use, eg:
186                 ln -s amdump-x.y.z amdump
187         This is not done automatically by the install process, so that
188         you can have multiple Amanda versions co-existing, and choose
189         yourself which to make the default version.  The script
190         contrib/set_prod_link.pl may save you some keystrokes.
191
192 2. SETTING UP YOUR AMANDA CONFIGURATION
193
194 2.1. SETTING UP THE TAPE SERVER HOST
195
196     B.  Create the config directory (eg /usr/local/etc/amanda/confname)
197         and copy the example/ files into that directory.  Edit these
198         files to be correct for your site, consulting the amanda(8) man
199         page if necessary.  You can also send mail to
200         amanda-users@amanda.org if you are having trouble deciding how
201         to set things up.  You will also need to create the directory
202         for the log and database files for the configuration to use (eg
203         /usr/local/var/amanda/confname), and the work directory on the
204         holding disk.  These directories need to agree with the
205         parameters in amanda.conf.  Don't forget to make all these
206         directories writable by the dump user!
207
208         Make sure that you specify the *no-rewind* version of the tape
209         device in your amanda.conf file.  This is a frequently
210         encountered problem for new sites.
211
212         Note that you might want to temporarily set the "no-record"
213         option in all your dumptypes when first installing amanda if
214         you'd like to run tests of Amanda in parallel with your
215         existing dump scheme.  Amanda will then run but will not
216         interfere with your current dumpdates.  However, you don't want
217         to run with "no-record" under normal operations.
218
219     C.  Put amanda into your crontab.  Here's a sample:
220                 0 16 * * 1-5 /usr/local/bin/amcheck -m confname
221                 45 0 * * 2-6 /usr/local/bin/amdump confname
222         This is for SunOS 4.x, which has a per-user crontab; most other
223         systems also require a userid on each cron line.  See your
224         cron(8) for details.  With these cron lines, Amanda will check
225         that the correct tape is in the drive every weekday afternoon
226         at 4pm (if it isn't, all the operators will get mail).  At
227         12:45am that night the dumps will be run.
228
229     D.  Put the Amanda services into your /etc/services file.  Add
230         entries like:
231                 amanda          10080/udp
232                 amandaidx       10082/tcp
233                 amidxtape       10083/tcp
234         You may choose a different port number if you like, but it must
235         match that in the services file on the client hosts too.
236
237         If you are running NIS (aka YP), you have to enter the amanda
238         service into your NIS services database.  Consult your NIS
239         documentation for details.
240
241         You may use the `patch-system' script, from client-src, in
242         order to modify this file.  Run it with a `-h' argument for
243         usage.
244
245     E.  If you are going to use the indexing capabilities of Amanda,
246         and your server uses inetd, then add these to your inetd.conf
247         on the tape server host:
248
249             amandaidx stream tcp nowait USER AMINDEXD_PATH amindexd
250             amidxtape stream tcp nowait USER AMIDXTAPED_PATH amidxtaped
251
252         where AMINDEXD_PATH and AMIDXTAPED_PATH are the complete paths
253         to where the amindexd and amidxtaped executables (usually
254         libexec_dir/amindexd and libexec_dir/amidxtaped), and USER is
255         the Amanda user.
256
257         You may use the `patch-system' script, from client-src, in
258         order to modify this file.  Run it with a `-h' argument for
259         usage.
260
261         If your tape server uses xinetd instead of inetd, then you have
262         to add the following two files to your xinetd-configuration
263         (usually /etc/xinetd.d):
264
265         #/etc/xinetd.d/amandaidx
266
267         service amandaidx
268         {
269                 socket_type             = stream
270                 protocol                = tcp
271                 wait                    = no
272                 user                    = USER
273                 group                   = GROUP
274                 groups                  = yes
275                 server                  = AMINDEXD_PATH/amindexd 
276         }
277
278         #/etc/xinetd.d/amidxtaped
279
280         service amidxtape
281         {
282                 socket_type             = stream
283                 protocol                = tcp
284                 wait                    = no
285                 user                    = USER
286                 group                   = GROUP
287                 groups                  = yes
288                 server                  = AMIDXTAPED_PATH/amidxtaped
289         }
290
291     F.  If the tape server host is itself going to be backed up (as is
292         usually the case), you must also follow the client-side install
293         instructions below on the server host, INCLUDING setting up the
294         .amandahosts file so that the server host lets itself in.
295         This is a frequently encountered problem for new sites.
296
297
298 2.2. SET UP THE BACKUP CLIENT HOSTS
299
300     A.  When using BSD-style security (enabled by default), set up
301         your ~dumpuser/.amandahosts (or ~dumpuser/.rhosts and/or
302         /etc/hosts.equiv, if you have configured
303         --without-amandahosts) so that the dumpuser is allowed in from
304         the server host.  Only canonical host names will be accepted
305         in .amandahosts, and usernames must be present in every line,
306         because this is safer.
307
308     B.  Set up your raw disk devices so that the dumpuser can read
309         them, and /etc/dumpdates so that the dumpuser can write to it.
310         Normally this is done by making the disk devices readable by
311         (and dumpdates read/writable by) group `operator', and putting
312         the dumpuser into that group.
313
314     C.  Put the Amanda service into your /etc/services file.  Add
315         entry like:
316                 amanda          10080/udp
317                 amandaidx       10082/tcp
318                 amidxtape       10083/tcp
319         You may choose a different port number if you like, but it must
320         match that in the services file on the client hosts too.
321
322         If you are running NIS (aka YP), you have to enter the amanda
323         service into your NIS services database.  Consult your NIS
324         documentation for details.
325
326         You may use the `patch-system' script, from client-src, in
327         order to modify this file.  Run it with a `-h' argument for
328         usage.
329
330     D.  If your Amanda client uses inetd, put the Amanda client service 
331         into inetd's config file.  
332         This file is usually found in /etc/inetd.conf, but on older systems
333         it is /etc/servers.  The format is different on different OSes,
334         so you must consult the inetd man page for your site.  Here is
335         an example from our site, again from SunOS 4.x:
336
337             amanda dgram udp wait USER AMANDAD_PATH amandad
338
339         You may use the `patch-system' script, from client-src, in
340         order to modify this file.  Run it with a `-h' argument for
341         usage.
342
343         If your Amanda client uses xinetd, you have to add the following
344         file to your xinetd-configuration
345         (usually /etc/xinetd.d):
346
347         #/etc/xinetd.d/amanda
348
349         service amanda
350         {
351                 socket_type             = dgram
352                 protocol                = udp
353                 wait                    = yes
354                 user                    = USER
355                 group                   = GROUP
356                 groups                  = yes
357                 server                  = AMANDAD_PATH/amandad 
358         }
359
360     E.  Kick inetd/xinetd to make it read its config file.  On most systems
361         you can just kill -HUP inetd (or xinetd). On older systems you may have to
362         kill it completely and restart it.  Note that
363         killing/restarting (x)inetd is not safe to do unless you are sure
364         that no (x)inetd services (like rlogin) are currently in use,
365         otherwise (x)inetd will not be able to bind that port and that
366         service will be unavailable.
367
368     F.  If you intend to back up xfs filesystems on hosts running IRIX,
369         you must create the directory /var/xfsdump/inventory, otherwise
370         xfsdump will not work.
371
372 THAT'S IT!  YOU ARE READY TO RUN, UNLESS WE FORGOT SOMETHING.  PLEASE
373 send mail to amanda-users@amanda.org if you have any comments or
374 questions.  We're not afraid of negative reviews, so let us have it!
375
376 Before writing questions, you may prefer to take a look at the FAQ (in
377 docs/FAQ) and at the Amanda home page, at http://www.amanda.org.
378 Browsable archives of amanda mailing-lists are available there.
379
380 By James da Silva <jds@cs.umd.edu> and others.