Re: HELP use tbmonitor non-interactive way!
Posted in 1992
In article <1650@das13.snide.com> dave@das13.snide.com (Dave Snyder) writes: > >> How can I have a cron task to execute tbmonitor tool to >> archive or unarchive or backup trans. log periodically? > >To the best of my knowledge, there is no way of performing a NON-INTERACTIVE >archive, unarchive, or logical log backup. However, with a little work you can use a tool like EXPECT to run an interactive command (like "tbtape") non-interactively. An extract from the EXPECT docs: ... EXPECT(1) EXPECT(1) ... ... NAME ... expect - programmed dialogue with interactive programs ... ... INTRODUCTION ... expect is a program that "talks" to other interactive pro- ... grams according to a script. Following the script, expect ... knows what can be expected from a program and what the ... correct response should be. ... ... In general, expect is useful for running any program which ... requires interaction between the program and the user. ... All that is necessary is that the interaction can be ... characterized programmatically. ... ... expect may be ftp'd as pub/expect/expect.shar.Z from ftp.cme.nist.gov. ... Request email delivery by mailing to "library@cme.nist.gov". The ... contents of the message should be (no subject line) "send ... pub/expect/expect.shar.Z". ... ... The expect program requires Tcl. (The expect library does not need ... Tcl.) Since you may already have Tcl, it is available separately. ... Tcl may be retrieved as pub/expect/tcl.tar.Z in the same way as ... described above for expect. -- David Schmitt, Systems Administrator Voice: (708)632-5562 Cellular Subscriber Group MIS FAX: (708)632-4421 Motorola, Inc., Room S356 Email: daves@csg.gss.mot.com 1475 W. Shure Dr., Arlington Hts, IL 60004