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:

VSS-Options.SqlBackupOptions.BackupLogsEnabled is read-only?

Post by manuel.aigner »

Hi there,

We are new with veeam and ATM in implementation state.
So there are some scripting ToDos for automation.
ATM I'm struggling with the Veeam.Backup.Model.CSqlBackupOptions object which is a sub-property generated by New-VBRJobVssOptions -ForObject.

I need to enable SQL log backup every 15min. But it seems that SQLBackupOption.BackupLogsEnabled is read-only.
How can I enable it? I can't find any method in this object which would do this for me. Also the documentation in helpcenter is quit simple and not revealing...

Code: Select all

PS C:\Windows> $vssOption.SqlBackupOptions.BackupLogsEnabled = $true
"BackupLogsEnabled" ist eine schreibgeschützte Eigenschaft.
In Zeile:1 Zeichen:1
+ $vssOption.SqlBackupOptions.BackupLogsEnabled = $true
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException
get-member

Code: Select all

PS C:\Windows> $vssOption.SqlBackupOptions | get-member


   TypeName: Veeam.Backup.Model.CSqlBackupOptions

Name                      MemberType Definition
----                      ---------- ----------
Apply                     Method     void Apply(Veeam.Backup.Model.CSqlBackupOptions options)
Equals                    Method     bool Equals(System.Object obj)
GetHashCode               Method     int GetHashCode()
GetType                   Method     type GetType()
ToString                  Method     string ToString()
BackupLogsEnabled         Property   bool BackupLogsEnabled[b] {get;}[/b]
BackupLogsFrequencyMin    Property   int BackupLogsFrequencyMin {get;set;}
CredsId                   Property   guid CredsId {get;set;}
NeverTruncateLogs         Property   bool NeverTruncateLogs {get;}
ProxyAutoSelect           Property   bool ProxyAutoSelect {get;set;}
RetainDays                Property   int RetainDays {get;set;}
TransactionLogsProcessing Property   Veeam.Backup.Model.ETransactionLogsProcessing TransactionLogsProcessing {get;set;}
UseDbBackupRetention      Property   bool UseDbBackupRetention {get;set;}
manuel.aigner
Enthusiast
Posts: 31
Liked: 5 times
Joined: Sep 25, 2017 8:25 am
Full Name: Manuel Aigner
Contact:

Re: VSS-Options.SqlBackupOptions.BackupLogsEnabled is read-o

Post by manuel.aigner »

Hmm ok... I found out "BackupLogsEnabled" will be changed implicit to true if I change TransactionLogsProcessing to "Backup"

But now I see my next problem. Due to our DMZ and firewall situation only our "Instant-Recovery Servers" are have all necessary open firewall ports. Therefore the auto proxy selection for log shipping will run sub optimal. Most of trialed proxies will run in connection timeout.

I can choose Guest interaction proxies to the whole backup job via Set-VBRJobProxy. But I don't see a possibility to choose my "Log Shipping proxies" via powershell.
There is only a Bool-Property to enable or disable ProxyAutoSelect

Code: Select all

PS C:\Windows> $vssEigapp.SqlBackupOptions


TransactionLogsProcessing : Backup
BackupLogsEnabled         : True
NeverTruncateLogs         : False
BackupLogsFrequencyMin    : 15
UseDbBackupRetention      : True
RetainDays                : 15
ProxyAutoSelect           : False
CredsId                   : 00000000-0000-0000-0000-000000000000
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests