PowerShell script exchange
Post Reply
MartinO
Service Provider
Posts: 17
Liked: 4 times
Joined: Sep 24, 2020 9:09 am
Full Name: Martin Old
Contact:

Detecting synthetic backup days change between V11->V12

Post by MartinO »

Previously, in V11 we'd detect if a job was configured for synthetic backups with the following:

Code: Select all

$VMWareJobs = Get-VBRJob -warningAction silentlyContinue | Where-Object TypeToString -eq "VMware Backup"

foreach ($VMWareJob in $VMWareJobs) {
	if ($VMWareJob.AutoScheduleOptions.PerformTransformToSyntethic) {
				$SyntheticFullDays = ($VMWareJob.AutoScheduleOptions.TransformToSyntethicDays) -join ", "
			} else {
				$SyntheticFullDays = "N/A"
			}
		}
In V11 we see the below:

Code: Select all

$VMWareJob.AutoScheduleOptions

PerformActiveFullBackup       : True
ActiveFullBackupKind          : Daily
ActiveFullBackupDays          : {Saturday}
ActiveFullBackupMonthlyOption : Veeam.Backup.Model.CDomFullBackupMonthlyScheduleOptions
PerformTransformToSyntethic   : False
TransformToSyntethicDays      : {Wednesday, Saturday}
In V12 the properties have now changed so that it returns different sub-properties:

Code: Select all

$VMWareJob.AutoScheduleOptions

ActiveFull                             SyntheticFull                         
----------                             -------------                         
Veeam.Backup.Model.CFullBackupSchedule Veeam.Backup.Model.CFullBackupSchedule
It wasn't listed on breaking changes - so I assume there's a different method which would work between both versions?
david.domask
Veeam Software
Posts: 1226
Liked: 323 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Detecting synthetic backup days change between V11->V12

Post by david.domask »

Hi @MartinO , the change log is only for the actual usage of the main cmdlet as far as I know; it doesn't track the properties at this time as it's not the main focus, but maybe @oleg.feoktistov can comment further on this.

Unfortunately, you'll need to add in some case handling to detect the VBR version and use a different function to poll this information depending on the version.
David Domask | Product Management: Principal Analyst
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Detecting synthetic backup days change between V11->V12

Post by oleg.feoktistov »

Correct, our main focus is cmdlets and parameters, but I noted the feature request for class properties. For core classes (CBackupJob, CBackup etc.) it's a tricky part though because we are walking into unsupported realm here. The plan is to have supported wrappers for such classes in one of the future releases. Would then make sense to describe property changes for them instead. Thanks!
MartinO
Service Provider
Posts: 17
Liked: 4 times
Joined: Sep 24, 2020 9:09 am
Full Name: Martin Old
Contact:

Re: Detecting synthetic backup days change between V11->V12

Post by MartinO »

OK, thanks guys. I'll get adding in the new logic. Shouldn't be too difficult as we already have some in place for V10->V11.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests