Re: Amanda help


Subject: Re: Amanda help
From: Christopher Swingley (cswingle@iarc.uaf.edu)
Date: Wed Dec 04 2002 - 13:49:37 AKST


Mike,

* Mike Barsalou <mbarsalou@aidea.org> [2002-Dec-04 11:44 AKST]:
> I am trying out Amanda tape program....How do I get it to show me what
> it thinks is on the tape?

I have amanda send me an email when it finishes with the information
from that dump. As far as I know there isn't a way to get amanda to
tell you just what's on a particular tape. It's database is better able
to tell you where to look for backups of a particular partition (using
amadmin info):

  Current info for host /part1:
  Dumps: lev datestmp tape file origK compK secs
          0 20020531 single-10 11 37782070 37782080 13792
          1 20020604 single-11 17 3322320 3322336 1233
          2 20020605 single-11 215 18444180 18444192 7669
          3 20020606 single-12 17 3858820 3858848 1308
          4 20020611 single-14 13 15029400 15029408 1995
          5 20020612 single-16 16 30652860 30652864 4762
          6 20021009 single-28 103 10931860 10931872 1677

What you can do to test a tape is:

    $ mt -f /dev/nrtape rewind
    $ dd if=/dev/nrtape bs=32k count=1
    AMANDA: TAPESTART DATE 20021022 TAPE single-09

At the beginning of a tape, this yields the tape label

    $ dd if=/dev/nrtape bs=32k count=1 skip=1
    AMANDA: FILE 20021022 host /part1/foo lev 1 comp N program /bin/tar
    To restore, position tape at start of file and run:
            dd if=<tape> bs=32k skip=1 | /bin/tar -f... -

After the label, there is a blank record, and then an alternation of
label and data. So the above command skips the blank record after the
tape label, and then displays what data is in the following record. As
the file label states, I could extract this data with:

    $ dd if=/dev/nrtape bs=32k count=1 | tar xf -

or dump the data to a file with:

    $ dd if=/dev/nrtape bs=32k count=1 > host_part1_foo.tar

If I was trying to restore a particular dump (like the level 0
dump listed in the amadmin output above), I'd do:

    $ mt -f /dev/nrtape rewind
    $ mt -f /dev/nrtape fsf 11
    $ dd if=/dev/nrtape bs=32k skip=1 count=1 | tar xf -

        or

    $ dd if=/dev/nrtape bs=32k skip=1 count=1 > host_part1.tar
    $ tar xf host_part1.tar

You can even do fun stuff like:

    other_host:$ ssh host "dd if=/dev/nrtape bs=32k skip=1 count=1" | \
        (cd /part1; tar xf -)

once the tape is in the right spot.

Chris

-- 
Christopher S. Swingley           email: cswingle@iarc.uaf.edu
IARC -- Frontier Program          Please use encryption.  GPG key at:
University of Alaska Fairbanks    www.frontier.iarc.uaf.edu/~cswingle

--------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Wed Dec 04 2002 - 13:49:20 AKST