PowerShell script exchange
Post Reply
wolfgang
Novice
Posts: 6
Liked: 1 time
Joined: Feb 10, 2016 12:05 pm
Full Name: Wolfgang Voigt
Contact:

Start-VBRJob together with -StartChainedJobs and -Fullbackup only doest full on first job

Post by wolfgang »

Hello,
I'm running a bunch of forward incremental jobs without a configured active full in the job.
But as I have the requirement to do active fulls monthly I need to use the PowerShell cmdlet, because simply configuring active fulls would break our tape backup (tape-f29/backup-to-tape-always-full-t46390.html#p300860).

To meet this requirement I created a powershell command which basically should run the first job and the chained jobs afterwards as active-full:

Code: Select all

Powershell -command &{Add-PSSnapin VeeamPSSnapin;Start-VBRJob -Job "Fileserver" -StartChainedJobs -Fullbackup | Out-File -filepath E:\Backup\active_full_log.txt}
The problem now is the following:
The first job is started as configured - as an active full backup.
But the other chained jobs aren't. They simply run as incremental Backup (or as configured).

In the documentation there is nothing about this behaviour. The support [ID# 03354581] now tells me that this expected and not a bug.

In my eyes it isn't. If I set this parameter for the cmdlet I would expect that it forces this for all jobs.

Suggestion from support was to run all jobs at the same time or time them manually.
Not really fancy. I now created multiple Tasks which are configured in the Windows Task Scheduler to run one after another. This will do the job but required alot of configuration. In the end this also static and does not reflect the backup-order in veeam.

Can someone else prove that this isn't really a bug? Maybe behaviour could be changed in the future then and makes it alot easier to run such jobs.
Or maybe there is a better approach to solve this?

Thanks in advance!

Regards
Wolfgang
jhoughes
Veeam Vanguard
Posts: 279
Liked: 112 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: Start-VBRJob together with -StartChainedJobs and -Fullbackup only doest full on first job

Post by jhoughes »

Yes, this is how the cmdlet works, as the only job that you are specifically forcing to run a full backup is the job object you are referencing the initial 'Start-VBRJob'.

The 'StartChainedJobs' parameter will only "start the jobs that are scheduled to run" as stated by the cmdlet. The issue here is that they are starting per their next scheduled run, which is an incremental backup.

This makes sense, as you if wanted to perform the current action of 1 forced full and then continuing on the regularly scheduled job runs, there would be no way to perform this if you carried the forced full to all chained jobs. I understand that is your intention in your current task, but there should be the specification based on a unique job for a full, not forcing the entire line of chained jobs to run an active full.

Job chaining is also not a best practice, it is better to start jobs with a short window in between to let the resource scheduling handle the tasks. Without removing the chaining, you could dynamically create the list of chained jobs by doing a mapping of every job from the ParentId (child job) to the Job ID (parent job) and use that for your order of the jobs runs.

However, the simplest solution is probably to create a script will take input (be that CSV or text file) that has your jobs requiring active fulls listed in their desired order, then you could loop through each job to start the active full and wait for the status to be stopped, then it would start the next job in the list. That way you can control the jobs which need an active full, and can adjust as necessary for any scheduled run.
Husband, Father, Solutions Architect, Geek Extraordinaire | @DenverVMUG, @AustinVMUG & @ATXPowerShell leader | VMware vExpert | Cisco Champion
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests