{mosimage}

In this scenario, we need to backup a solaris server using the ufsdump command. However, we do not have a SCSI tape drive connected, nor are we allowed to attach one(it's a live server!).

Instead, we do have a tape drive on a remote AIX server which has TCP/IP connectivity.

How can we ufsdump to that tape drive?

 

We can set up a named pipe to an ssh session through which we can write to the remote tape drive using the dd command.

With a tape in our target drive, on our Solaris server we do the following: –

 

  1. mknod /tmp/pipe p
  2. cat /tmp/pipe | ssh user@server "dd of=/dev/rmt0.1 bs=64b"
  3. Enter your ssh password when prompted.
  4. CTRL-z
  5. bg %1
  6. ufsdump 0uf – /dev/rdsk/slice > /tmp/pipe

"user" is your username on the remote (AIX) server.
"server" is the hostname or IP address of the remote (AIX) server.
"slice" is the slice you want to back up.

Note we are using /dev/rmt0.1, which is the AIX device name for the tape drive without rewind. This is so we can repeat from step 2 for each slice we want to backup.

Ensure that the previous backgrounded pipe is terminated before starting the next.

Now if, for example, we want to take this tape from the AIX tape drive and restore it's contents to a Solaris server that *did* have a tape drive attached to it, we could use the following command: –

 

  • cd /targetdir
  • mt rewind
  • mt fsf 1
  • dd if=/dev/rmt/0 bs=64b | ufsrestore rvbf 2 –

"targetdir" is the directory where we want to restore the data.

We would repeat this for however many slices were backed up to the tape, moving forward to each dump file using the mt fsf command. e.g. to move to the 3rd dump file on the tape do "mt fsf 3".

 

About troyski

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation