[comp.unix.sysv386] Trouble with 'tar', tape archiver.

ramsey@NCoast.ORG (Cedric Ramsey) (01/19/91)

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?

PS: I am a superuser with all the privelidges.

Thankyou,

Cedric A. Ramsey

bill@unixland.uucp (Bill Heiser) (01/20/91)

In article <1991Jan19.040951.2883@NCoast.ORG> ramsey@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

Hi,

This doesn't answer your question as to why tar isn't prompting you for
the next diskette (the first is probably out of space, causing the error
you got).  I'd suggest you modify your command, though, as follows:
Instead of using /mnt/code, 'cd' to that directory first, then specify
the filespec to tar by using "." (relative pathnames vs absolute pathname).
That way, when you try to restore the files, you can restore them to
any subdirectory, rather than having to restore them to the exact
path from which they originated.

Bill
-- 
home:	...!{uunet,bloom-beacon,esegue}!world!unixland!bill
	bill@unixland.uucp    Public Access Unix - Esix SYSVR3
508-655-3848(12/24)  508-651-8723(12/24/96-HST)  508-651-8733(12/24/96-PEP-V32)
other:	heiser@world.std.com

fangchin@elaine43.stanford.edu (Chin Fang) (01/20/91)

In article <1991Jan19.040951.2883@NCoast.ORG> ramsey@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@portia.stanford.edu

bill@bilver.uucp (Bill Vermillion) (01/20/91)

In article <1991Jan19.212640.18364@portia.Stanford.EDU-> fangchin@elaine43.stanford.edu (Chin Fang) writes:
->In article <1991Jan19.040951.2883@NCoast.ORG> ramsey@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?

But the answer is yes.  I just tried it now, since you said you didn't
think it did it.

Syntax is a snap.  If you are using 1.2 meg 5.25" in drive 0 cd to the
directory hierachy you wish to save and type

tar cv2 .

The 2 is the number of the proper drive type in the /etc/default/tar file.
It knows how long the disk is, and it's blocking factor.   That's one of
the nice features from the Xenix side, a default tar file so you never get
the k and b swapped, you always specify the proper device, it flags between
non-seeking and seeking.

If I didn't do tar cv2 .   it would be
tar cvfkbn /dev/<device.name> 1200 20 .

I think tar cv2 .   is better

bill
->
->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!!!!!)
-- 
Bill Vermillion - UUCP: uunet!tarpit!bilver!bill
                      : bill@bilver.UUCP

john@jwt.UUCP (John Temples) (01/20/91)

In article <1991Jan19.212640.18364@portia.Stanford.EDU> fangchin@elaine43.stanford.edu (Chin Fang) writes:
>In article <1991Jan19.040951.2883@NCoast.ORG> ramsey@NCoast.ORG (Cedric Ramsey) writes:

>> [ Problems using "tar cevfk /dev/rdsk/f0q15d 1200 /mnt/code" with ESIX ]

>I think for backing up to and from floppies, you are better off with the cpio
>utility because it senses backup media boundary
>As far as I know, not every tar does this. ESIX's? I think
>the answer is no too.

"tar cv /directory" does multi-volume backups fine under ESIX and
ISC.  Don't use all those other arguments.  Under ESIX, you need to
edit /etc/default/tar to make the 1.2 meg floppy "archive0"; ISC
2.0.2 ships with the 1.2 already set up as "archive0".
-- 
John W. Temples -- john@jwt.UUCP (uunet!jwt!john)

fangchin@portia.Stanford.EDU (Chin Fang) (01/21/91)

In article <1991Jan20.070824.6205@jwt.UUCP> john@jwt.UUCP (John Temples) writes:
>
>"tar cv /directory" does multi-volume backups fine under ESIX and
>ISC.  Don't use all those other arguments.  Under ESIX, you need to
>edit /etc/default/tar to make the 1.2 meg floppy "archive0"; ISC
>2.0.2 ships with the 1.2 already set up as "archive0".
>-- 
Thanks John, I learnt something.  Now got an open question:
 
In my old MSDOS days, I used PC-Tools to do backup to and from floppies. This
piece of software uses DMA direct access for data transfer and speed is 
relatively tolerable (tolerable only! I didn't say it's fast).  Now I have
been using UNIX exclusively and have come to know several backup utilities
in the /usr/bin.   They are almost always MUCH slower than PC-Tools as far
as backing up to and from floppies is concerned and error prone (at least
on my machine, double check after a lengthy cpio session is a MUST!).  I 
wonder whether any one can give me a good reason why this is the case? 

Regards,

Chin Fang
Mechanical Engieering Department
Stanford University
fangchin@portia.stanford.edu