Re: Automating a tar -M... Looking for ideas

From: cyber0ne (ddonahue_at_ccs.neu.edu)
Date: 12/31/04


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



Relevant Pages

  • [OT] mondoarchive via cron - how do you know if it completed correctly?
    ... I've been using mondoarchive for awhile now for interactive backup to CD's. ... We put in a tape drive and I set it up to backup to tape every night by ... writing a very simple script and putting it in /etc/cron.daily (the script ... The problem is that I get a 6k log file each morning ...
    (RedHat)
  • NTBackup on 2003 "non unique tape" problems
    ... Monday night I run a full backup, which cascades to a second tape. ... Tuesday through Sunday nights I run the following script using the "overflow tape" from the full backup: ... if RSM is empty (meaning there is no offline media in the manager) this works perfectly. ...
    (microsoft.public.windows.server.general)
  • Sun Backup Catch 22
    ... We use a standard backup script, which reboots the server and then ... They forgot to load a tape so the server is now sat ... I've tried all the usual key strokes to try and break free from the script ...
    (SunManagers)
  • "RSM View /CG{Guid} /TPhysical_Media" no longer works on W2003
    ... I have been using a script to backup on my W2003 server running Exchange ... Normally I would get the label of tape. ... my ntbackup command where I am using the /t option. ...
    (microsoft.public.windows.server.general)
  • Re: Custom Script for Travan/miniQIC Tape Backups
    ... I fully understand that Travan/miniQIC drives ... > Travan/miniQIC backup devices make the best of them. ... > The script includes an optional "trace" function which helps ... > tape before performing the backup and ejecting it afterward. ...
    (microsoft.public.windows.server.sbs)