How To:Split Dumps Across Tapes (Amanda-3.1 and earlier)

From wiki.zmanda.com
Jump to navigation Jump to search

Amanda tape-spanning support is an new feature in the 2.5.0 release, enabling single dump files to be strung across multiple tapes. This permits you to have Disk List Entries (DLEs) larger than any single tape you may have, as well making more efficient use of tape space under certain circumstances.

It works by splitting a large dump file into smaller chunks of a configurable size before writing to tape, allowing AMANDA to regard each individual piece as a dump file in its own right and following "tape full" semantics as it would a normal dump.

Quick and Dirty HOWTO

amanda.conf changes

In the dumptype section of your amanda.conf, create an entry akin to the following:

define dumptype user-tar-span {
    root-tar
    tape_splitsize 2 Gb
    comment "tape-spanning user partitions dumped with tar"
}

A reasonable rule of thumb for the tape_splitsize value is 1/10 of the size of one tape.

Also note that the value of "runtapes" in amanda.conf must be greater than 1.

disklist configuration file changes

Now, in your disklist file, just invoke that dumptype:

nutdumpling /export/home/building/amanda/dumpdata user-tar-span

For more extensive description of configuration options, see the page on amanda.conf, specifically the runtapes, tape_splitsize, fallback_splitsize, and split_diskbuffer options.

Restoring

amfetchdump

This utility was written specifically to restore spanning dumps from the command line. It is also useful in general, as a "smart" amrestore which knows how to locate dumps and manage tape changers on its own. See the manual page for a complete description of options and behavior.

Usage: amfetchdump [options] config hostname [diskname [datestamp [level ... ]]]

amrestore

You can, technically, use amrestore to restore each individual "split chunk" of a spanning dump (they are, after all effectively just regular AMANDA dumps with strange incomplete data in them). However, amrestore has no capability +for reassembling split dumps. Should you be in a pinch, you can still use it to restore each individual piece, then do something akin to:

for i in `ls -1 my_host.my_dle.20021231.0.*`; do dd if=$i >> wholedump.0; done

but this assumes amrestore has stripped off amanda headers. If not, try adding bs=32k skip=1 to that invocation of dd. This is also useful if you're restoring "bare metal," pulling images straight from tape with no AMANDA utilities.

amrecover

Amrecover understands tape spanning, and should not require any more work than any other multi-tape restore. You can mix and match old and new clients, though an old server doesn't understand split dumps.