Re: Copying from one tape to another tape
2003-09-19 14:49:21
On Thu, Sep 18, 2003 at 03:54:27PM -0700, Joshua D. Bello wrote:
> I am attempting to copy from one tape to another using dd, and getting
> the following results:
>
> [15:37:44]root@anubis:/local0/tmp# dd bs=32k if=/dev/rsa1 of=/dev/rsa0
> 1+0 records in
> 1+0 records out
> 32768 bytes transferred in 1.628442 secs (20122 bytes/sec)
>
> The return is instantaneous, and obviously this copy is not working. I
> no longer have the amanda logs or index files for this tape.
You're really close! Amanda stores multiple files on the tape; so far
you've only copied the first file (the tape label). Assuming that
your no-rewind devices are /dev/nrsa1 & /dev/nrsa0, something like
this should work better:
#!/bin/sh
mt -f /dev/nrsa1 rewind
mt -f /dev/nrsa0 rewind
filenum=0
while true ; do
echo copying tape file number $filenum
dd bs=32k if=/dev/nrsa1 of=/dev/nrsa0 || exit
filenum=`expr $filenum + 1`
done
I assume dd will return fail status when /dev/nrsa1 hits EOM, but
I've not tested that; keep an eye on it. IIRC, your total number
of files should be #DLEs + 2.
--
Jay Lessert jay_lessert AT accelerant DOT net
Accelerant Networks Inc. (voice)1.503.439.3461
Beaverton OR, USA (fax)1.503.466.9472
|
|
|