Code: Select all
$o = New-VBRJobVSSoptions
$o.Enabled = $true
$o.WinCredsId = $vbrcred.id
$o.VssSnapshotOptions.Enabled = $true
$o.IgnoreErrors = $false
#set sql options
$o.SqlBackupOptions.TransactionLogsProcessing.TruncateOnlyOnSuccessJob
$o.SqlBackupOptions.TransactionLogsProcessing = "Backup"
$o.SqlBackupOptions.BackupLogsFrequencyMin = 15
$o.SqlBackupOptions.UseDbBackupRetention = $true
$o.SqlBackupOptions.RetainDays = 15
$o.SqlBackupOptions.ProxyAutoSelect = $true
#set exchange options
$o.ExchangeBackupOptions.TransactionLogsProcessing.TruncateOnlyOnSuccessJob
Get-VBRJob -Name $job | Get-VBRJobObject -Name $tag | Set-VBRJobObjectVssOptions -Options $o
SqlEnabled : False
.....
VssOptions : VssSnapshotOptions: [Enabled: [True], IgnoreErrors: [False], IsCopyOnly: [False]],
WinGuestFSIndexingOptions: [Type: [None]], LinGuestFSIndexingOptions: [Type: [None]],
SqlBackupOptions: [TransactionLogsProcessing: [Backup], BackupLogsFrequencyMin: [15],
UseDbBackupRetention: [True], RetainDays: [15], ProxyAutoSelect: [True]],
ExchangeBackupOptions: [TransactionLogsProcessing: [TruncateOnlyOnSuccessJob]],
WinCredsId: [313bd032-3a08-4dc2-8cb7-aa72274c1e47], LinCredsId:
[00000000-0000-0000-0000-000000000000], Old Properties: [Enabled: [True], IgnoreErrors:
[False], GuestFSIndexingType: [None], IncludedIndexingFolders: [],
ExcludedIndexingFolders: [], LinGuestFSIndexingType: [None],
LinIncludedIndexingFolders: [], LinExcludedIndexingFolders: [], IsFirstUsage: [True]]
[/code]
The Job is setup correctly but the SQL log backup doesn't start.
If I right-click the Job in the GUI --> Edit --> Finish, the SQL log Backup start. The Job looks like this:
SqlEnabled : True
....
VssOptions : VssSnapshotOptions: [Enabled: [True], IgnoreErrors: [False], IsCopyOnly: [False]],
WinGuestFSIndexingOptions: [Type: [None]], LinGuestFSIndexingOptions: [Type: [None]],
SqlBackupOptions: [TransactionLogsProcessing: [TruncateOnlyOnSuccessJob],
BackupLogsFrequencyMin: [15], UseDbBackupRetention: [True], RetainDays: [15],
ProxyAutoSelect: [True]], ExchangeBackupOptions: [TransactionLogsProcessing:
[TruncateOnlyOnSuccessJob]], WinCredsId: [313bd032-3a08-4dc2-8cb7-aa72274c1e47],
LinCredsId: [00000000-0000-0000-0000-000000000000], Old Properties: [Enabled: [True],
IgnoreErrors: [False], GuestFSIndexingType: [None], IncludedIndexingFolders: [],
ExcludedIndexingFolders: [], LinGuestFSIndexingType: [None],
LinIncludedIndexingFolders: [], LinExcludedIndexingFolders: [], IsFirstUsage: [True]]
SqlBackupOptions.TransactionLogsProcessing = "Backup" is the only Way to let the Job backup the SQL Log.