04-05-2011 12:47 AM
We have a full backup job that runs every night, but the completion time can vary.
We also have another job that reports the total byte count.
Since the full backup completion time can vary, we have the byte job set to run about a hour later.
My question is can I somehow trigger the byte job to run when the full backup job has completed?
04-05-2011 01:05 AM
Yes, you can do so using BEMCMD. See my blog below
https://www-secure.symantec.com/connect/blogs/use-bemcmd-start-jobs
04-05-2011 06:30 AM
Thanks, that looks sopt on.
What do the -o1 -j switches relate to because performing a ? is not showing a full reference for them?
04-05-2011 05:45 PM
BEMCMD is quite complex and it would not be possible to list all the switches at the commandline. There is a manual for the commandline applet in the BE installation directory.
-o1 is for starting the job and -j is the jobname to be started.
04-06-2011 01:09 AM
Cheers, I'll give it a test and update the thread accordingly
04-06-2011 05:35 AM
Documentation about command and switches is available here : Symantec Backup Exec (2010 Command Line Applet (BEMCMD) Guide
04-07-2011 12:46 AM
Strange, it never ran the post command and no errors either
"D:\Program Files\Symantec\Backup Exec\NT\bemcmd.exe" -o1 -j"Report for Daily to SDLT (full)"
04-07-2011 02:26 AM
To make sure that your command is o.k. Start up a command prompt, issue the command and see whether your job starts. If it does not, then it is a syntax problem
04-07-2011 02:41 AM
Ok, it's failing, receiving a -1 response. I wonder if it's because the job being submitted has the same name as the held/scheduled job. Reading the documentation it refers to
bemcmd -o1 -j"Operations Weekly"
In this example, -o1 is the operation to submit the backup job. The command line switch
-j specifies the name of the backup job. Because the job name contains spaces, quotation
marks are required around the job name.
The job “Operations Weekly” was previously created through the Backup Exec
administration console. By default, the backup will be done on the computer where the
Command Line applet is executed.
Then reading further down it relates to jobs with the same name and to use the ID, still trying to find it.
-o1 Run backup job Runs a backup job that has been previously defined. Returns a job instance ID. Also returns a 1 if the command succeeds or a -1 if the command fails.
-jjob name or
-ijob ID
Required. Specifies the name or the job ID of the previously defined job that Backup Exec should run.
Note If there are jobs with the same name, only one of the jobs will run. To ensure that the correct job runs, you should use the job ID instead of the job name to specify which job will run.
I can understand the Job not running if there is a job there with the same name, but surely you require a job in the first place for the post command to work
04-07-2011 06:17 PM
The switch is definitely working as described in my blog. I am using it everyday.
It is probably the jobname that is wrong. You can verify that it is working by creating a test job with a simple name like TEST and try the command again.
04-18-2011 02:32 AM
Ok, just setup the job again as 'Run Now' on 'HOLD' with the job name 'test'
Ran this from the command line "D:\Program Files\Symantec\Backup Exec\NT\bemcmd.exe" -o1 -j"test" and received a RETURN VALUE: -1
04-18-2011 05:26 PM
What version of BE are you using? Are you running this command on the media server?
04-19-2011 01:01 AM
2010, and running the command on the server BE is installed on.
04-19-2011 01:51 AM
Try BEMCMD -o22 -j to list the jobs that are on hold, so that you would know what are the jobnames. Remember the jobnames are case-sensitive.
04-19-2011 03:25 AM
D:\Program Files\Symantec\Backup Exec\NT>BEMCMD -o22 -j
JOB NAME: test
NUMBER OF OBJECTS: 1
RETURN VALUE: 1
D:\Program Files\Symantec\Backup Exec\NT>bemcmd -o1 -j"test"
RETURN VALUE: -1
04-19-2011 03:29 AM
I'm wondering if it's because the job is not a 'Backup' and a 'Report'
04-19-2011 07:19 PM
What kind of job is it? You should try a backup job and just select a file for backup. It will be a quick test.