V6 Where to set full settings in powershell pack

PowerShell script exchange

V6 Where to set full settings in powershell pack

Veeam Logoby jkcouch » Fri Dec 23, 2011 8:15 pm

Looking for a place to set full schedule in v6 powershell pack. I see where i can enable it, but i am unable to define the scheduling params.

For instance, its currently set to enable fulls, but it defaults to weekly. I want to set it to monthly and roll through my jobs and stagger the full days based on a spreadsheet or an auto generated hash table or someting i put together.

Any suggestions?
jkcouch
Enthusiast
 
Posts: 30
Liked: never
Joined: Sun Jun 26, 2011 7:02 pm
Full Name: Jeff Couch

Re: V6 Where to set full settings in powershell pack

Veeam Logoby ThomasMc » Sat Dec 24, 2011 11:13 am

This should be enough to get you started and if you need any help just post back :)

Code: Select all
PS C:\> $job = Get-VBRJob -Name "VC Backup"
PS C:\> $schopt = $job | Get-VBRJobScheduleOptions
PS C:\> $jobopt = $job | Get-VBRJobOptions
PS C:\> $jobopt.BackupTargetOptions

Algorithm
FullBackupScheduleKind
FullBackupDays
FullBackupMonthlyScheduleOptions
TransformFullToSyntethic
TransformIncrementsToSyntethic
TransformToSyntethicDays

PS C:\> $schopt

StartDateTime
EndDateTimeSpecified
EndDateTime
RepeatSpecified
RepeatNumber
RepeatTimeUnit
RepeatTimeUnitMs
RetryTimes
RetryTimeout
RetrySpecified
WaitForBackupCompletion
BackupCompetitionWaitingPeriodMin
OptionsDaily
OptionsMonthly
OptionsPeriodically
OptionsContinuous
OptionsBackupWindow
NextRun
LatestRun

PS C:\> Set-VBRJobOptions -Job $job -Options $jobopt
PS C:\> Set-VBRJobScheduleOptions -Job $job -Options $schopt


Have a Merry Christmas
ThomasMc
Expert
 
Posts: 293
Liked: 17 times
Joined: Wed Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell

Re: V6 Where to set full settings in powershell pack

Veeam Logoby jkcouch » Sat Dec 24, 2011 5:26 pm

Thanks Thomas!

In case someone else needs a way to schedule fulls this is the simple/slow way of doing it.

Below is my awful attempt at a CSV format on the forms. Just create a csv with the following columns. Fill in the table.

Code: Select all
JobName   ScheduleKind   DayOfWeek   DayNumberInMonth
Job01   Monthly      Monday      First
Job02   Monthly      Tuesday      First

The script:
Code: Select all
$Path = "\\Server\Path\FullSchedule.csv"

$Scheduletable = Import-Csv $Path

foreach ($Schedule in $Scheduletable){
# Set Job Properties
   $job = Get-VBRJob -Name $Schedule.JobName
   $JobOptions = $job | Get-VBRJobOptions
   $JobOptions.BackupTargetOptions.FullBackupScheduleKind = $Schedule.ScheduleKind
   $JobOptions.BackupTargetOptions.FullBackupMonthlyScheduleOptions.DayOfWeek = $Schedule.DayOfWeek
   $JobOptions.BackupTargetOptions.FullBackupMonthlyScheduleOptions.DayNumberInMonth = $Schedule.DayNumberInMonth
   Set-VBRJobOptions -Job $job -Options $joboptions
   }
      

You have a Merry Christmas as well! Thanks again for the pointer. Sometimes these things are burried in places that are not logical to me.
jkcouch
Enthusiast
 
Posts: 30
Liked: never
Joined: Sun Jun 26, 2011 7:02 pm
Full Name: Jeff Couch


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 8 guests