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?
-
- Enthusiast
- Posts: 62
- Liked: 4 times
- Joined: Dec 05, 2013 8:09 pm
- Full Name: Dan Gapinski
- Contact:
-
- Product Manager
- Posts: 20285
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Querying the Veeam database
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.
-
- Enthusiast
- Posts: 62
- Liked: 4 times
- Joined: Dec 05, 2013 8:09 pm
- Full Name: Dan Gapinski
- Contact:
Re: Querying the Veeam database
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?
-
- Product Manager
- Posts: 20285
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Querying the Veeam database
The following one-liner should meet your expectations (it finds a datastore name, based on the provided morefID):
Thanks.
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
Who is online
Users browsing this forum: AdsBot [Google], Google [Bot], Semrush [Bot] and 73 guests