Discussion Locked

Unix backup

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We have 2 servers and one tape device. I am trying to share the tape without phically disconnecting it. So, lets say that the tape device is connected to server A and I want to backup the contents on Server B to the tape drive, does anyone know howto accomplish that? What command can I use to backup data to the drive?

Thanks
Richard

2 replies

by stillatit

There are two easy ways to do it:

1. Share the drives of the box without the tape drive via nfs, and have the box with the tape drive back up that path.

2. Use the rsh, cpio, and dd commands as shown below:

This backs up one AIX machine to another:

Variables are:
hostbox is the name of the box with the tape drive
tape is the tape device name
block is the blocking factor on the tape

find / -fstype jfs -xdev -print > /tmp/backup/v2.org
cat /tmp/backup/v2.org | cpio -oc | rsh $hostbox "dd of=$tape obs=$block"

The find command builds a list of files to back up. The cat command pipes this list to the cpio command which makes an archive and pipes the archive via the remote shell (rsh) command to another box (hostbox) wherethe dd command puts the data on tape.

To read the tape directory back:

rsh $hostbox "dd if=$tape ibs=$block | cpio -ict > /tmp/backup/v14v2.tape"
rcp $hostbox:/tmp/backup/v14v2.tape /tmp/backup/v2.tape

This executes a remote shell to run the dd command to read the tape and pipe the contents to cpio, asking for a tape index, which is then remote copied to the requesting box.

Good luck.

by rgooding

Thanks for the response. I am not a unix an expert in unix and was wondering what the Blocking factor was and how do I know what it is for the tape device.

Thanks
Richard

This discussion is closed to new replies.