PowerShell script exchange
Post Reply
manuel.aigner
Enthusiast
Posts: 31
Liked: 5 times
Joined: Sep 25, 2017 8:25 am
Full Name: Manuel Aigner
Contact:

Get Active Full Days from BackupSync Job

Post by manuel.aigner »

Hi there,

I tinker around on some management tools to ease our administrative tasks. One of them is to get a configuration list of all jobs.
At the moment I've got the problem that I can't find the correct sub property with the set active full day value. We make AFs on a monthly base.
For normal Backupjobs I found the property ->
Get-VBRJob | $_.BackupTargetOptions.FullBackupMonthlyScheduleOptions.DayOfWeek and $_.BackupTargetOptions.FullBackupMonthlyScheduleOptions.DayNumberInMonth

This props also exits for Backup Copy Jobs. But the values which I get are incorrect and not the same I can see in GUI.

We are using the latest Veeam B&R 9.5 Build.

Any suggestions?
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get Active Full Days from BackupSync Job

Post by veremin »

I don't have a console handy, so cannot say exactly where those properties are located, but I'd start from searching GenerationPolicy options:

Code: Select all

Asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your backup copy job"
$Options = $Job.GetOptions()
$Options.generationPolicy
Thanks!
manuel.aigner
Enthusiast
Posts: 31
Liked: 5 times
Joined: Sep 25, 2017 8:25 am
Full Name: Manuel Aigner
Contact:

Re: Get Active Full Days from BackupSync Job

Post by manuel.aigner »

Hi Vladimir,
many thanks. I think that's working.
I found out It's also possible to get the property without using a method $job.options.generationpolicy... :)
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get Active Full Days from BackupSync Job

Post by veremin »

Good to know, but for backup copy jobs most of information regarding simple and GFS retention schemes is present inside the given option group (GenerationPolicy). So, if I were automating something for this matter, I'd stick to it without any alternative (as otherwise I might get unreliable or misleading information). Thanks!
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 10 guests