Amanda CDRW-Taper - Installation & Usage
Peter Conrad, <conrad@tivano.de>
Richard Kunze, <kunze@tivano.de>
$Id: Install.html,v 1.4 2003/05/20 08:35:04 conrad Exp $
1. Prerequisites
You need the following software installed on your system if you want
to use the CDRW-Taper:
- Perl. Any perl 5 installation should do,
CDRW-Taper does not use any fancy perl features.
- mkisofs and cdrecord from the
cdrtools package.
CDRW-Taper has been tested with mkisofs 1.12.1 and cdrecord 1.8.1.
- If you want to write backups to DVD+R or +RW you also need the
DVD+RW
tools. DVD+RW support has been tested with cdrtools 2.0,
dvd+rw-tools 5.5.4.3.4 and a Ricoh MP5125A drive.
- sendmail or a compatible replacement. CDRW-Taper has been tested
with the sendmail replacement that comes with
qmail and the one that comes with
postfix.
You can download the current version of CDRW-Taper from here:
http://www.tivano.de/software/amanda/cdrw-taper-0.3.tar.gz
3. Installation
- Install Amanda.
- Download the CDRW-Taper and unpack the archive in a temporary
directory.
- Rename the original taper binary that comes with Amanda to e.g.
taper.orig
- Edit the "taperlib.pm" and "amlabel-cdrw" scripts as described below to
reflect your system environment.
- Move the taper perl script to the original location of the Amanda taper
binary and put "taperlib.pm" in the same directory as "taper".
- Put the "amlabel-cdrw" perl script somewhere in your path.
- Change your Amanda config as described below.
4. Configuration
Most of the CDRW-Taper's configuration is done via the standard
Amanda configuration file, but there are some settings such as the
path of mkisofs that don't fit in there. These settings are currently
hard-coded into the taperlib.pm script itself.
Since the PORT-WRITE command is now supported you no longer need to
configure a holding disk. A holdingdisk may still be useful if you have
to backup more than one machine or more than one physical disk (the "spindle"
parameter in Amanda's "disklist"). Without a holding disk Amanda can't do
multiple dumps in parallel.
You can set the writing speed of cdrecord via the environment variable
CDR_SPEED. See the cdrecord manpage for details.
4.1 Hardcoded amlabel-cdrw settings:
Add the directory where "taperlib.pm" can be found to the perl include path:
push @INC, "/usr/lib/amanda";
(Obviously, you have to replace "/usr/lib/amanda" with the correct path on
your system.)
4.2 Hardcoded taperlib.pm settings
- $CONFIG_ROOT
- The directory where your Amanda configurations are stored.
- $DUMP_DIR
- The directory where subdirectories for intermediate storage will be
created.
- $DELETE_DIRS
- Set to 1 if intermediate directories should be deleted after burning them
to disk.
- $WRITE_NON_ERASABLE
- Set to 1 if you want to allow burning directories on non-erasable CDR
media. Warning! In certain cases this can cause the overwriting of an
active disk. Unfortunately, we cannot distinguish the error case of a
DVD+RW that is already mounted and the "error case" of non-erasable media
in the drive.
- $CD_DEVICE_RE
- Regular expression to scan for a CDRW dump device. If the
Amanda config file entry "rawtapedev" does not match this regular
expression, the CDRW-Taper assumes that the device is not a
CDRW drive and executes the original taper binary. If you are
using a standard Linux distibution, you should not need to edit
this.
- $TAPER_ORIG
- The full pathname of the original taper program.
- $BLOCKSIZE
- Block size of output media in bytes (2048 for CDRW).
- $MEDIABLOCKS
- Number of output blocks per media (332800 for a 650 MB CDRW,
2294921 for a 4700 * 10^6B DVD+RW).
When running amlabel-cdrw, amdump, amflush or taper you must have
"mount", "umount", "cdrecord", "mkisofs" and "sendmail" in your $PATH.
If you're using DVD+RW you must also have "dvd+rw-format" and "growisofs"
in your $PATH. Usually these reside in "/bin", "/usr/bin" and "/usr/sbin".
4.3 Required amanda.conf settings
- tapedev
- The CDRW-Taper misuses this entry to specify the directory
where the CDRW can be mounted. Make sure that there is a
corresponding entry in /etc/fstab and that the CDRW can be
mounted by the user running amdump, amflush and amlabel-cdrw.
- rawtapedev
- This entry is used to specify the real CDRW device.
Actually two different device specifications are required here:
- the "dev=" parameter passed to "cdrecord", and
- a device name for mounting the device (an "/etc/fstab" entry must
exist so that the Amanda user can mount the device on the directory
given by the "tapedev" parameter, see above).
Therefore, "rawtapedev" looks like this:
"<mount-device>:<cdrecord-device>" (where <cdrecord-device> may
also contain a colon).
The first part is used to mount the device using the command
"$MOUNT -r <mount-device>". The second part is
passed verbatim to cdrecord; see the dev= parameter in the
cdrecord manpage for an explanation of legal values.
- tapelist
- The location of the "tapelist" file (containing a list of all known
tapes)
- tapecycle, labelstr, logdir, runtapes, tapetype
- As per Amanda documentation.
- tpchanger
- "tpchanger" is optional, of course. The device names returned by the
tapechanger commands must match the specification of "rawtapedev" above.
Please note that tapechanger support in this version of CDRW-Taper is
almost completely untested.
5. Manual operations
Sometimes during a backup the CDRW-Taper may fail to write an intermediate
directory to disk (e. g. when you forget putting the correct media into the
drive...). In that case, an email will be sent to the address(es) given in
the "mailto" configuration parameter, listing all the disk labels that still
need to be burned to disk. To do that the "taper" command can be run manually:
<path>/taper <config> -flush <label> [<label> ...]
This will flush all intermediate directories for the given labels to their
media, provided the corresponding disks are available.
If you're using a "gravity" changer the media with the first listed
label must be the "current" media in the changer. Also, the labels
on the command line must be listed in the same order as the media in the
changer. There must not be any empty slots or other unlisted media in between.
6. Backups to Directories
If you want to run backups into directories only, i. e. without using
any CDR or CDRW media, you must use the following setup:
7. Limitations & known problems
[ t]ivano software gmbh
http://www.tivano.de/
|