Skip Headers
Oracle® Secure Backup Reference
Release 10.1

Part Number B14236-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

obcopy

Purpose

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.

Usage Notes

Note the following aspects of obcopy usage:

Syntax

etc/obcopy [ -c ] [ -e ] [ -n cnt ] [ -f ] [ -s ] [ -t ] [ -u ] [ -v ]
       [ -V ] [ -h | ? ] input_device output_device

Semantics

-c

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.

-e

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.

-n cnt

Copies at most cnt files from the source tape.

-f

Defaults to disk file if a device name is not found.

-s

Does not rewind input_dev before starting copy.

-t

Does not rewind input_dev before starting copy.

-u

Uncompresses output even if input is compressed.

-v

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.

-V

Prints the obcopy version.

-h

Prints full help.

input_device

Specifies the device containing tape to be copied from.

output_device

Specifies the device containing tape to be copied to.

Example

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.

Example 5-9 Copying One Tape to Another with obcopy

% obcopy tape1 tape2
3.8 MB in 3 files copied
%