Amanda-Users

Re: Copying data to new tapes

2007-11-12 11:01:53
Subject: Re: Copying data to new tapes
From: Sven Rudolph <Sven_Rudolph AT drewag DOT de>
To: Marc Muehlfeld <Marc.Muehlfeld AT medizinische-genetik DOT de>
Date: Mon, 12 Nov 2007 16:55:44 +0100
Marc Muehlfeld <Marc.Muehlfeld AT medizinische-genetik DOT de> writes:

> Sven Rudolph schrieb:
>> In order to recover you should position the tape manually (with mt),
>> and you must disable amrecover_check_label in amanda.conf (otherwise
>> amrecovr would rewind and see the wrong tape label at the beginning of
>> the tape.
>
> Sounds good. I'll try that. How do I know the filemarks later where
> one tape ends and the new one beginns? Do I have to track this by
> myself on which position which tape is stored?

I create a listing, print it on paper and store it together with the
tape.

        Sven
-----
#!/bin/sh

# list_amanda_tape

usage()
{
        echo "$0 [--blocksize xxk] ntapedev"
}

case $1 in
--blocksize)
        blocksize=$2
        shift; shift
        ;;
--*)    usage >&2
        exit 1
        ;;
esac

TAPE=$1
[ -c "$TAPE" ] ||
{
        usage >&2
        exit 1
}

mt -f $TAPE rewind
n=0

while line="$(dd if=$TAPE bs=32k count=1 2>/dev/null | head -1 )"
do
        [ -n "$line" ] || break
        printf '%03d ' $n
        echo "$line"
        mt -f $TAPE fsf
        n=$((n+1))
done

mt -f $TAPE rewind


<Prev in Thread] Current Thread [Next in Thread>