>I'm trying to setup a simple cron backup. Here's the script as it is:
>
>ftmt -f /dev/nqft0 reten
>tar czvf /dev/nqft0 /
>ftmt -f /dev/nqft0 rewind
<snip>

>I'm thinking that my tar command isn't right, that is, that it isn't
>overwriting the previous archive that is on the tape (which will be one
<snip>

First off, tar doesn't recognize anything about the position of the tape; it
simply dumps the data stream to the tape drive.  If a tar archive is already
on the tape, tar couldn't care less, it simply overwrites it.  If you want
more than one archive on a tape, you must use mt to position the tape.

I'm not sure how big your tape is or how much you are archiving, but the way
you are using tar would backup needless things like the /proc and /tmp
directories, which could account for more tape usage than you are expecting.
Here's how I use tar:

tar -cvf /dev/qft0 --totals -S --preserve -X /etc/excludes -R -M -V "`date`"
/

That's supposed to be all one line.

The file /etc/excludes is a list of directories that I don't want to backup,
like  /proc, /mnt, /tmp and a few others.  Notice that I'm not compressing
the tar archive.  I have two reasons for this:  One, without compression
writing a backup uses very little cpu, so I can backup without affecting my
system that much.  Second, and most importantly, is that using compression
on a tar backup could result in total data loss in a archive after a bad
spot in the tape, whereas going without compression should only result in
losing the file with the bad tape sector.  If you really need the
compression, I would stay away from the -z flag in tar and use one of the
other backup programs, like taper or afio (?).

Douglas Bollinger
Mt. Holly Springs, PA   17065

My other computer runs Linux.



Reply via email to