Re: tbtape -c in background
Posted in 1997
Topics: Backup & Restore, Server Administration, Logging & Checkpoints
At 08:26 AM 4/10/97 +0000, Richard Spitz wrote:
}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
}
Try
nohup $INFORMIXDIR/bin/ontape -c < ontape_cr 1> /dev/null 2>&1 &
with 'ontape_cr' being a file with two lines
^M
\\012
no screen is used as this ontape runs in the background.
O O O O O O . . . ______________________________ __======______T___
O ____ ||Joseph Allen | |H (602)582-1064 |
.] [__n_n_|DD[ ===___ |Email jsa14@worldnet.att.net| |W (602)631-7592 |
}(_________|__|__[_____]_|Fax (602) 582-1064 _|_ |Sr.DBA CSK Auto_|_
_/oo OOOOO oo' oo oo 'o^o^o o^o^o' 'o^o o^o'
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+