tar or cpio, which is better?

Jesse W. Asher jessea at dynasys.UUCP
Mon Nov 19 06:30:46 AEST 1990


In article <529 at comcon.UUCP>, tim at comcon.UUCP (Tim Brown) wrote the following:
>In article <57 at astph.UUCP>, joe at astph.UUCP (Joe Broniszewski) writes:
>> Are there any advantages of using tar over cpio for doing backups?  We
>> -- 
>Tar seems more portable.  I did some archives on a system running
>ISC2.2 and could not read them on an Risc 6000/AIX machine.  I suspect
>that if I had remembered to use the  -c option it would have worked
>but tar works fine as is.

I don't know about your version of tar, but mine will not back up zero
length files or empty directories.  Try tarring /usr/spool, erase it, and
then try rebuilding it with what you have in your tarred file.  You
will be very aggravated(I speak from experience).  cpio is much better in
cases like these as tar will not get everything off the drive.  I would
use tar to archive data files together in one file(tarring source code
together for transporting purposes, for example) and use cpio to do 
your backups.  Otherwise you may run into situations where you will
regret using tar.


      Jesse W. Asher                             Phone: (901)382-1609 
               6196-1 Macon Rd., Suite 200, Memphis, TN 38134
                UUCP: {fedeva,chromc,rutgers}!dynasys!jessea
 -> Go climb a gravity well.



More information about the Comp.unix.admin mailing list