Re: Ontape -s , multiple tapes & cron.
Posted in 1998
Rick Naquin wrote:
>
> Running a 7.20 instance with 2 data dbspaces running on AIX 4.20 . I
> need to use ontape -s on a nightly basis for backups. The backup
> currently takes two tapes. Is there a way to release the job through
> cron and notify the job that a second tape has been mounted. I was
> thinking I could pipe the output to a file and search that file for
> the mount next tape instruction. However, I don't know how to notify
> the job that the new tape has been mounted.
Rick,
what you are looking for is not straightforward. ontape expects to be
interactive when it detects the current cartridge has been filled. How
do you propose to mount the second cartridge in the same drive if
nobody's there? Or is it mounted on a second tape drive? In that case,
how are you going to get ontape to switch tape drives? ontape has no
such capability. (OnArchive does but that's for masochists. OnBar - I
know noooothingg!)
Here's how I distill your needs:
1. Your TAPEDEV is a link like /dev/ArchTape, which is really a link to
anything you want it to be.
2. You do not start ontape directly. You run it as an "expect" script.
Before running ontape, the expect-script sets the link /dev/ArchTape
to be /dev/rmt0.
3. The script starts ontape and awaits the prompt to "press RETURN to
continue". When it gets the prompt, it simulates the key-press.
4. When it receives the prompt to mount the next tape on /dev/ArchTape
and press RETURN when ready (I don't recall the exact wording) the
script switches the link to /dev/rmt1 and simulates the pressed key.
If you gan get this done, you can mount the tapes on the appropriate
drives and go home. The cron job will start the expect script.
Of course, all this depends on having the "expect" utility at your site.
I sure don't but a DejaNews search for it turned up "Deja-GNU", a
commmonly used (I hear) utility written in expect. So if anyone knows
where I can get my hands on it, please post that info here!
I am also assuming ontape does a file-close and file open at the end of
a tape and the beginning of the next one. Is there a problem with this
assumption?
--
-- Jake (Never yelled "CROWDED THEATER!" during a fire)
+------------------------------------------------------------+
| The expedient performance of a task with excessive concern |
| regarding its duration-to-completion engenders a virtual |
| certainty of diminished benefit therefrom. |
| -- Benjamin Franklin (but he said it in 3 words) |
+------------------------------------------------------------+