Tar file on multiple tapes

Vadim G. Antonov avg at hq.demos.su
Mon Oct 8 02:06:05 AEST 1990


In article <1990Oct6.235203.24093 at uokmax.ecn.uoknor.edu> jay at alliant.backbone.uoknor.edu (Jay Liang) writes:
>Is it possible to tar a single huge file on multiple tapes as dump
>would do to handle file systems that are bigger than the tape
>capacity?


If your local tar does not support multi-tape feature (RTFM),
you could write something like (Bourne shell):

tar cf - your_files | while true
do echo -n "Mount the (next) tape (type CR of ^C to quit):"
   gets < /dev/tty
   dd of=/dev/TAPE bs=20b count=SIZE
done

where TAPE is the name of RAW tape device and SIZE is the
size of tape in 10K records.

If you have no (very useful) gets, the source follows:

main()
{
	char c;

	while( read(0, &c, 1) != 1 ) {
		write(1, &c, 1);
		if( c == '\n' )
			exit(0);
	}
	exit(1);
}

(Hmmm... try to guess why I use read/write instead of getc/putc :-).

	Vadim Antonov
	DEMOS, Moscow, USSR



More information about the Comp.unix.questions mailing list