cancel
Showing results for 
Search instead for 
Did you mean: 

Commands To Run: Before/After Backup

590402875
Level 3
We have Backup Exec v8.60 Rev. 3878, running on NT4 Server.
Can more than 1 .exe be listed in the Before/After command line? Have been using DOS .bat file to stop a couple of processes, and another DOS .bat file to re-start the processes. The After DOS .bat file always get's hung, and the backup job ends with "Backup Failed":
Starting Post Job Command <
C:\Data\BAT\10_Start_ASA_CATILink.bat >
Error: Post Job Command did not complete in time.
^ ^ ^ ^ ^
Job completion status: Failed

The cmd.exe never terminates.

The .bat file contains the 2 commands:
Net Start "Adaptive Server Anywhere - CATI"
C:\catihelp\CATILINK\PROG\catilink.exe
Could these 2 commands be entered in the 'After Backup' command line, separated by semi-colon or something?
7 REPLIES 7

Ken_Putnam
Level 6
If you log on to the console as the BackupExec service account, do the bat files run OK?

See http://seer.support.veritas.com/docs/192370.htm to extend the timeout period

590402875
Level 3
I log on as administrator. The Backup Exec is only run under the administrator login.

A DOS session remains active until it's sub-process(es) finishes; then the DOS shell will also terminate.

The 1st command in the .bat file completes and goes away immediately. The 2nd process (catilink.exe) is a program that stays active until the next night when the Backup Exec 'Before Backup' runs the command that stops "catilink.exe" When "catilink.exe" is stopped, the DOS session that started it (24 hours before) will close.

Ken_Putnam
Level 6
Rather than just executing catlink.exe, try using the start command
(do "help start" or "start /?" from the cmd prompt for syntax) this will spawn a new window and the original should close

590402875
Level 3
Have not found any combination of START cmd that closes a DOS window after starting a application that stays running.

For example, put into a .bat file the command line that starts Microsoft Word on your PC (probably "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"). Whether you run the .bat file directly, or run a second .bat file that runs the first .bat file (using START or not). . . still, as long as Word remains running, the DOS sessions remains. Perhaps I missed the combo that does work. If you have better success at find the combination that works, please let me know.

Otherwise, my original question remains active: can 2 commands be entered into the After Backup command-line, separated by some kind of separator?

If so, then the .bat that we habe been using could contain just the Net Start command, have that .bat file entered into the After Backup command-line followed by the "catilink.exe" command.

Let me know.

Thanks!

Ken_Putnam
Level 6
I created a cmd file called startword.cmd
it contains one line "start winword"
when excuted, on my machine ( 4/2.2 Ghz running W2KPro) a command prompt box opens, word starts and the cmd prompt box closes.

The cmd file can contain as many commands as you wish
so yes, it could do

net start (service name)
absolute path\catlink.exe

590402875
Level 3
Success!

Changing the .bat file to a .cmd file seems to have made a difference. I was able to run a test-backup job, in the Production environment, with Before/After routines; the After routine being the .cmd file with "start catilink.exe". the After routine concluded successfully and immediately.

I have now modified our Production routines accordingly. I'll know in the morning if it all worked ok. I'll update this log at that time. Thanks.

590402875
Level 3
Success confirmed. Thanks for the solution!

I had tried the START command before, but never a .cmd file.

"Doc" Surber
Surber@SouthernResearchGroup.com