Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn
$Job = Get-VBRTapeJob -name "Tapejob-P1-ARBTest"
$FullMediaPool = $job.FullBackupMediaPool
$MonthlyOptions = New-VBRMonthlyOptions -DayNumberInMonth OnDay -DayOfMonth 31 -Month February
$ScheduleOptions = New-VBRBackupToTapeScheduleOptions -MonthlyOptions $MonthlyOptions
Set-VBRBackupToTapeJob -Job $job -FullBackupMediaPool $FullMediaPool
Code: Select all
Set-VBRBackupToTapeJob : OnDay
At C:\Install\Untitled5.ps1:6 char:1
+ Set-VBRBackupToTapeJob -Job $job -FullBackupMediaPool $FullMediaPool
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VBRBackupToTapeJob], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Veeam.Backup.PowerShell.Cmdlets.SetVBRBackupToTapeJob
Even if I then execute something rather innocuous like the below
Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn
$Job = Get-VBRTapeJob -name "Tapejob-P1-ARBTest"
$FullMediaPool = $job.FullBackupMediaPool
$ScheduleOptions = $job.ScheduleOptions
Set-VBRBackupToTapeJob -Job $job -FullBackupMediaPool $FullMediaPool -ScheduleOptions $ScheduleOptions
What 'OnDay' reference is it referring to?
The only reference that I can find is https://helpcenter.veeam.com/backup/pow ... tions.html where as you can see above you execute something like
Code: Select all
$MonthlyOptions = New-VBRMonthlyOptions -DayNumberInMonth OnDay -DayOfMonth 31 -Month February
Code: Select all
PS C:\install> $Job = Get-VBRTapeJob -name "Tapejob-P1-ARBTest"
PS C:\install> $job.ScheduleOptions.MonthlyOptions
Period : 22:00:00
DayNumberInMonth : Fourth
DayOfWeek : Saturday
Months : {January, February, March, April...}
DayOfMonth : 1
If I create the Monthly options code directly via
Code: Select all
PS C:\install> $MonthlyOptions = New-VBRMonthlyOptions -DayNumberInMonth OnDay -DayOfMonth 31 -Month February
PS C:\install> $MonthlyOptions
Period : 22:00:00
DayNumberInMonth : OnDay
DayOfWeek : Saturday
Months : {February}
DayOfMonth : 31
Likewise the issue is present when trying to add a job while specifying MonthlyOptions.
Code: Select all
$MonthlyOptions = New-VBRMonthlyOptions -DayNumberInMonth OnDay -DayOfMonth "31" -Months February
$ScheduleOptions = New-VBRBackupToTapeScheduleOptions -MonthlyOptions $MonthlyOptions
$NotificationOptions = New-VBRNotificationOptions -AdditionalAddress itadmin@arb.com.au -UseNotificationOptions:$false -EnableAdditionalNotification:$true
Add-VBRBackupToTapeJob -name "AAA-TestTapeJob" -EjectCurrentMedium:$false -FullBackupMediaPool "Week2" -IncrementalBackupMediaPool "Week2" -ScheduleOptions $ScheduleOptions -Object $VBRJob -ProcessIncrementalBackup:$true -UseHardwareCompression:$false -WaitForBackupJob:$true -WaitPeriod 10 -NotificationOptions $NotificationOptions
Could someone kindly point out what the issue is? What is the correct syntax to set the monthly full backup schedule? There is no way to disable it which is peculiar to start with but i am trying to get 'around' it by setting it to the 31st of Feb which means it wont ever happen