backing up /sys

Rick Stevens rstevens at
Wed Jun 29 18:36:10 UTC 2005

Bob McClure Jr wrote:
> On Tue, Jun 28, 2005 at 03:12:02PM -0700, Rick Stevens wrote:
>>Bob McClure Jr wrote:
>>>I'm still deciding whether I want to continue just backing up root,
>>>home, etc, var, and usr/local, and restore that on to a freshly
>>>installed system, or to make a complete backup from which I can
>>>restore to a bare-metal (or possibily minimally installed) system.
>>Uhm, gee.  I back up each filesystem individually with exclusions.
>>I do this using two different methods: amanda (to DLT tapes) and using a
>>fairly complex "find" command to build ISO images for burning to DVDs.
> I have a client that backs up to tape and to alternaing partitions on
> a removeable IDE drive (of which he has two that he swaps
> occasionally).  The latter is set up to be bootable.  I thought that
> was a little overkill, but I don't any more.
>>>You won't be surprised at the reason for my sudden interest in this.
>>>Yeah, two disk crashes in the last month.
>>Wow!  Bad hardware, power spikes or the family dog lifting his leg on
>>the system?
> The first was an antique 8G drive that started whining about a week
> before it totally augered in.  I replaced it with a disk with FC2 on
> it from my file server that I'd replaced with a big 250GB drive, then
> backfilled it from backups.
> The other was a drive I'd bought three weeks before from a big
> electronics bargain house.  The box had been opened so the price was
> reduced, but it was the only one there of the size and type I wanted.
> Needless to say, after returning that drive, I won't be darkening
> their door again.  The old drive had not yet been recycled, so I put
> it back in.  That's when I found my backup tapes were fubar.  But I
> had good incrementals on another machine, so I got most of it back.
> I discovered that when I run
>   mt <any_command>
> it returns immediately, but the tape goes on to do the function,
> presumably satisfactorily.  So my backup script says, in part,
> /bin/mt rewind
> /bin/mt erase
> /bin/mt rewind
> /bin/mt reten
> echo "backup started at `date`" > $tempfile
> if find $dirlist -mount -depth | cpio $cpio_opts > $TAPE 2>>$tempfile
> then
>   .
>   .
>   .
> So it blows through the mt commands and rolls right in to the cpio
> operation, and I presume the tape starts recording mid-stream.  I
> pulled the contents of the tape to a file, and ran "file <filename>"
> and it said "data".  The tape is a Travan-4 in an IDE tape drive using
> the ide-scsi module.  The device is /dev/nst0.

Uh, hmmmm.  Have you tried /dev/st0 instead?  Sometimes the "n" does
do an immediate return.  The ide-scsi may also be an issue.  I tend to
use real SCSI drives.  You can get DAT drives pretty cheap now.  DLTs
are available on E-Bay pretty cheap, too (the tapes aren't cheap, but
they're reasonable).

> I'm going to run a test tonight, having done the mt steps manually,
> and have it go straight to the cpio, and see if I get a recognizable
> tape.

Also try the /dev/st0 device and see if it behaves differently.
- Rick Stevens, Senior Systems Engineer     rstevens at -
- VitalStream, Inc.              -
-                                                                    -
- Linux is like a windows, no gates...and apache inside! -

More information about the Redhat-install-list mailing list