Comprehensive data protection for all workloads
Post Reply
dgapinski
Enthusiast
Posts: 62
Liked: 4 times
Joined: Dec 05, 2013 8:09 pm
Full Name: Dan Gapinski
Contact:

Querying the Veeam database

Post by dgapinski »

Hello,

I am hoping you could point me in the right direction for the future. When I look at job history in the GUI, I sometimes see references for "vm-###" or datastore-###" or "host-###". I thought I could write a quick lookup program, but I am not seeing where these references are in the Veeam database. When I write those queries, what would I call?
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Querying the Veeam database

Post by veremin »

Are you looking for SQL query or you wouldn't mind utilizing PowerShell for that? Mentioned entities are uniquer identifiers of VMware objects and can be found somewhere in virtual infrastructure table (I'm not that familiar with backup server db structure, so, it's more like a speculation). Thanks.
dgapinski
Enthusiast
Posts: 62
Liked: 4 times
Joined: Dec 05, 2013 8:09 pm
Full Name: Dan Gapinski
Contact:

Re: Querying the Veeam database

Post by dgapinski »

Thank you - not sure what PS commands I'd use (for example) when looking up a datastore referenced as datastore-### though. How would you do that?
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Querying the Veeam database

Post by veremin »

The following one-liner should meet your expectations (it finds a datastore name, based on the provided morefID):

Code: Select all

asnp veeamPSSnapin
Find-VBRViEntity -server (Get-VBRServer -name "Name of your vCenter") | where {$_.type -eq "datastore" -and $_.reference -eq "datastore-###"} | select name
Thanks.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 59 guests