[comp.sys.ibm.pc.rt] Determining Density and Cluster Size for Tape Backup

jjr@ut-emx.UUCP (09/01/89)

I use "cat list | backup -i -f$DEVICE -d$DENSITY -C$CLUSTER"
to backup files to a streaming tape cartridge.
What are the appropriate values for $DEVICE, $DENSITY, and $CLUSTER?
I have been using $DEVICE = /dev/rmt8, $DENSITY = 700 bytes per inch
(default value), and $CLUSTER = 2000 blocks.

I use a 3M DC 300 XL/P data cartridge (450 feet, 6400 to 10000 ftpi, 310
oersted tape).  What does "ftpi" represent, and how does that relate 
to the number of bytes per inch?  Is 2000 the best cluster size?
Is /dev/rmt8 the correct device?  Any help would be much appreciated.

			jjr@emx.utexas.edu

pete@bally.Bally.COM (Pete Gregory) (09/14/89)

In article <17911@ut-emx.UUCP>, jjr@ut-emx.UUCP writes:
> I use "cat list | backup -i -f$DEVICE -d$DENSITY -C$CLUSTER"
> to backup files to a streaming tape cartridge.
> What are the appropriate values for $DEVICE, $DENSITY, and $CLUSTER?
> I have been using $DEVICE = /dev/rmt8, $DENSITY = 700 bytes per inch
> (default value), and $CLUSTER = 2000 blocks.
> 
> I use a 3M DC 300 XL/P data cartridge (450 feet, 6400 to 10000 ftpi, 310
> oersted tape).  What does "ftpi" represent, and how does that relate 
> to the number of bytes per inch?  Is 2000 the best cluster size?
> Is /dev/rmt8 the correct device?  Any help would be much appreciated.

Why not use cpio?  We have had great success using HUGE buffers, huge enough
that we REALLY stream the drive (it never stops).

example (to backup /usr/ filesystem):

------- snip ------- snip ------- snip ------- snip ------- snip -------

#!/bin/sh
#
# backusr  -  backup /usr filesystem
#

FILE=/usr/local/bin/Busr
echo "Backup listing will be written to $FILE"
cd /usr
cp /dev/null $FILE
echo "/usr filesystem backup for..." > $FILE
date >> $FILE
nice find . -print | grep -v "./spool/news" | cpio -ovC1000 >/dev/rmt0 2>>$FILE
echo "backup complete at..." >> $FILE
date >> $FILE
echo "backup complete"

------- snip ------- snip ------- snip ------- snip ------- snip -------

...explanations: 

	cd /usr
 	...
	find . -print		- lists all files in /usr filesystem.

	grep -v "./spool/news"	- discard news files (too much to backup  :-[

	cpio -ovC1000		- cpio; 'o' option means backup (vs. restore)
				  'v' options means verbose
				  'C1000' = 1000 BLOCK buffer (512000 bytes)

	>/dev/rmt0		- write to tape drive.  may be different on
				  your system.

	2>>$FILE		- list of files backed up is save to disk.

Pete Gregory   | uucp:   uunet!bally!pete     |      ________   "My boss
Bally Systems  | domain: pete@bally.bally.com | |\ /          \   is
255 Bell St.   | phone:  702-323-6156 x882    | | X   IXOYE    )   a
Reno, NV 89503 | FAX:    702-323-5997         | |/ \ ________ /     carpenter."

karish@forel.stanford.edu (Chuck Karish) (09/14/89)

In article <186@bally.Bally.COM> pete@bally.Bally.COM (Pete Gregory) wrote:
>In article <17911@ut-emx.UUCP>, jjr@ut-emx.UUCP writes:
>> I use "cat list | backup -i -f$DEVICE -d$DENSITY -C$CLUSTER"
>> to backup files to a streaming tape cartridge.
>> What are the appropriate values for $DEVICE, $DENSITY, and $CLUSTER?
>> I have been using $DEVICE = /dev/rmt8, $DENSITY = 700 bytes per inch
>> (default value), and $CLUSTER = 2000 blocks.

/dev/rmt8 pre-tensions the tape, doesn't it?  You probably don't need this if
you re-use your tapes every few weeks.  I usually use /dev/rmt0.

>Why not use cpio?

If your system gets trashed, you can re-install it from the standalone
diskette if it's a backup archive.  The standalone system doesn't
include cpio.  Read the manual for limitations.

Beyond that, the choice of archive format ia a matter of personal
preference, usually based on the user interface.  IBM people tend
to use backup for everything, BSD partisans use tar, USG users
favor cpio.

>We have had great success using HUGE buffers, huge enough
>that we REALLY stream the drive (it never stops).

Different utilities have different limitations on the maximum buffer
size.  Tar re-sets it to 800 blocks when I ask for more.  The
documentation is unclear, however, as to whether those are 512-byte
blocks or 10Kb blocks, the default blocking factor for tar.

I'll repeat my call for a generic tape-handling program that understands
clusters.  The manuals don't give enough information to enable me
to write one myself.  The worst limitation now is that dd doesn't
understand clusters, so I can't use the drive efficiently to do
a backup over the network with a command like

	tar cfb - 1 directories | rsh remotehost dd obs=20 > /dev/rmt0

What's needed is a program that would fit into the pipeline after dd
and do the block/cluster management, like the `tcio' program that
HP provides for their drives.

	Chuck Karish		karish@mindcraft.com
	(415) 493-9000		karish@forel.stanford.edu