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 100Writing an image of a tape to a file does not preserve much more than 101the raw data. 102Block size(s) and tape EOF marks are lost which would 103otherwise be preserved in a tape-to-tape copy. 104.It 105End of data (EOD) is determined by two sequential EOF marks 106with no data between them. 107There used to be old systems which typically wrote three EOF's between tape 108files. 109The 110.Nm 111utility will erroneously stop copying early in this case. 112.It 113When using the copy/verify option 114.Fl c , 115.Nm 116does not rewind the tapes prior to start. 117A rewind is performed 118after writing, prior to the verification stage. 119If one does not start 120at the beginning-of-tape (BOT) then the comparison 121may not be of the intended data. 122.El 123