Tips on using tar for tape backup

(Perpetually Under Construction)

The exabyte drive attached to node *hess* has device designation

/dev/rmt/0

The DAT drive attached to node *love* has device designation

/dev/rmt/0

The DAT drive attached to node *gilbert* has device designation

/dev/rmt/0

In the following, we refer to the exabyte drive, but using the DAT drive is pretty much the same.

If you want to move a tape forward and *not* rewind, you must address the exabyte device as

/dev/rmt/1n

As far as I know, our exabyte drive writes 2.2 Gb per tape.

to check the status of a tape in the drive (e.g. file number), try

mt -f /dev/rmt/1n status

--> the "n" at end of device designator is critical!

To write a tar file on a tape that has k other tarfiles written on it, skip these k tarfiles with

mt -f /dev/rmt/1n fsf k

--> where k=# of files on tape

OR -->

mt -f /dev/rmt/1n eom

--> Space to the end of recorded media on the tape.

tar cvf /dev/rmt/1 [directory(ies) and/or filename(s)]

--> to rewind tape after write

tar cvf /dev/rmt/1 -I files_to_tar

--> read files to archived from file files_to_tar
--> will rewind tape after write

tar cvf /dev/rmt/1n [directory(ies) and/or filename(s)]

--> to keep tape positioned for another write

mt -f /dev/rmt/1 offline

--> Rewind tape and eject from drive.

To read the kth tar file from on a tape, try

mt -f /dev/rmt/1n fsf k-1

--> where k=# of file to access

tar xvf /dev/rmt/1 [directory(ies) and/or filename(s)]

--> will rewind tape after read

tar xvf /dev/rmt/1n [directory(ies) and/or filename(s)]

--> will keep tape positioned for another read

Optional:

tar tvf /dev/rmt/1n [directory(ies) and/or filenames]

--> will read filenames from tarfile, so that you be sure what you are reading.

mt -f /dev/rmt/1 offline

--> Rewind tape and eject from drive.

JPark group needs to keep track of backups on /home/park /home/vadim (both on dana's /export/home), /data/d4 /data/d7 /data/d8 /data/k3 /data/k4 /data/g1 /data/usr4. Contents of old tarfiles, as of 7/24/97, are kept in /home/park/Backup

back to seismology roadmap