vicker313 tech blog

June 23, 2009

Remote access tape drive in another HPUX server

Filed under: HPUX — Tags: , , , , , — vicker313 @ 10:41 pm

Below is a list of TAR and CPIO command integrated with REMSH command in order to remote access tape drive in another HPUX server. Refer Tar and Untar tape drive in another HPUX server to setup the server before try the commands below.

  • CPIO into tape: find /dir/or/files/to/cpio -print | cpio -oacvB | remsh OLDSERVER 'dd of=/dev/rmt/0m bs=64b'
  • Verify CPIO tape: remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (cpio -itcvB)
  • CPIO from tape: remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (cpio -iacvBdum)
  • TAR into tape: (tar -cvfb - 64 /dir/or/files/to/tar) | remsh OLDSERVER 'dd of=/dev/rmt/0m bs=64b'
  • Verify TAR tape: remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (tar -tvfb - 64)
  • UNTAR from tape: remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (tar -xvpfb - 64)

May 29, 2009

Tar and Untar tape drive in another HPUX server

Filed under: HPUX — Tags: , , , , — vicker313 @ 10:46 pm

There is situation when you have a new HPUX server and then you need to access the old tape that is not supported on the new tape drive. If there is extra SCSI port on the server, definitely you can move the old tape drive to the new server. But when there is no extra SCSI port and you don’t want to buy extra SCSI card, or the old tape drive is needed to be attached to the old server, you still can access the old tape drive using “remsh” command.

We assume the new server’s host name is newserver, while the old server’s host name is oldserver:

  1. Decide a user login to be used to access the old tape drive, let’s said james.
  2. Ensure that both servers have that particular user login (with same password).
  3. Add the host names of both servers into both hosts file (/etc/hosts), for example:
    192.168.0.1 oldserver
    192.168.0.2 newserver
  4. At old server, create or edit the .rhosts file at the home directory of that particular user by adding the following line:
    newserver james
  5. To untar files from old tape drive on old server, use this command:
    remsh oldserver dd if=/dev/rmt/0m bs=64b|(cd /location/to/untar;tar -xvpfb - 64)
  6. While to tar files into the old tape drive, use this command:
    tar -cvpfb - 64|remsh oldserver dd of=/dev/rmt/0m bs=64b

Refer Remote access tape drive in another HPUX server for extra commands.

Blog at WordPress.com.