Re: tbtape: the spawn of Satan
Posted in 1995
John Campbell wrote: } } I have been dealing with attempts to run IFX-O/L's tbtape backup program } from w/i a script for unattended backups. The main problem seems to be } that tbtape doesn't handle exceptional conditions (like an early EOF) } gracefully. } } Try this: } } tbtape -s </dev/null } } I noticed this when using tbtape w/i a script: } } echo "\\n0" | tbtape -s } } for an unattended level 0 backup. If (for some reason) the tape drive } isn't ready right away, tbtape will consume stdin looking for it. } When the drive is ready, stdin will be consumed and tbtape will go } into a hiugh-speed loop prompting for the backup level. } } Now, as if that isn't bad enough- } } I tend to redirect stdout and stderr to a file so the unattended B/U } script can mail the results to me as the SysOp. When the prompting } does this, the tbtape output will do it's level best to fill the } disk. I'll probably need to spawn a backup watchdog to see this (or } else check the tape drive *first*) to handle this exceptional } condition. } } The current tbtape truly emulates intergalactic vacuum. } } Will DSA (I think Informix 7.0+) have a more rational tape backup/restore } (f)utility? Or will we have the tools to write our own??? } Try something like this: $INFORMIXDIR/bin/tbtape -s << EOF | head -150 $1 EOF The head statement will terminate tbtape if the situation you described occurs. Make sure that the line number argument is large enough to handle your normal backup output. Hope this helps. Cheers, -----------------------------------------------------------------+------------ _______ _______ _______ | /\\ ____\\ /\\__ __\\ /\\__ __\\ David Buchholz | \\ \\ \\___/ \\/_/\\ \\_/ \\/_/\\ \\_/ Unix System Administrator | Standard \\ \\ \\____ \\ \\ \\ \\_\\ \\__ ConferTech International Inc. | Disclaimers \\ \\______\\ \\ \\_\\ /\\______\\ Westerminster, CO. | Apply \\/______/ \\/_/ \\/______/ daveb@cfer.com/(303)633-3089 | | -----------------------------------------------------------------+------------