[net.unix-wizards] how universal is tar format? SYSV?

reid@su-glacier.ARPA (Brian Reid) (03/20/85)

Can SYS-V systems with cpio reliably read tar tapes produced by 4.2BSD?
If not, is there an interchange format besides dd that is guaranteed to
be universally readable by any Unix system with a suitable tape drive?
	Brian Reid	decwrl!glacier!reid
	Stanford	reid@SU-Glacier.ARPA

gwyn@BRL-VLD.ARPA (VLD/VMB) (03/20/85)

UNIX System V has a "tar" and a "cpio";
4.2BSD just has "tar".  The "tar"s aren't completely
compatible but for inter-UNIX tape transfer that's
probably your best bet.

root@bu-cs.UUCP (Barry Shein) (03/21/85)

We have a 3B5 running SYSV and and 4.2bsd VAXen. Yes, tar is
compatible between these two (in spite of things that *might*
have broken it.)

Unfortunately, it seems that our SYSV tar won't read tar
tapes created on 4.2bsd with a blocking factor >10 so
be warned. (I also swear that twice when I was writing
tar tapes to our TU78 on our VAX with blocking factor of
one it tripped the circuit breaker in the tape drive!!)

As for cpio, all I know is that the standard cpio format
VAX SYSV source release from AT&T would *not* read off
on our 3B5, no matter what combination of byte/word swap
etc (-B) flags was tried. Not having cpio (it was on the
#@!#@ tape!) I wrote a trivial program I call 'cpi' that
will suck off a range of files from a cpio tape and create
all necessary directories etc as expected (won't write a tape.)
If anyone wants it it's a hack (only needed it till I got
cpio.c off) but hey, it's <100 lines of C, you can clean
it up yourself, and it works, just ask.

	-Barry Shein, Boston University

rrw@ccice2.UUCP (Rick Wessman) (03/21/85)

> UNIX System V has a "tar" and a "cpio";
> 4.2BSD just has "tar".  The "tar"s aren't completely
> compatible but for inter-UNIX tape transfer that's
> probably your best bet.

As far using "tar" goes, there should be no problem. We transfer
files all the time between our sys3/sys5 compatible machine and our
4.2 Vax. The incompatibility arises when an option unique to one
version is used.

			Rick

todd@bu-cs.UUCP (Todd Cooper) (03/22/85)

I had some problems, but it seems to be a "bit" compatible, most of
my problems were file system differences.
-- 
---------------------------
Todd Cooper
(617) 424-9018

UUCP:	...!harvard!bu-cs!todd
ARPA:	todd%bu-cs.csnet@csnet-relay.arpa

ed@mtxinu.UUCP (Ed Gould) (03/26/85)

> Can SYS-V systems with cpio reliably read tar tapes produced by 4.2BSD?
> If not, is there an interchange format besides dd that is guaranteed to
> be universally readable by any Unix system with a suitable tape drive?
> 	Brian Reid	decwrl!glacier!reid
> 	Stanford	reid@SU-Glacier.ARPA

System V machines that *have* tar can read 4.2 tapes, but not all of them
have tar.  Right now, there is no reliable interchange other than the
brute force use off dd and human intervention.

The /usr/group standards comittee (now an IEEE group) has suggested
that tar be adopted as the standard interchange.  If this actually
becomes the standard, then I assume (from all of their recent hype
about being standard) that they'll add tar back into SysV.

-- 
Ed Gould		    mt Xinu, 739 Allston Way, Berkeley, CA  94710  USA
{ucbvax,decvax}!mtxinu!ed   +1 415 644 0146

root%bostonu.csnet@csnet-relay.arpa (BostonU SysMgr) (03/27/85)

Sorry, but I keep getting these mailings from people that *they* were
able to read/write a cpio tape between UNIXes [usually saying that they
had to use some flag or another to create the tape.]

The *point* is not whether or not one can create a tape, given the
correct parameters (eg. -c) that is portable.  The point was that I was
unable to read the AT&T SYSV VAX source distribution tape on my 3B5 no
matter what switches I fed it. Obviously I had no opportunity to specify
how they wrote the tape.

The only problem I have had with tar is large blocks, hopefully this is
the kind of knowledge that is easier to disseminate (don't write tar
tapes with blocking factors bigger than about 5). The various word/byte
swap problems on the cpio tapes (which the switches that claim to handle
do !not!) are quite obscure to 'users'.

Sum: If a user came to me and said "I need to send a tape of files to a
friend on some UNIX systems what should I use?"  I would recommend:

	cd directory
	tar cbf 5 /dev/rmt0 .	! or whatever tape device

and be about 99% sure my phone wouldn't ring again.  I have no such
confidence in cpio (anymore.)  As a robustness note, even tho UCB puts
directory names on the tape SYSV just grumbles and ignores and finishes
fine.  Conversely, given a tape to read on a new system I would budget
more time if it were a cpio tape.

	-Barry Shein, Boston University

piet@mcvax.UUCP (Piet Beertema) (03/28/85)

	>The only problem I have had with tar is large blocks
3B machines can't read tape blocks larger than 8K. So carefully choose the
blocking factor when making a tar taoe for such machines.

-- 
	Piet Beertema, CWI, Amsterdam
	...{seismo,okstate,garfield,decvax,philabs}!mcvax!piet

guy@rlgvax.UUCP (Guy Harris) (04/01/85)

> System V machines that *have* tar can read 4.2 tapes, but not all of them
> have tar. ... then I assume ... that they'll add tar back into SysV.

The VAX distribution of System V Release 2, both Versions 1 and 2, comes with
"tar".  In fact, it has a new "-o" flag (conflicting with Berkeley's, alas)
which tells "tar" not to give files to the owner from the tape.  A damn
good idea, considering user 45 at the site that made the tape might not be
the same user as user 45 here...

	Guy Harris
	sun!guy (ignore all other addresses in this message)

clewis@mnetor.UUCP (Chris Lewis) (04/08/85)

I have found one incompatibility - Plexus machines output swapped bytes.
We received a Plexus-generated tar tape and had to do a dd swapb to be able
to read it.  We complained to the originator (wasn't plexus) and they
said it was a natural consequence of byte order.  That's crap - Our
Pyramid is backwards from a VAX and we don't have any problem.  They
just never realized that the Plexus tar should swap bytes to remain
compatible with the rest of the world (I suspect that it was a wierd
tape driver/hardware configuration)	
-- 
Chris Lewis, Motorola New Enterprises
UUCP: {allegra, linus, ihnp4}!utzoo!utcs!mnetor!clewis
BELL: (416)-475-1300 ext. 321

wunder@wdl1.UUCP (04/11/85)

When moving files from 4.2 BSD to System V, you should also watch
out for file names longer than 14 characters.  Those can cause
problems if the truncated version is not unique.  These two will
both end up in "verylongfilena":

	verylongfilename.c
	verylongfilename.h

wunder

jsdy@hadron.UUCP (Joseph S. D. Yao) (04/11/85)

>                          ...   As a robustness note, even tho UCB puts
> directory names on the tape SYSV just grumbles and ignores and finishes
> fine.  Conversely, given a tape to read on a new system I would budget
> more time if it were a cpio tape.

If you're creating a 4BSD tar tape for a USG or unspecified UNIX system,
you should use the 'o' keyletter.  This says, omit those directories.
Also, if you are using cpio on a 4.2+BSD system, you must beware of how
it handles symbolic links (typically, incorrectly).  We had one problem
(which we can't duplicate) in which it changed the dates of the source
files to something negative!  The ctime() routine was unable to cope
with this at all (*sigh*).

	Joe Yao		hadron!jsdy@seismo.{ARPA,UUCP}

root@bu-cs.UUCP (Barry Shein) (04/16/85)

From: jsdy@hadron.UUCP (Joseph S. D. Yao)
Newsgroups: net.unix-wizards
Subject: Re: how universal is tar format? SYSV?

>>                          ...   As a robustness note, even tho UCB puts
>> directory names on the tape SYSV just grumbles and ignores and finishes
>> fine.  Conversely, given a tape to read on a new system I would budget
>> more time if it were a cpio tape.
	[Me, btw]

>If you're creating a 4BSD tar tape for a USG or unspecified UNIX system,
>you should use the 'o' keyletter.  This says, omit those directories.
>	Joe Yao		hadron!jsdy@seismo.{ARPA,UUCP}

You are making the classic mistake, my original comments had more
to do with randomly created tapes falling in your lap (ie. *I*
didn't write them.) The whole point was mucho trouble with cpio tape
in at least one case (argh!! don't respond with ways to write portable
cpio tapes! this one was from AT&T, it was tooo late.) and very little
trouble with tar tapes. If you have control you can write a portable
EBCDIC tape with dd, as long as *you* read and *you* write it.

	-Barry Shein, Boston University

wcs@ho95b.UUCP (Bill Stewart) (04/19/85)

>You are making the classic mistake, my original comments had more
>to do with randomly created tapes falling in your lap (ie. *I*
>didn't write them.) The whole point was mucho trouble with cpio tape
>in at least one case (argh!! don't respond with ways to write portable
>cpio tapes! this one was from AT&T, it was tooo late.) and very little
>trouble with tar tapes. If you have control you can write a portable
>EBCDIC tape with dd, as long as *you* read and *you* write it.
>	-Barry Shein, Boston University

We get lots of bizarre tapes; the EBCDIC ones are usually the easiest
to read - most of them are 80-column, 1680-blocksize (or non-blocked).
The tough ones are the 5-volume set, with a piece of duct tape
numbered 1,2,3,4,or 5 as the only labeling.  Of course it was
binary, but we did have a nearly-unreadable photocopy of the first
page of the printout, with some format info...   "What's a Blocksize?"

The critical part is getting the people to mark the tape reel with
the format (NOOOO, that's a NON-labelled TAPE, with a labelled REEL, not...)
---
				Bill Stewart, AT&T Bell Labs, Holmdel NJ