Content-type: text/html Manpage of duptape

duptape

Section: User Commands (1)
Updated: 31 January 1992
Index  

NAME

duptape, recordio - copy tapes, preserving record boundaries  

SYNOPSIS

duptape [ -b bufsize ] [ -n neof ] [ -z ] [-v] [-V] fromtape totape

recordio [ -r|-w ] [ -b bufsize ] [ -n neof ] [ -z ] [ -v ] [ -V ]  

DESCRIPTION

Duptape copies one or more files from one tape to another, preserving record lengths. The tape drives can reside on different machines. Alternatively, you can copy from tape to disk and later back to tape. Duptape is a script that uses recordio to do the actual copying.

Each of fromtape and totape is either a remote tape drive of the form:

[username@]hostname:tapedevice

or a local tape drive (containing no `:' characters).

Example A: Local copy:

% duptape /dev/nrst0 /dev/nrst2        

Example B: Copy from local tape drive to remote host:

% duptape /dev/nrst0 somehost:/dev/nrst2

An EOF is written after each file copied, except the last file. This is because many (most?) device drivers will write an EOF when the drive is closed. If your driver doesn't add an EOF, you'll have to explicitly add the final EOF by hand (e.g. "mt weof").

If you wish to copy a tape from somewhere other than its beginning, simply position the tape to the desired starting location before invoking duptape.

The recordio program is used as follows:

recordio -r
reads a tape from stdin, and writes each record length plus data to stdout.
recordio -w
reads the length-prefixed records from stdin, and writes the records to a tape on stdout.

A tape can be copied to disk, then back to tape, by using

% recordio -r < tape > diskfile
% recordio -w < diskfile > tape
 

OPTIONS

The following are options for duptape and recordio -r:
-b bufsize
Set the copy buffer size. Default is 32KB. Must be at least as great as the longest record. Beware: many tape drivers enforce an upper bound on the value of bufsize, even if the length of the actual records on tape are much smaller.
-n neof
Read through neof filemarks. The default is to read through the first double-EOF. Note that the end of data on an Exabyte tape will act like a double EOF.
-z
Don't copy zero-length files (that is, only write one EOF when there are several EOF's in a row in the input tape).

The following are options for all commands:

-v,-V
Verbose mode. Writes number of EOF's to stderr. Recordio -w is distinguished from Recordio -r by indenting its verbose output with a tab. The option -V causes the bufsize and each record length to also be written.

Recordio -w doesn't have a -b option because the buffersize is passed by recordio -r to recordio -w.  

NOTES

*
When copying on remote host(s), duptape uses ssh by default; thus, you must be able to execute commands on the remote hosts. You can override this with the environment variable DUPTAPE_RSH. Of course, recordio must also exist on both hosts.
 

AUTHOR

Will Deich
will@ucolick.org


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
NOTES
AUTHOR