- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to control when omniback script runs
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 09:25 PM
04-15-2003 09:25 PM
What would I need to add to the omniback.sh script to prevent it running between 07:00 and 21:00 hours Monday thru Saturday.
Cheers,
Dave Lane
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 09:46 PM
04-15-2003 09:46 PM
Re: how to control when omniback script runs
Here is an example that you could use in your crontab file
# Stop omniback
0 7 * * * 0-6 /sbin/init.d/omni stop >/dev/null 2>&1
# Start omniback
59 20 * * * 0-6 /sbin/init.d/omni start >/dev/null 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 02:39 PM
04-16-2003 02:39 PM
Re: how to control when omniback script runs
I didn't really give enough info before.
What I should have mentioned was that the script I wanted to prevent running is not the actual omniback process (which is run remotely and out of my control) but a script that runs on the server to shutdown and startup the databases at the appropriate times (using a semaphore to prevent starting or stopping when already started or stopped).
What I really need is the method to exit the script if it attempts to run between 07:00 and 21:00 Mon to Sat.
Thanks,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 02:44 PM
04-16-2003 02:44 PM
Re: how to control when omniback script runs
1. Is Omni is running, if running then don't do anything else start the process.
2. Put the script into cron as mentioned by Mike.
Thanks
Zafar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 03:06 PM
04-16-2003 03:06 PM
Re: how to control when omniback script runs
The script should check the return code on the database shutdown operation.
return_code=$?
If the return code is zero the database shutdown is succesful. If not, your're hung or the database might still be up and you probably want to send an email to someone.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 03:29 PM
04-16-2003 03:29 PM
SolutionYou could do something like the following:
# This gives the current hour in 24hr clock
export CURRHOUR=`date +%H`
if [ $CURRHOUR -gt 7 -a $CURRHOUR -lt 21 ]; then
echo "backup cannot run now"
exit 1
fi
Hope this helps,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 03:32 PM
04-16-2003 03:32 PM
Re: how to control when omniback script runs
H=`date +%H`
W=`date +%w`
if [ $W -ne 0 ]
then
if [ $H -gt 6 -a $H -lt 22 ]
then
exit -1
fi
fi
This should abort the back-up session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 03:38 PM
04-16-2003 03:38 PM
Re: how to control when omniback script runs
What version of Omniback are you running? I believe there is a setting per session that allows to set the maxiumum amount of time that a session can run before Omniback automatically aborts it. That way, if a session gets hung up or runs slow for some reason, it won't keep running forever.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 03:49 PM
04-16-2003 03:49 PM