On Tue, 16 May 2000, Christopher M. Downs wrote:
> i have a 4 gig hp surestore tape 6000 in my linux box right now.  i need to
> copy the entire drive as a whole if i can.

  I've always liked GNU tar(1) for this.  For example:

  tar -cW --totals -f /dev/nst0 --exclude /proc --exclude /tmp /

  The "-c" tells tar to "create" an archive.  "-W" tells it to compare the
archive after it is finished, in a way designed to uncover failed backups.  
"--totals" simply tells it to print a nice total count when it finishes,
useful for sanity checking.  "-f /dev/nst0" tells to write to the first SCSI
tape in the system (st0), and not to rewind on close (n).  The non-rewinding
part is important.  The "--exclude" clauses tell tar not to try and backup the
proc virtual filesystem (pointless and likely damaging) and the temporary
scratch space.  You can tweak this in any number of ways, see "man tar" for
all the gory details.

  One thing to be warned about: The "-z" switch, for compression, can make
your backups unreliable, as a single bad block can hopelessly confuse gzip(1),
rendering the rest of the tape useless.  "--blocking-factor" may help correct
this, but it is not adequately documented for me to trust it at this point.

> so if al hell breaks loose i can restore the enitire drive, is there a way
> to do this correctly?

  To really do it "correctly", you will also want to create some kind of
independent boot/root floppy diskette set, such that you can boot from floppy,
repartition the drive, remake the filesystems, and restore from the backup.

On Tue, 16 May 2000, Karl J. Runge wrote:
> 
>       tar -cvf /dev/st0 /
> 
> I'm pretty paranoid, so then I nearly always run a diff:
> 
>       tar -df /dev/st0

  Since you're paranoid, you may want to use "-W" in the conjunction with
"-c".  They both do a compare, but "-W" also attempts to defeat any buffering
between tar(1) and the tape drive.  If you've got a small backup and/or large
buffers, "-d" could conceivably end up comparing data still in memory, and not
the tape itself.

-- 
Ben Scott <[EMAIL PROTECTED]>
| Linux: Something better then MS-Windows, for free!  http://www.linux.com |


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to