Re: Automating a tar -M... Looking for ideas
From: cyber0ne (ddonahue_at_ccs.neu.edu)
Date: 12/31/04
- Next message: cyber0ne: "Re: Automating a tar -M... Looking for ideas"
- Previous message: Janis Papanagnou: "Re: substituting space with a pipe in a text file"
- In reply to: dfrench_at_mtxia.com: "Re: Automating a tar -M... Looking for ideas"
- Next in thread: cyber0ne: "Re: Automating a tar -M... Looking for ideas"
- Reply: cyber0ne: "Re: Automating a tar -M... Looking for ideas"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Dec 2004 17:57:59 -0800
I knew I'd come up with something when implementing this. I've been
Googling around with little luck so far, but my current (and likely
final) dilemma in this case is this: I can get the device status from
the mt command as a few lines of text, and it seems that the keywords
I'm looking for are "OPEN" vs. "ONLINE." Now, how do I translate that
to a While condition? I'm thinking I could write another script that
reads the input and looks for those keywords (something I can easily do
in PERL, but that's not installed on this very very old and very very
short on disk space machine, so I'd need some help doing it in Bourne).
What would the output of that script have to be? Just an echo of "0"
or "1"? Any help would be greatly appreciated.
Regards,
David P. Donahue
ddonahue@ccs.neu.edu
dfrench@mtxia.com wrote:
> cyber0ne wrote:
> > I've written a number of very small and simple shell scripts to
> handle
> > my tape archiving needs and now I'm looking to extend the
automation
> a
> > step further. As it stands, I invoke a script which
>
> SNIP
>
>
> > Does anyone have any ideas for a way of pausing between the tapes
in
> a
> > script (-M includes an option for running a script instead of
> > displaying its default message and requesting user input) that
> doesn't
> > require me being logged in? Ideally, if I could cron the entire
> backup
> > job and just put in the next tape whenever I notice the previous
one
> is
> > done (I can tail the aforementioned log file for the backup's
current
> > status) that would be perfect.
> >
>
> SNIP
>
>
> One thought that comes to mind is to output your prompt to the
console
> /dev/console, and when a tape finishes eject the tape using the 'tctl
> -f /dev/rmt0 offline' command (with whatever tape device you are
> using). Then in your script, periodically test the tape drive using
> 'tctl -f /dev/rmt0 status' to see if a new tape has been inserted, if
> so, continue with the next backup. All this is untested of course.
> --
> Dana French
- Next message: cyber0ne: "Re: Automating a tar -M... Looking for ideas"
- Previous message: Janis Papanagnou: "Re: substituting space with a pipe in a text file"
- In reply to: dfrench_at_mtxia.com: "Re: Automating a tar -M... Looking for ideas"
- Next in thread: cyber0ne: "Re: Automating a tar -M... Looking for ideas"
- Reply: cyber0ne: "Re: Automating a tar -M... Looking for ideas"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|