PowerShell script exchange
Post Reply
rblanco
Novice
Posts: 7
Liked: 2 times
Joined: Sep 11, 2020 6:56 pm
Full Name: Rex Blanco
Contact:

Pause SQL transaction log backup for a few hour window.

Post by rblanco »

Greetings,

Need some help PLEASE. I called support (Case # 04737293) and was told we cannot pause SQL transaction log for a Backup job enabled for SQL App-awareness. The only option is to disable the job by unchecking the entire day but this is not what we need.

We just need to stop transaction log backup on Sundays between 3am and 7am. Reason being is that there is an indexing job that we don't want to interrupt or cause issues running t-log backups during this window.

My powershell knowledge is very limited, I get stuck as soon as i see the red font errors.

Could we somehow stop and disable the job and using task scheduler to accomplish our goal? Or any other suggestions since we cannot do this in the Veeam GUI.

Thank you for any guidance.
ronnmartin61
Veeam Software
Posts: 540
Liked: 193 times
Joined: Mar 07, 2016 3:55 pm
Full Name: Ronn Martin
Contact:

Re: Pause SQL transaction log backup for a few hour window.

Post by ronnmartin61 »

I could be missing something but it sounds like you're just looking for a Powershell snipped to disable a particular job if so then -

Code: Select all

Import-Module Veeam.Backup.PowerShell  #VBR v11 
# --OR--
#Add-PSSnapin VeeamPSSnapin             #VBR v10

$job = Get-VBRJob -Name "My SQL Backup Job"
Disable-VBRJob -Job $job
To re-enable run replace "Disable-VBRJob" w/"Enable-VBRJob"
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Pause SQL transaction log backup for a few hour window.

Post by oleg.feoktistov »

Hi Rex,

I'm afraid there isn't any non-breaking approach to stop transaction log backup session precisely in powershell.
There is SqlBackupOptions.BackupLogsEnabled: boolean property in CObjectInJob class, which would enable/disable sql logs backup processing for each object, but in PS it is implemented as read-only.
So, it's either disabling entire job as Ronn suggested or disabling transaction log backup manually in the UI wizard.

Thanks,
Oleg
rblanco
Novice
Posts: 7
Liked: 2 times
Joined: Sep 11, 2020 6:56 pm
Full Name: Rex Blanco
Contact:

Re: Pause SQL transaction log backup for a few hour window.

Post by rblanco » 1 person likes this post

Thank you both for the responses. The code snippet will work for us and I'll tie it into windows Task scheduler to get it on a scheduled run, or at least that is the goal.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests