Quantcast
Channel: Symantec Connect
Viewing all articles
Browse latest Browse all 13407

Backup Exec 2012 - Wait-BEJob is not waiting.

$
0
0
I need a solution

Rather than scheduling BE jobs via the GUI, I use a PowerShell script.  And it works very well except for one issue; the Wait-BEJob commandlet doesn't seem to be doing what (I believe) it is supposed to.   I am using this script to back up three servers, using Full and Differential jobs.  All jobs were defined via the GUI, they all run verfication after backup, and were all defined On Hold.  The script fires up via Windows Task Scheduler.  The jobs to be run are determined by the script depending on what day of the week it is.  After the script starts a job (Start-BEJob) it is supposed to wait around until it is finished (Wait-BEJob) and then puts the job back On Hold.  It then starts a Duplicate job (Start-BeJob) and then again, it is supposed to wait around (Wait-BeJob) until it is finished before moving on.  Here is a code snippet showing what is a D2D phase of the D2D2T:

---------

# Load the BEMCLI module
import-module "C:\Program Files\Symantec\Backup Exec\Modules\BEMCLI\BEMCLI"

# Backup Server 1 to disk and verify
Start-BEJob -In "Server1-Full Weekly" -Confirm:$False | Wait-BEJob

# Put the job back on Hold
Suspend-BEJob -In "Server1-Full Weekly" -Confirm:$False

# Duplicate Server1 backup from disk to tape
Start-BEJob -In "Server1-Duplicate Full Weekly" -Confirm:$False | Wait-BEJob

# Put the Duplicate job back on Hold
Suspend-BEJob -In "Server1-Duplicate Full Weekly" -Confirm:$False

---------

The problem I am having is that the Duplicate job is launching before the primary job is finished.   I'm not positive, but I think that the Duplicate job launches between the end of the backup and verification phases of the primary job.  I want it to wait until the verify is finished.  I would be fine if the Duplicate job only queued up to run, but it doesn't... they both go to work on the disk simultaneously.   You can imaging what this is doing to the target disk and performance.

I can't manually put the Duplicate job On Hold after it launches.   If I select "Hold" form the context menu for that job, it says that it is removing the job from On Hold (remember, it was defined as being on hold even though it launches).

I'd appreciate any suggestions here.   Thanks much.

RB


Viewing all articles
Browse latest Browse all 13407

Trending Articles