cancel
Showing results for 
Search instead for 
Did you mean: 

BEMCLI exclude all jobs on a given date range

porka
Level 3

Im hoping someone out there has done this before so I can automate a process that until now ive completed manually. I work in an education environment where we have regular holiday breaks whereby I have been opening backup exec and going to the backup calendar and excluding a given date range one by one for all scheduled backups as we run a different set of jobs manually throughout that break. I do this action across some 14 media servers at a time so its a bit tedious and I'd love to script it in powershell with bemcli. Im hoping I missed an easy way to do it as I couldnt see a reference to excluding a calendar day and I tried use Get-BEJob -Status Scheduled and piping it to Add-BeScheduledDatesToExclude but it wasnt a fan of that. Has anyone out there done this before ?

4 REPLIES 4

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

If this is just because no one is in to change tapes - you would probably be better off setting the job timeouts ("Reschedule job if it does not start" AND "Cancel job if it is  running") to a small enough time to allow job to run normal days but time them out on days with no media available and acept that you will have some failure or alert messages the next day.

 

 

LegAEI
Level 5

I'm interested in knowing how this turns out.

porka
Level 3

No the regular backups go to a nas based device, we exclude the days to stop the jobs running as we do weekly fulls to the nas unit and its not required when little to nothing changes in the break. We do the end of school term archive to tape of all data as a one time job (4 times per year for each of the breaks). So the exclude days does exactly what we want, its just logging on to each site respectively and doing it 18 times is an annoyance but weve done it for a number of years and I was hoping to do it through a script as we automate a number of other processes now with powershell. I figured the exclude day in the gui must be doing something similar to the powershell commands I just wasnt sure how to leverage them
 

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

Hmm ok interesting reason

 

The BEMCLI Powershell applet (Help Guide) has details of a command called

Add-BEScheduleDatesToExclude and it contains a couple of examples of usage

 

To get to the help guide open the Backup Exec Management Command line Interface on the BE server and once open type Show-BEHelp

Then in the search tab of the dialog that appears enter Add-BEScheduleDatesToExclude to find the details

 

If this does what you want (locally on one server) then you should be able to use a longer script with remote powershell to run against each server - Tech Support don't write such scripts so don't have examples.