Summary: Info needed: s/w and h/w for duplicating DAT

From: S.T. Wong (st@hp735c.csc.cuhk.hk)
Date: Fri Sep 01 1995 - 01:07:24 CDT


Hi, thanks to all who responded to my question :

JCarr37863 <jcarr37863@aol.com>
Brendan O'Dea <bod@tyndall.com.au>
Tom Griffing <tom@fohnix.metronet.com>
Joseph B. Gurman <gurman@uvsp.gsfc.nasa.gov>
Wolfgang Denk <wd@denx.muc.de>
JP <jphipps@iadfw.net>
Rob McMahon <cudcv@csv.warwick.ac.uk>
BRUCE WEAVER <100351.3030@compuserve.com>

Original posting:

>I would like to know if there's any software (with hardware) for duplicating
>DAT (and other types of tape) regardless of the format of data on the media.

Seems that dd is the solution other than commercial products, although i've to
determine the block size to use.

Response summary:

=========================================================================
From: jcarr37863@aol.com (JCarr37863)

comar technologies in n.j. sells a duplicating 8mm exabyte taped system.
mirrors the data. 9087574040
Powerstar Inc. UNIX
,SCSI, UPS Technologies
Gaithersburg Maryland
800-209-5556
fax 301-948-0715
=========================================================================
From: "Brendan O'Dea" <bod@tyndall.com.au>

The simplest way would be with the `dd' command which is already on your
machine:

    dd if=<source-tape-drive> of=<dest-tape-drive> bs=<appropriate>

If you only have one tape drive, or want multiple copies [must have
enough disk space]:

    dd if=<source-tape-drive> of=<temp-file-name> bs=<appropriate>
    dd if=<temp-file-name> of=<dest-tape-drive> bs=<appropriate>
    [repeat second command as rqd.]
    rm <temp-file-name>

See dd(1) for more info.

Some of the rqd. info _is_ in the man page, but not all ... some things
such as device names are operating system specific.

For example, on my machine the two tape drives are /dev/rmt/c0d0 and
/dev/rmt/c0d1 - on another machine they could be /dev/rmt0 or /dev/rdat0
or anything: see if you have a scsi_tape(7) or devname(7) page in your
manual.

As to the block size (bs=...), this will depend on the tape you are
using. For fixed-block devices try bs=512 (default), or bs=20b (tar
uses this size). With variable block devices, the block size _must_ be
the same as the one which was used to write the tape ... I can only
suggest you try a few different sizes (start with the two above) and see
if the resulting copy is readable.

Good luck,

-- 
Brendan O'Dea                                         bod@tyndall.com.au
Compusol Pty. Limited                   (NSW, Australia)  +61 2 809 0133

========================================================================= From: tom@fohnix.metronet.com (Tom Griffing)

How about:

$ dd if=/dev/rmt0 bs=1024b | dd of=/dev/rmt1 bs=1024b

This will duplicate the first archive on the tape. To duplicate all possible archives, you'll have to put it into a script with a while loop and use the no-rewind device. Something like:

while [ 1 ] do dd if=/dev/rmt0.1 bs=1024b | dd of=/dev/rmt1.1 bs=1024b done

If you don't have a second tape drive, you'll have to use an intermediate file, but you may need as much disk space as the size of your tape, though.

If you use GNU tar, you can write it to a tape drive on a remote machine like so:

while [ 1 ] do dd if=/dev/rmt0.1 bs=1024b | dd of=RemoteHost:/dev/rmt0.1 bs=1024b done

Hope this helps,

_______________________________________________________________________________ / Thomas L. Griffing tom@metronet.com (214) 352-3441 / / HomePage: http://www.metronet.com:70/9/HomePages/tom/homepage.html / (______________________________________________________________________/

=========================================================================

From: gurman@uvsp.gsfc.nasa.gov (Joseph B. Gurman)

In article <417pdu$gbm@fohnix.metronet.com>, tom@fohnix.metronet.com (Tom Griffing) wrote:

> In article <411taq$js4@eng_ser1.erg.cuhk.hk>, > S.T. Wong <st@hp735c.csc.cuhk.hk> wrote: > >Hi, there, > > > >I would like to know if there's any software (with hardware) for duplicating > >DAT (and other types of tape) regardless of the format of data on the media. > >Would anyone pls advise ? Pls send your advice by email (st-wong@cuhk.edu.hk). > > How about: > > $ dd if=/dev/rmt0 bs=1024b | dd of=/dev/rmt1 bs=1024b > > This will duplicate the first archive on the tape. To duplicate > all possible archives, you'll have to put it into a script with > a while loop and use the no-rewind device. Something like: > > while [ 1 ] > do > dd if=/dev/rmt0.1 bs=1024b | dd of=/dev/rmt1.1 bs=1024b > done > > If you don't have a second tape drive, you'll have to use an > intermediate file, but you may need as much disk space as the > size of your tape, though. > > If you use GNU tar, you can write it to a tape drive on a remote > machine like so: > > while [ 1 ] > do > dd if=/dev/rmt0.1 bs=1024b | dd of=RemoteHost:/dev/rmt0.1 bs=1024b > done

But.... what if the tape was written with bs != 1024, and he wants a real copy of the orignal tape?

Joe Gurman

-- Joseph B. Gurman / NASA Goddard Space Flight Center/ Solar Data Analysis Center / Code 682 / Greenbelt MD 20771 USA / gurman@uvsp.gsfc.nasa.gov | Federal employees are still prohibited from holding opinions while at work. Any opinions expressed herein must therefore be someone else's. |

========================================================================= From: Wolfgang Denk <wd@denx.muc.de>

tom@fohnix.metronet.com (Tom Griffing) writes:

>In article <411taq$js4@eng_ser1.erg.cuhk.hk>, >S.T. Wong <st@hp735c.csc.cuhk.hk> wrote: >>I would like to know if there's any software (with hardware) for duplicating >>DAT (and other types of tape) regardless of the format of data on the media. >>Would anyone pls advise ? Pls send your advice by email (st-wong@cuhk.edu.hk).

>How about:

> $ dd if=/dev/rmt0 bs=1024b | dd of=/dev/rmt1 bs=1024b

Bad.

Is the input tape written using fixed or variable block size? If fixed, which block size? If variable, are all blocks of the same size?

Your method will destroy the original record structure...

Wolfgang

Phone: (+49)-89-95720-110 Fax: (+49)-89-95720-112 wd@denx.muc.de Office: (+49)-89-722-41782 wd@uebemc.siemens.de A princess should not be afraid -- not with a brave knight to protect her. -- McCoy, "Shore Leave", stardate 3025.3

========================================================================= From: JP <jphipps@iadfw.net>

We supply a utility package which handles multiple formats and does a direct backup of any tape. Let me know if you have an interest on details.

========================================================================= From: cudcv@csv.warwick.ac.uk (Rob McMahon)

In article <DDs88G.7Ds@denx.muc.de>, Wolfgang Denk <wd@denx.muc.de> writes: >> $ dd if=/dev/rmt0 bs=1024b | dd of=/dev/rmt1 bs=1024b > >Bad. > >Is the input tape written using fixed or variable block size? If fixed, >which block size? If variable, are all blocks of the same size? > >Your method will destroy the original record structure...

As far as I know `bs' has always preserved the record structure provided 1) it's big enough, and 2) no conversion is specified. From the manual entry:

