PowerShell script exchange
Post Reply
IainMcLaren
Lurker
Posts: 2
Liked: never
Joined: Dec 19, 2023 12:06 pm
Full Name: Iain McLaren
Contact:

Identifying SQL backup jobs

Post by IainMcLaren »

Hi

I am creating a Veeam PowerShell script to output job config to a CSV file. However I am targeting it at only those Jobs which are doing SQL backups.

I used the following to gather that list : Get-VBRJob | Where-Object { $_.SqlEnabled -eq "True" }

I test this on one Veeam instance (I look after several) and it work correctly. I then ran it on all the other instance which seemed to work fine, however in one instance it only returned one job where I know there are 3 jobs. A manual check confirmed this.

I believe this information is stored in the BJobs table in the Veeam SQL Config DB, and right enough there is a column called SQL_Enabled and only one job is set to "1" (True).

Does anyone know if this column has been deprecated or if there is a better way to identify only SQL jobs. I could search for only Application Aware jobs, but that would return Exchange jobs and other Jobs which I don't want.

Thanks in advance for any help.

Iain
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Identifying SQL backup jobs

Post by david.domask »

Hi @IainMcLaren,

Should be reliable property as far as I know. Can you toggle the SQL Log Backup option off/on again (save after disable, then edit job again) for one of the jobs not being caught and see if it "corrects" it?

Also these are all VM jobs you're checking or Agent jobs as well?
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests