Re: tbtape -c in background
Posted in 1997
Neil Truby wrote: > > I've been asked to set up a background script to automatically run a > continuous logical log backup when my UNIX server starts. Remember that "tbtape -c" needs a terminal session of its own. I've tried to solve that problem with the GNU "screen" program. However, I cannot tell you if it works because the server hasn't been rebooted since I implemented it... 1) Write a small shell script: # Beginning of script tbtape -c << ENDE ENDE # End of script The blank line before "ENDE" simulates the "RETURN" you are asked to enter by tbtape. 2) Call that script e.g. "savelogs" and give it execution rights for informix. 3) In the script that starts up Informix-Online, add the following line: screen -m -d -S tbtape savelogs This starts a "screen" session, invokes the "savelogs" script and detaches the "screen" session from the terminal. You can re-attach that session anytime by typing "screen -r tbtape" from any terminal. Depending on the path settings on your system, it might be advisable to include full pathnames in the commands above. Hope this helps, Richard -- +--------------------------+------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3413 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | | +--------------------------+------------------------------------------+