bs=n Set both input and output block size, superseding ibs and obs. Also, if no conversion is specified, preserve the input block size instead of packing short blocks into the output buffer (this is rly efficient because it reduces in-memory copying).

So whilst the above isn't safe, because the data will get broken up in the pipe, the simpler

dd if=/dev/rmt0 bs=1024b of=/dev/rmt1

is okay.

Rob -- UUCP: ...!mcsun!uknet!warwick!cudcv PHONE: +44 1203 523037 INET: cudcv@csv.warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England

========================================================================= From: BRUCE WEAVER <100351.3030@compuserve.com>

: # Make sure the tape is completely rewound. mt -f /dev/rst0 retension #mt -f /dev/rst0 rewind mt -f /dev/rst0 status

filemark=0 while : do filemark=`expr $filemark + 1` /bin/echo "Working on filemark $filemark" dd if=/dev/nrst0 of=$filemark [ -s $filemark ] || break # break when the filemark is zero bytes done /bin/rm -f $filemark; # remove the zero byte filemark Make sure the tape is completely rewound. mt -f /dev/rst0 rewind

/bin/echo "Done extracting files from the tape distribution." /bin/echo "Please insert your blank backup tape and hit the" /bin/echo "<Return> key. Make sure the tape is not write protected." ## Wait for an enter key. read enter

# Make sure the tape is completely rewound. #mt -f /dev/rst1 rewind filemark=$filemark total=`expr $filemark - 1` # Don't count the zero byte filemark while [ $filemark != $total ] do filemark=`expr $filemark + 1` /bin/echo "Working on filemark $filemark" dd if=$filemark of=/dev/nrst1 done # Make sure the tape is completely rewound upon completion. mt -f /dev/rst1 rewind /bin/echo "Done writing files to the backup tape." /bin/echo "Hit the <Enter> key if you wish to remove the temporary" /bin/echo "files or Del to quit." ## Wait for an Enter key. read enter

while [ $filemark != 0 ] do /bin/echo "Removing filemark $filemark" rm -f $filemark filemark=`expr $filemark - 1` done

# End of savetape

=========================================================================

Thanks again.

Cheers,

-- S.T. Wong | Email: st-wong@cuhk.hk Computer Services Centre | st-wong@cuhk.edu.hk The Chinese University of Hong Kong | Tel. No: (852) 2609 8874 Shatin, N.T., Hong Kong | Fax No: (852) 2603 5001



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:32 CDT