Trouble with 'tar', tape archiver.

Chin Fang fangchin at elaine43.stanford.edu
Sun Jan 20 08:26:40 AEST 1991


In article <1991Jan19.040951.2883 at NCoast.ORG> ramsey at NCoast.ORG (Cedric Ramsey) writes:
>Hello. I am running ESIX a unix sys V compatible os. I've been
>trying to backup a directory, /mnt/code, using tar. I want to
>do the backups to floppy disk. I used the following command:
>$tar cevfk /dev/rdsk/f0q15d 1200 /mnt/code
>This will backup all files an subdirectories but when I get close
>to the last file I get 'tar read tape error'. Also, the tar does 
>prompt me to put in the floppies when needed. and the directory
>/mnt/code has sub directories too. Can anybody help me?
>
I think for backing up to and from floppies, you are better off with the cpio
utility because it senses backup media boundary (ie. when the reading or
writing is reaching the end of the media, it will info you so and prompt you
for new floppy).  As far as I know, not every tar does this. ESIX's? I think
the answer is no too.  Xenix' tar will do but that's an exception?

The syntax:

from hard disk to floppy:

cd to the directory you want to backup;

find . -depth -print |cpio -ocavmB > /dev/rdsk/f0t (1.2 Meg) or f1t (1.4 Meg)

or if no subdirectory;

ls * (assuming you want everything) |cpio -ocavmB > ... (same as above)

from floppies to a directory on hard disk:

assuming you use 1.2 Meg drive and 5.25" floppies,

cd to the appropriate directory (I can't tell you where, you set up your
file tree)

cpio -icvmB < /dev/rdsk/f0t

You don't need f0q15dt or others, ESIX's floppy devices files are generally
slightly faster (not necessary more solid, so always DOUBLE CHECK your 
backup-ed floppies to make sure there are no errors before you erase your
originals on the hard disk!!!!!)

Hope this helps

Chin Fang
Mechanical Engineering Department
Stanford University
fangchin at portia.stanford.edu



More information about the Comp.unix.sysv386 mailing list