BackupExec 2012 BemCLI - Get "Job Cancellation option" status
Hello everybody,
I'm actually writing a monitoring script for Backup Exec 2012 and I stuck with the problem that I can't find an option in BEMCLI to get the setting value of the job option "Cancel the job if it is still running * hour after its scheduled start time".
This setting can be found in the GUI under Backup and Restore -> right click on the Server -> Edit Backups -> at the right-hand side "Backup" select Edit -> Schedule -> option Recurrence -> toggle the plan options -> in the fieldset "Options" there can be found the checkbox for the option mentioned above.
I also attached to this post a screenshot for better explaination.
I already tried to get the setting value with the following commands but couldn't find them:
- Get-BEJob -Name "%BACKUPNAME%" | select *
- Get-BEBackupDefinition -Name "%BACKUPNAME%" | select *
Thanks in advance.
Kind regards.
Comments 8 Comments • Jump to latest comment
You should use that setting in the job option as it is much easier to implement.
The other way is to do this. Create a script which is run as a pre-command. This script will do the following
1) sleep for 1 hour
2) get-bejob -status active | stop-bejob $confirm:true
Thank you for your response. But that is not what i want to do. I just want to read out with BEMCLI the status of this flag (if it is set or not). I do not want to make any changes to the job or its execution. And i have to use Powershell/BEMCLI because i want to integrate this feature in my monitoring script.
Regards.
BEMCLI is not meant as a full replacement for the GUI so there are somethings you cannot do with BEMCLI and this is one of them.
Ok. That's not good. Where can I create a feature request?
You may post the idea on the following link
https://www-secure.symantec.com/connect/node/add/idea?
If this response answers your concern, please mark it as a "solution"
I added it as idea:
https://www-secure.symantec.com/connect/ideas/backupexec-2012-bemcli-get-job-cancellation-option-status
You can try this command with Backup Exe 2012 with latest hotfix installed
$job = Get-BEBackupDefinition "JobName"
$job.InitialFullBackup.CancelJobIfRunningAfterScheduledTimeBy
After executing above commands you will get require details, please let me know if it works.
Yeah that worked!
But I did it another way. In my script always work with the BEJob-Object which I get from Get-BEJob. In this object I can also get the infos you mentioned.
E.g.:
$job = Get-BEJob "JobName"
$job.BackupDefinition.InitialFullBackup.CancelJobIfRunningAfterScheduledTimeBy
Regards.
Would you like to reply?
Login or Register to post your comment.