Use the obcopy tool to copy one tape volume to another. Copying starts at the beginning of the input tape and terminates when the input drive reports blank tape (end of media). It is possible for the volumes to be different media types. For example, you can copy an 8mm tape to a 4mm tape.
Note the following aspects of obcopy usage:
The obcopy utility does not handle volume overflow conditions. Therefore, you are responsible for ensuring that the input volume or the selected portions of the volume fit on the second volume.
By default, the compression mode of the output is the same as the mode of the input, assuming that the output device supports the compression format of the input device. You can use the -c and -u options to force the output to be compressed or uncompressed.
Use the -v option if the input contains a file of with varying internal block sizes.
The obtar utility does not write blocks of different sizes to a single file. On the remote chance that a file to be copied does contain varying block sizes, however, obcopy provides the -v option to accommodate such unusual circumstances.
For both copy and verify operations, obcopy rewinds tapes before starting unless -s or -t is specified. Final disposition depends on whether the rewind or no rewind versions of the drives are being used.
etc/obcopy [ -c ] [ -e ] [ -n cnt ] [ -f ] [ -s ] [ -t ] [ -u ] [ -v ] [ -V ] [ -h | ? ] input_device output_device
Compresses output even if input is not compressed. If the output device does not support compression, obcopy issues a warning and does not compress the output.
Performs a byte-by-byte comparison of the contents of the input and output tapes to determine whether the data is the same. No copy is performed.
Copies at most cnt files from the source tape.
Defaults to disk file if a device name is not found.
Does not rewind input_dev before starting copy.
Does not rewind input_dev before starting copy.
Uncompresses output even if input is compressed.
Specifies an input file with varying internal block sizes. Normally, obcopy redetermines the block size after reading a filemark. In other words, obcopy assumes that all blocks in a file (the data between two filemarks) are the same size. Specify -v only if the block size changes between files.
Prints the obcopy version.
Prints full help.
Specifies the device containing tape to be copied from.
Specifies the device containing tape to be copied to.
Example 5-8 uses obtool to show that library lib1 has a tape containing data loaded in its drive and library lib2 has a blank tape loaded in its drive.
Example 5-8 Displaying Volumes in Two Libraries
ob> lsdev
library lib1 in service
drive 1 tape1 in service
library lib2 in service
drive 1 tape2 in service
ob> lsvol --library lib1 --long
Inventory of library lib1:
in mte: vacant
in 1: volume RMAN-DEFAULT-000002, barcode ADE202, oid 111, 8087104 kb remaining,
content manages reuse
in 2: volume VOL000002, barcode ADE201, oid 108, 8029472 kb remaining
in 3: vacant
in 4: vacant
in dte: volume VOL000003, barcode ADE203, oid 114, 8083360 kb remaining, lastse 4
ob> lsvol --library lib2 --long
Inventory of library lib2:
in mte: vacant
in 1: volume VOL000004, barcode DEV423, oid 118, 8079520 kb remaining
in 2: volume RMAN-DEFAULT-000003, barcode DEV424, oid 120, 8078656 kb remaining,
content manages reuse
in 3: vacant
in 4: vacant
in iee1: vacant
in iee2: vacant
in iee3: vacant
in dte: unlabeled, barcode DEV425, oid 121, lastse 3
ob> quit
Example 5-9 uses obcopy to copy the data from the tape in the tape1 drive to the tape in the tape2 drive.