Amanda CDRW-Taper - Installation & Usage
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
CDRW-Taper has been tested with mkisofs 1.12.1 and cdrecord 1.8.1.
- If you want to write backups to DVD+R/+RW or DVD-R/-RW you also need the
tools. DVD+RW support has been tested with cdrtools 2.0,
dvd+rw-tools 126.96.36.199.8, a Ricoh MP5125A drive and a NEC ND-1300A 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
You can download the current version of CDRW-Taper from here:
- Install Amanda.
- Download the CDRW-Taper and unpack the archive in a temporary
- Rename the original taper binary that comes with Amanda to e.g.
- 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.
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
4.2 Hardcoded taperlib.pm settings
- The directory where your Amanda configurations are stored.
- The directory where subdirectories for intermediate storage will be
- Set to 1 if intermediate directories should be deleted after burning them
- Set to 1 if you want to allow burning directories on non-erasable CDR,
DVD+R or DVD-R media.
- 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
- The full pathname of the original taper program.
- Block size of output media in bytes (2048 for CDRW).
- Number of output blocks per media (332800 for a 650 MB CDRW,
2294921 for a 4700 * 10^6B DVD). As of version 0.4 the taper will try
to determine the capacity of the media in the drive using the
"cdrecord -atip" (and optionally "dvd+rw-mediainfo") tool. In that case,
$MEDIABLOCKS will be used as a fallback value.
Please remember that you have to change the tapetype in "amanda.conf" if
you modify this value! (The tapetype.length in "amanda.conf" tells amanda
how many bytes to send to the taper. $MEDIABLOCKS tells the taper how
many blocks to write on the given media. These values should be
roughly the same.)
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 or DVD-RW you must also have "dvd+rw-format",
"dvd+rw-mediainfo" and "growisofs" in your $PATH. Usually these reside in
"/bin", "/usr/bin" and "/usr/sbin".
4.3 Required amanda.conf settings
- 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.
- This entry is used to specify the real CDRW device.
Actually two different device specifications are required here:
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.
- 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).
- The location of the "tapelist" file (containing a list of all known
- tapecycle, labelstr, logdir, runtapes, tapetype
- As per Amanda documentation.
- "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
8. Acknowledgements & Thanks to
- Tim Writer <email@example.com>
[ t]ivano software gmbh