[ale] Multiple tars on 1 tape?

Stephen R. Wylie swylie at wylie.com
Wed Apr 2 17:25:44 EST 1997


On Sun, 16 Mar 1997, Joe wrote:

> Date: Sun, 16 Mar 1997 13:27:43 -0500
> From: Joe <jknapka at mindspring.com>
> To: ale at cc.gatech.edu
> Subject: [ale] Multiple tars on 1 tape?
> 
> 
> Hello everyone.
> 
> I just got one of those huge 4G Travan SCSI tape drives (they're
> really cheap, <$300). I only have 2G of HD space on my system, and my
> rationale was that I could fit a Full backup and a couple of weeks of
> incrementals on a single tape.
> 
> However, I'm having trouble making multiple tars per tape work the way
> I think it should. Does anyone have any clues or a pointer at some
> documentation I ought to look at? I've scanned the HOWTOs without any
> success (FTAPE,SCSI,grep -i "tape|multiple.*tar|backup"
> /usr/doc/howto/*). The basic symptoms are that I can write two
> tarfiles consecutively on the tape successfully, but then I can only
> read the first one - i.e.
> 
> % mt rewind
> % tar cvf /dev/nst0 /some/stuff
> 	... tape written successfully...
> % tar cvf /dev/nst0 /some/other/stuff
> 	... tape written successfully...
> % mt rewind
> % tar tvf /dev/nst0
> 	... contents of /some/stuff ...
> % tar tvf /dev/nst0
> 	... tar exits immediately with status 0.

travan tapes that are advertised as "4gb" are really compressed 2gb tapes.
you might look into the -z option of tar, which will run it through gzip
to give you the compression you are looking for.

A word of caution, however: If you try to restore a compressed tape that
has an error on it, you have lost everything from the error to the end of
the tape. Without compression, you only lose the file(s) with the
error(s).

I just cycle tapes and make a full backup of my REAL important machines
every morning [from cron]. I cycle the tapes and make a full backup every
time. I don't like rolling dice with incremental backups...

All you do to make more than one tar image on a tape is write the next
one... ie:

tar -zcf /dev/tape /usr
tar -zcf /dev/tape /home
tar -zcf /dev/tape /yet_another_directory

will write 3 compressed images on your tape. don't rewind or move the tape
between backups. if you do, look at the mt manpage for the fsf and bsf
options to step between the images on the tape. If you want to see these
images, you can use:

mt -f /dev/tape rewind tar -ztf       [rewind]
tar -ztf /dev/tape                    [view first]
tar -ztf /dev/tape                    [view 2nd]

also, check out the tar manpage... real big... lots of options... some are
pretty cool :)   I have /dev/tape as a symlink to /dev/nst0   the /dev/st0
device rewinds the tape after every use and I don't like it... If I want
the tape rewound, I'll issue the command.

> 
> I tried using mt to write an EOF marker after the first tarfile, but
> then I can't even write the second file - tar says /dev/st0 is a
> read-only device after I do "mt fsf 1". BTW cpio acts the same way, so
> I'm presuming this is not a problem with the archiver, but just a
> screw loose in the operator... I just don't know which screw.
> 
> Any ideas?
> 
> thanks,
> 
> -- Joe
> 

feel free to email me if I didn't cover everything you want information
on. I would expect a 4gb travan tape to hold 2gb uncompressed. I use tr3
tapes on my win95 machines and they clearly say:
1.8gb/3.2gb uncompressed/compressed
right on the tape... try using the /dev/nst0 device and, if you want to
fit tons of stuff past your 2gb of data, use the -z option on tar.

good luck!


srw
-----------------------------------------------------------------------                          
Stephen R. Wylie	      swylie at wylie.com
CLICK ME
All unsolicited commercial email proofread at $250 per 1K received.
"They gave me a book of checks.  They didn't ask for any deposits."
     -- Congressman Joe Early (D-Mass)






More information about the Ale mailing list