Managing File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

How to Copy Files to a Remote Tape Device (tar and dd)

  1. Configure ssh on the remote system so that you can access the tape drive. See Configuring Secure Shell (Tasks) in Managing Secure Shell Access in Oracle Solaris 11.2 .
  2. Change to the directory where you want to put the files.
  3. Insert the tape into the tape drive.
  4. Copy the files to a remote tape drive.
    $ tar cvf - filenames | ssh remote-host dd of=/dev/rmt/n obs=block-size
    tar cf

    Creates a tape archive, lists the files as they are archived, and specifies the tape device.

    v

    Provides additional information about the tar file entries.

    - (Hyphen)

    Represents a placeholder for the tape device.

    filenames

    Identifies the files to be copied. Separate multiple files with spaces.

    ssh | remote-host

    Pipes the tar command's output to a remote system.

    dd of= /dev/rmt/n

    Represents the output device.

    obs=block-size

    Represents the blocking factor.

  5. Remove the tape from the drive. Write the names of the files on the tape label.
Example 4-10  Copying Files to a Remote Tape Drive (tar and dd)
# tar cvf - * | ssh mercury dd of=/dev/rmt/0 obs=126b
password:
a answers/ 0 tape blocks
a answers/test129 1 tape blocks
a sc.directives/ 0 tape blocks
a sc.directives/sc.190089 1 tape blocks
a tests/ 0 tape blocks
a tests/test131 1 tape blocks
6+9 records in
0+1 records out