New job options such as Generation Policy options?

PowerShell script exchange

New job options such as Generation Policy options?

Veeam Logoby Tobias_Elfstrom » Fri Aug 16, 2013 7:29 am

Hi,
Could someone please give some examples on what options we have with the new option subset; GenerationPolicy on the Backup Job options and explain what the suboptions does, thanks :)

This one:
Code: Select all
>$job = Get-VBRJob -Name Test
>$option = $job.GetOptions()
>$option.GenerationPolicy

DeletedVmsDataRetentionPeriodDays       : 30
RecoveryPointObjectiveValue             : 1
RecoveryPointObjectiveUnit              : Day
SyncIntervalStartTime                   : 00:00:00
RetentionPolicyType                     : Simple
SimpleRetentionRestorePoints            : 7
EnableCompactFull                       : False
CompactFullBackupScheduleKind           : Monthly
CompactFullBackupDays                   : {Saturday}
CompactFullBackupMonthlyScheduleOptions : Veeam.Backup.Model.CDomFullBackupMonthlyScheduleOptions
EnableRechek                            : True
RecheckScheduleKind                     : Monthly
RecheckDays                             : {Saturday}
RecheckBackupMonthlyScheduleOptions     : Veeam.Backup.Model.CDomFullBackupMonthlyScheduleOptions
GFSRecentPoints                         : 7
GFSWeeklyBackups                        : 4
GFSMonthlyBackups                       : 0
GFSQuarterlyBackups                     : 0
GFSYearlyBackups                        : 0
WeeklyBackupDayOfWeek                   : Sunday
WeeklyBackupTime                        : 22:00:00
MonthlyBackup                           : Veeam.Backup.Model.CDomMonthlyBackupCreationTime
QuarterlyBackup                         : Veeam.Backup.Model.CDomQuarterlyBackupCreationTime
YearlyBackup                            : Veeam.Backup.Model.CDomYearlyBackupCreationTime



Also there are new options elsewhere such as
Code: Select all
$option.JobOptions.UseWan
that I assume is the use of the new WAN accel feature?

Maybe some documentation of all the new options is to be found somewhere?

BR Tobias.
Tobias_Elfstrom
Enthusiast
 
Posts: 84
Liked: 8 times
Joined: Wed Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom

Re: New job options such as Generation Policy options?

Veeam Logoby v.Eremin » Fri Aug 16, 2013 11:13 am 1 person likes this post

Hope the following pictures help you to understand PS GFS commandlets better: 1, 2

that I assume is the use of the new WAN accel feature?

Yep, you’re right in your assumption.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1025 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: New job options such as Generation Policy options?

Veeam Logoby Tobias_Elfstrom » Fri Aug 16, 2013 11:42 am 1 person likes this post

My corporate proxy blocked access to that link (at least it look like the same URL on both 1 and 2 for me) so I put the one I could get on here:
Image

So if you use RententionPolicy = GFS it will ignore the "Restore points to keep" and only go with the settings you specify below "Keep full backups for archival purposes"
I.e
if you go with
Code: Select all
RetentionPolicyType  = Simple

you need to set
Code: Select all
SimpleRetentionRestorePoints

and if you choose GFS you need to set:
Code: Select all
GFSWeeklyBackups
GFSMonthlyBackups
GFSQuarterlyBackups
GFSYearlyBackups         

Correct?

What about:
Code: Select all
GFSRecentPoints
Tobias_Elfstrom
Enthusiast
 
Posts: 84
Liked: 8 times
Joined: Wed Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom

Re: New job options such as Generation Policy options?

Veeam Logoby v.Eremin » Fri Aug 16, 2013 1:50 pm 1 person likes this post

Actually, the situation is slightly different.

VB&R GFS rotation scheme keeps backups of different cycle. And backups of different cycle are kept in accordance to different schedules that user can set:

• Regular backup cycle (SimpleRetentionRestorePoints)
• Weekly backup cycle (GFSWeeklyBackups)
• Monthly backup cycle (GFSMonthlyBackups)
• Quarterly backup cycle (GFSQuarterlyBackups)
• Yearly backup cycle (GFSYearlyBackups)

So, even if you decide to stick to GFS rotation scheme, it won’t eliminate the regular backup cycle and you will still have to specify the number of regular backup cycle restore points you’re willing to store.

More information regarding GFS can be found in the corresponding User Guide (p.112).

Thanks.
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1025 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: New job options such as Generation Policy options?

Veeam Logoby Tobias_Elfstrom » Fri Aug 16, 2013 2:02 pm

Thank you. And I saw you fixed the link to the second images as well:
Image
Tobias_Elfstrom
Enthusiast
 
Posts: 84
Liked: 8 times
Joined: Wed Jul 04, 2012 6:32 am
Full Name: Tobias Elfstrom

Re: New job options such as Generation Policy options?

Veeam Logoby v.Eremin » Fri Aug 16, 2013 2:26 pm

And I saw you fixed the link to the second images as well

Dirty trick, I know. :)
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1025 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

How to change copy job "Restore points to keep"

Veeam Logoby Dario.Palmisano » Mon Nov 25, 2013 1:49 pm

Hello everybody,

I would like to modify with PowerShell the backup copy job parameter "Restore points to keep".

