part 2/2 of: running ufsdump under "script ufsdump.log"

part 2/2 of: running ufsdump under "script ufsdump.log"

Post by David Com » Sun, 18 Jan 2004 11:43:40



Since, to my horror, I've been having a little trouble
matching what ufsrestore finds with what I *thought* ufsdump
was writing to the tape, some *crude* verification would
reassure me:

Maybe after ufsdumping a partition, my .sh-file could have it back up
one tape-position, via:

     mt bsf 2 /dev/rmt/0cn ; mt status /dev/rmt/0cn

             [quick on-the-fly question: about that "2": is
              that very-long-standing requirement to *tell*
              "mt bsf" to back up one *more* position than
              you really want -- is that a bug, or a
              "feature" -- and if a feature, what (fiction)
              do they use to *explain* it to someone? ]

and then it would run "ufsrestore -i", and have it do just a single
"ls" before "q-uing" out of it,
...              
at which point an
      "mt status /dev/rmt/0cn"

should show that the tape had returned to the *same* position it was
when that ufsdump finished -- ie, it's in position for the
*next* ufsdump to be done.

Question: Any idea how I'd code that ufsdump *and the
ufsrestore -i" via the Bourne shell?

(Taking the time to master "expect", for this one optional
verification-use, would be overkill, at least for me.)

Thanks for everything!

David

 
 
 

part 2/2 of: running ufsdump under "script ufsdump.log"

Post by Anthony Mandi » Sun, 18 Jan 2004 13:56:52



>   (Taking the time to master "expect", for this one optional
>   verification-use, would be overkill, at least for me.)

Good *ing grief, learn how to use 'expect.'

--
We don't need no stinkin' copyrights!

 
 
 

part 2/2 of: running ufsdump under "script ufsdump.log"

Post by Darren Dunha » Wed, 21 Jan 2004 02:03:42



> and then it would run "ufsrestore -i", and have it do just a single
> "ls" before "q-uing" out of it,

Ugh..

Why not run 'ufsrestore -t' and parse the file list directly?

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

 
 
 

1. part 1/2 of: running ufsdump under "script ufsdump.log"

The idea being to use Sun's (unix's?)  "script"-cmd to keep a record of
what rolls-off the top of the (single-user-mode) screen when
doing a multi-hour set of level-0 ufsdumps, one per
partition on the machine.

Now, I suppose doing this wouldn't be safe to have the script-log
living (and growing) on a partitfion that is *not* the one
*currently* being ufsdumped.

(Otherwise that partition's ufsdump would be, uh, worthless?
 True?)

So, I'd have to make sure to have at least *two* partitions
mounted, root and, say, "partition-b" -- which I'd arrange to
get ufsdumped *last*.

Then, until it was time to ufsdump partition-b, I could
do all the others under, say, a single

    "script /some-partition-b-dir/ufsdump.log"

, and when those n-1 partitions had been ufsdumped, exit
that script-job, and start another:

    "script /some-ROOT-partition-dir/ufsdump.log"

this time leaving partition-b "quiescent" for *its* ufsdump.

When *that's* done, I cat together the two .log-files,
and I have a record of the whole thing.

QUESTION-1: does this scheme make any sense?

QUESTION-2: would it be similarly safe(?) to run the ufsdumps
via an EMACS *shell*-window, being sure, *before* starting
up EMACS, to:

     cd /some-ROOT-partition-dir/foodir

Being in single-user mode and thus without CDE or X-11, i'd be running emacs'
via its "--no-windows" option.

  (oops: just now tried to test runing emacs like that,
  right now, when cde *is* up -- emacs comes up uses fonts,
  colors, etc, *anyway*!  I used -nw, and then added, as a
  WAG, "-t /dev/cua" too.

  So, how *do* you invoke emacs so that it thinks it's
  back in pre-Sun days, running on a glass-tty?)

----- And something apparently "off the wall": tempfs  

(Oh, I suppose I *could* use tmpfs to keep the growing log,
since if that works as advertised, it touches NO diskk.

But -- I dimly reacll some recent warning, on this newsgroup,
tot NOT use tempfs while ufsdumping -- although I forget the
reason.)

Thanks!

David

2. Ask : how to recompile kernel

3. Why so many ufsdump processes after I type "ufsdump 0f /dev/null /"?

4. A socket question - How are disconnections detected?

5. GETSERVBYNAME()????????????????????"""""""""""""

6. WebObjects like tools needed

7. Creating mirrored machine with "ufsdump and ufsrestore"

8. Problem with large drive (>1024cyl)

9. "Operator" group question concerning UFSDUMP

10. "no rewind" option of ufsdump command

11. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

12. "remote" ufsdump and 2 Gb file limit?

13. 1 * HIIGRiraC-still "no joy" w/remote ufsdump