xref: /freebsd/usr.bin/tcopy/tcopy.1 (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1.\" Copyright (c) 1985, 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd December 20, 2006
29.Dt TCOPY 1
30.Os
31.Sh NAME
32.Nm tcopy
33.Nd copy and/or verify mag tapes
34.Sh SYNOPSIS
35.Nm
36.Op Fl cvx
37.Op Fl s Ar maxblk
38.Oo Ar src Op Ar dest
39.Oc
40.Sh DESCRIPTION
41The
42.Nm
43utility is designed to copy magnetic tapes.
44The only assumption made
45about the tape layout is that there are two sequential EOF marks
46at the end.
47By default, the
48.Nm
49utility will print
50information about the sizes of records and files found
51on the
52.Pa /dev/sa0
53tape, or on the tape specified by the
54.Ar src
55argument.
56If a destination tape is also specified by the
57.Ar dest
58argument, a copy of the source tape will be made.
59The blocking on the
60destination tape will be identical to that used on the source tape.
61Copying
62a tape will yield the same program output as if just printing the sizes.
63.Pp
64The following options are available:
65.Bl -tag -width ".Fl s Ar maxblk"
66.It Fl c
67Copy
68.Ar src
69to
70.Ar dest
71and then verify that the two tapes are identical.
72.It Fl s Ar maxblk
73Specify a maximum block size,
74.Ar maxblk .
75.It Fl v
76Given the two tapes
77.Ar src
78and
79.Ar dest ,
80verify that they are identical.
81.It Fl x
82Output all informational messages to the standard error
83instead of the standard output.
84This option is useful when
85.Ar dest
86is given as
87.Pa /dev/stdout .
88.El
89.Sh SEE ALSO
90.Xr mt 1 ,
91.Xr mtio 4
92.Sh HISTORY
93The
94.Nm
95command appeared in
96.Bx 4.3 .
97.Sh BUGS
98.Bl -item
99.It
100Modern tape drives may return a SCSI "Incorrect Length Indicator (ILI)"
101for each read with a different block size that what is on the
102tape, and that slows things down a lot.
103This can be disabled with the
104.Xr mt 1
105command:
106.Bd -literal -offset indent
107$ mt param sili -s 1
108.Ed
109.It
110Writing an image of a tape to a file does not preserve much more than
111the raw data.
112Block size(s) and tape EOF marks are lost which would
113otherwise be preserved in a tape-to-tape copy.
114.It
115End of data (EOD) is determined by two sequential EOF marks
116with no data between them.
117There used to be old systems which typically wrote three EOF's between tape
118files.
119The
120.Nm
121utility will erroneously stop copying early in this case.
122.It
123When using the copy/verify option
124.Fl c ,
125.Nm
126does not rewind the tapes prior to start.
127A rewind is performed
128after writing, prior to the verification stage.
129If one does not start
130at the beginning-of-tape (BOT) then the comparison
131may not be of the intended data.
132.El
133