Help! Need backup script assistance to end process and pause

Hello Experts,

I have a batch file backup script that exports the db file from a live live running Sybase database shortly before ShadowProtect images the drive, since Sybase is not VSS complatible. Here is my script:

CD\
D:
CD Eaglesoft\Shared Files
DBBACKUP -d -t -c "eng=eaglesoft;uid=dba;pwd=sql" "D:\Online_Backup"

The trouble I am having is that sometimes "dbbackup" does not finish the export and hangs somewhere in the process. I need a script that will kill dbackup.exe if it does not complete in 5 minutes and restart the process. It would also be great if there was a way for script to put a "failed" entry in the windows event log when it fails.

Thanks very much!

John
DigicomDentalAsked:
Who is Participating?
 
arnoldConnect With a Mentor Commented:
I do not have an example, but I think the way to handle this is to use VBscript to start the backup with a timer upon expiration without a successful conclusion the process is killed and started again.
Examples of VBscript that can be stiched together to get you closer to what you need:
http://www.thescarms.com/vbasic/wait.aspx
http://www.webmasterkb.com/Uwe/Forum.aspx/jscript/4811/WScript-Shell-Exec-StdOut-AtEndOfStream-waits-for-text
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/Q_20742540.html
http://www.eggheadcafe.com/software/aspnet/31459028/run-external-program-get.aspx
0
 
arnoldCommented:
Not sure whether it is an option for you to run this as a scheduled tasks.
As a scheduled task, you could set the duration for which this process can hang around.
0
 
DigicomDentalAuthor Commented:
Hi Arnold,
Thanks for your reply. ShadowProtect starts the script runs as a "pre-snapshot" task before it does the backup. You can set the amount of time ShadowProtect will wait before the script finishes but the problem is...there is not a way in ShadowProtect to restart the script if is fails.
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
arnoldCommented:
Does shadowprotect continues if the task is not done?
Not sure whether it is possible to have a vbscript as a task.  The vbscript will try to backup the database and restart the process until it is done.  Does the backup attempt succeed on the second try?
0
 
DigicomDentalAuthor Commented:
Hi Arnold,

Thanks again for your reply. You can set ShadowProtect to continue in the amont of time you specify if the vb script does not complete. The script usually does complete on the second try but dbbackup hangs in windows processes. That is why I need a way to kill dbbackup exe if it does not complete in 5 minutes.
0
 
DigicomDentalAuthor Commented:
Thanks again, Arnold...I will check those out.

-John
0
All Courses

From novice to tech pro — start learning today.