I tried with:

Code: Select all
$CopyJob = Get-VBRJob -Name "base_bk_cp_nas1"

$Options = $CopyJob.GetOptions()

$Options.BackupStorageOptions.RetainDays = 12

$CopyJob.SetOptions($Options)


But accessing the the job using the interface I always get the previous value.

Is the variable corresponding to the parameter I want to change?
What I am making wrong?

Thanks in advance

Best regards

Dario
Dario.Palmisano
Enthusiast
 
Posts: 29
Liked: 2 times
Joined: Mon Nov 11, 2013 7:22 am
Full Name: Dario Palmisano

Re: New job options such as Generation Policy options?

Veeam Logoby v.Eremin » Mon Nov 25, 2013 1:55 pm

In order to change the number of restore points backup copy job keeps, you should use the following script:

Code: Select all
asnp VeeamPSSnapin
$Job = Get-VBRJob -name "base_bk_cp_nas1"
$Options = $Job.GetOptions()
$Options.GenerationPolicy.SimpleRetentionRestorePoints = 12
$Job.SetOptions($Options)


More information regarding backup copy job retention settings available via PS can be found in the post provided above.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1025 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: New job options such as Generation Policy options?

Veeam Logoby kbassham » Thu Dec 19, 2013 6:36 pm

same problem here... made the change in PS but it doesn't show the change when using the GUI
kbassham
Influencer
 
Posts: 11
Liked: never
Joined: Tue Jun 14, 2011 6:38 pm

Re: New job options such as Generation Policy options?

Veeam Logoby v.Eremin » Sun Dec 22, 2013 11:53 am

What change you're referring to? Can you post here both what you're trying to achieve and the example of the script you're using? Thanks.
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1025 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: New job options such as Generation Policy options?

Veeam Logoby jake1110 » Mon Jan 13, 2014 4:58 pm

I think I know what he's referring to. For example, when I set a daily backup time using Powershell it updates the time correctly "behind the scenes" in the database but if I look at the list of jobs in the B&R GUI, they're all still defaulted to 10:00PM under "Next Run." I have 276 jobs staggered out overnight, so it's a bit frustrating to see all 10:00PM on the GUI overview. If I go to edit the actual job, it will report the correct run time.
jake1110
Enthusiast
 
Posts: 40
Liked: 2 times
Joined: Thu Sep 20, 2012 6:19 pm
Location: Des Moines, IA
Full Name: Jake Ernst

Re: New job options such as Generation Policy options?

Veeam Logoby v.Eremin » Mon Jan 13, 2014 9:03 pm

Hi, Jake, I'm currently out of the office, but I will take a look at this issue tomorrow morning and see whether this problem can be somehow bypassed. Thanks.
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1025 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: New job options such as Generation Policy options?

Veeam Logoby jake1110 » Mon Jan 13, 2014 9:26 pm

No problem at all! It's just a minor quirk I noticed and doesn't affect me a whole lot, just others who are looking at the console.

For performance reasons, I'm breaking the jobs up into three servers. I wasn't able to scale up as high as I thought, but that's a whole other topic!
jake1110
Enthusiast
 
Posts: 40
Liked: 2 times
Joined: Thu Sep 20, 2012 6:19 pm
Location: Des Moines, IA
Full Name: Jake Ernst

Re: New job options such as Generation Policy options?

Veeam Logoby v.Eremin » Tue Jan 14, 2014 10:53 am

Hi, Jake, are talking about schedule of ordinary backup job, not backup copy job, as the latter doesn't have any time-specific schedule being of continuous type?

In case of backup job, you can use the following script that should meet your expectations:

Code: Select all
asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your backup Job"
$Options = $Job.Options
$ScheduleOptions = $Job.GetScheduleOptions()
$ScheduleOptions.OptionsDaily.Enabled = $true
$ScheduleOptions.OptionsMonthly.Enabled = $false
$ScheduleOptions.OptionsPeriodically.Enabled = $false
$ScheduleOptions.OptionsContinuous.Enabled = $false
$ScheduleOptions.NextRun = "22:00" #Write here whatever time you want to
Set-VBRJobScheduleOptions -Job $Job -Options $ScheduleOptions
$Options.Options.RootNode.RunManually = "False"
$Job.SetOptions($Options)

I've just checked it, and everything seems to be working fine.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13709
Liked: 1025 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: New job options such as Generation Policy options?

Veeam Logoby jake1110 » Wed Jan 15, 2014 3:53 pm

Yes, this is now working for me using your snippet

What I was doing was updating my schedules using:
Code: Select all
Set-VBRJobSchedule -job "Job Name" -At "23:30" -DailyKind Everday #or anytime


This would update the time of the job but not when I looked at the overview of jobs in the GUI.

Now using:
Code: Select all
asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Job Name"
$Options = $Job.Options
$ScheduleOption = $Job.GetScheduleOptions()
$ScheduleOption.NextRun = "23:30"
$Job.SetOptions($Options)


Thanks for the help
jake1110
Enthusiast
 
Posts: 40
Liked: 2 times
Joined: Thu Sep 20, 2012 6:19 pm
Location: Des Moines, IA
Full Name: Jake Ernst

Next

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 1 guest