Help automating backup to disk using ontape
Posted in 2001
Topics: Backup & Restore
Hi,
I have started doing level-0 backups to disk using ontape. This is
working fine but now I would like to automate the process by writing a
batch file which is then run by a nightly cron job. I am very new to
this and was wondering if anyone else has done it. My problem is that
once the command to start the backup is issued I am then prompted to
mount the tape device. When doing it manually, at this point I would
simply hit return. How do I put this into a batch file so it is done
automatically? Any help on this would be appreciated.
Thanks
Sent via Deja.com
http://www.deja.com/
Hi All,
We have a tool which is written in Perl and uses names pipes to answer
the ontape prompts called db_ontape. It uses tape, but could be modified
to work on disk. It is at http://www.iiug.org and search for db_ontape.
Bill
mdemoree@my-deja.com wrote in message <94a1at$s2r$1@nnrp1.deja.com>...
>Hi,
>
>I have started doing level-0 backups to disk using ontape. This is
>working fine but now I would like to automate the process by writing a
>batch file which is then run by a nightly cron job. I am very new to
>this and was wondering if anyone else has done it. My problem is that
>once the command to start the backup is issued I am then prompted to
>mount the tape device. When doing it manually, at this point I would
>simply hit return. How do I put this into a batch file so it is done
>automatically? Any help on this would be appreciated.
>
>Thanks
>
>
>Sent via Deja.com
>http://www.deja.com/
there's a neat unix trick you can do to provide the return key character
to the cronjob process. Simply modify your batch script to execute the
following:
$INFORMIXDIR/bin/ontape -s -L 0 < /usr/local/bin/tapevars
substitute $INFORMIXDIR for your actual path of INFORMIXDIR. The tapevars
file can be anywhere and should only contain the following:
^m
The ^m is the ascii character for the return key. As you can see from the
execution command, you're supplying the ontape process with the contents
of the tapevars file which happens to be what ontape is looking for at
that moment (the return character). I can verify that this works as I've
been doing it this way for years now. Best of luck.
mdemoree@my-deja.com wrote:
> Hi,
>
> I have started doing level-0 backups to disk using ontape. This is
> working fine but now I would like to automate the process by writing a
> batch file which is then run by a nightly cron job. I am very new to
> this and was wondering if anyone else has done it. My problem is that
> once the command to start the backup is issued I am then prompted to
> mount the tape device. When doing it manually, at this point I would
> simply hit return. How do I put this into a batch file so it is done
> automatically? Any help on this would be appreciated.
>
> Thanks
>
> Sent via Deja.com
> http://www.deja.com/
--
Phillip Tien
Database Administrator
Whole Foods Market, Inc.
"My best friend's sister's boyfriend's brother's girlfriend knows this kid
who's going with this girl who saw Ferris pass out at 31 flavors last
night. I guess it's pretty serious."