PowerShell script exchange
Post Reply
sfaits
Enthusiast
Posts: 35
Liked: 7 times
Joined: Apr 07, 2017 7:08 pm
Contact:

Finding what proxies are in use with running job

Post by sfaits »

I am attempting to write a script that can help our patching team quickly ID veeam Proxy servers that are in use so they do not get restarted when they are backing something up.

I can easily find names of jobs that are running and say hey this job is using the repo server, this storage, and the veeam master server (we only have one of each of those).
I cannot find anything that shows what proxies are in use for that job though. Our jobs are configured to use any proxy that is available.

Is there method beyond scouring the running backup job logs? I have been searching on this for a while and have not found anything that fits.

Given audit restrictions I am not able to install the PowershellCookbook, just gotta stick with plain Powershell 5.1 for the moment and veeam v11.

Thanks!
jhoughes
Veeam Vanguard
Posts: 279
Liked: 112 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: Finding what proxies are in use with running job

Post by jhoughes »

You only need the Get-VBRJobProxy cmdlet.
Husband, Father, Solutions Architect, Geek Extraordinaire | @DenverVMUG, @AustinVMUG & @ATXPowerShell leader | VMware vExpert | Cisco Champion
sfaits
Enthusiast
Posts: 35
Liked: 7 times
Joined: Apr 07, 2017 7:08 pm
Contact:

Re: Finding what proxies are in use with running job

Post by sfaits »

That just returns a list of proxies available to the job not the ones that are actually being used by the job.

I have 4 proxies, A, B, C, D, and a job named test with 3 Virtual machines with two disks each.
Test has the Backup Proxy (in the Storage section of the setup) set to Automatic so it can use any or all of the 4 proxies during a job run.

When I run the test job and I look at it in the GUI console I am seeing information like "Using backup proxy A for Hard Disk 1 [hotadd], Using backup proxy A for Hard Disk 2 [hotadd] and so forth for each of the six disks. In this run of test it choose to use proxies A, B, and D.

I ran my powershell script with the Get-VBRJobProxy -Job "Test" and it returns a list of all four proxies, A, B, C, D, not the A,B,D that are actually being used.
jhoughes
Veeam Vanguard
Posts: 279
Liked: 112 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: Finding what proxies are in use with running job

Post by jhoughes »

If you have the proxy selection set to automatic, then you would have to look through the logs to determine which are actually in use during a running job.
Husband, Father, Solutions Architect, Geek Extraordinaire | @DenverVMUG, @AustinVMUG & @ATXPowerShell leader | VMware vExpert | Cisco Champion
Morgenn
Lurker
Posts: 1
Liked: never
Joined: Feb 28, 2023 10:38 am
Contact:

Re: Finding what proxies are in use with running job

Post by Morgenn »

There are multiple logs in multiple lcoations, any suggestions on which log to look in?
Gostev
Chief Product Officer
Posts: 31460
Liked: 6648 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Finding what proxies are in use with running job

Post by Gostev »

Select a VM in the job session window, and you will see backup proxy used for each disk in the Action log to the right.
david.domask
VeeaMVP
Posts: 1034
Liked: 278 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Finding what proxies are in use with running job

Post by david.domask »

For the original question in the thread, there's a neat function of the Veeam.Backup.Manager.exe you can do.

Open Powershell or cmd on the VBR server and cd to the following directory:

C:\Program Files\Veeam\Backup and Replication\Backup

Then you can run Veeam.Backup.Manager.exe -SHOWPROXYUSAGES

This will return a live output of the proxy and repository usages:

Code: Select all

---------------------------------------------------------------------------------------------------
| Resource name                  | Usage | Id                                                      |
|-------------------------------------------------------------------------------- Hyper-V Proxies -|
| <there are no resources in use>                                                                  |
|-------------------------------------------------------------------------------- vSphere Proxies -|
| VMware Backup Proxy            | 1     | {18b661c1-d9dc-4233-90a0-7e7b10dc2d09}                  |
|-------------------------------------------------------------------------------- Azure Proxies -|
| <there are no resources in use>                                                                  |
|----------------------------------------------------------------------------------- Repositories -|
| perjob                         | 1     | {8237246c-2349-4373-a738-985cf9b252dc}                  |
| some-local-repo                | 1     | {f2fa6289-b2e3-4f24-95a9-febdbf21beed}                  |
|------------------------------------------------------------------------------------------- WANs -|
| <there are no resources in use>                                                                  |
|--------------------------------------------------------------------------- Log Shipping Servers -|
| <there are no resources in use>                                                                  |
|------------------------------------------------------------------------------ VSS Proxy Servers -|
| <there are no resources in use>                                                                  |
|---------------------------------------------------------------------------- ESXs (VMware Hosts) -|
| <there are no resources in use>                                                                  |
----------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------
| Mount point                                                                                                     |
| Id                                     | Usage | Host                           | Is CSV | Is SMB | Is Hardware |
|----------------------------------------------------------------------------------------------- Hyper-V Volumes -|
| <there are no resources in use>                                                                                 |
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
| Vm                                                     | Host                                                   |
| Datastores                                                                                                      |
|---------------------------------------------------------------------------------------- Snapshots Removing VMs -|
| <there are no resources in use>                                                                                 |
-------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------
| Host                           | Datastore                      | Latency                                                          |
|---------------------------------------------------------------------------------------------------------- Used datastores latency -|
| <there are no resources in use>                                                                                                    |
--------------------------------------------------------------------------------------------------------------------------------------
If you're just needing a quick check of what's in use, it's best.

If you need to do reporting for some reason, describe the need and maybe there's a VeeamOne report that better matches, or we can figure out the usage.
David Domask | Director: Customer Care | Veeam Technical Support
sschlott
Veeam Software
Posts: 54
Liked: 1 time
Joined: Jan 05, 2023 2:19 pm
Full Name: Sebastian Schlott
Contact:

Re: Finding what proxies are in use with running job

Post by sschlott »

Good morning David,
Has this command been retired in v12?
david.domask
VeeaMVP
Posts: 1034
Liked: 278 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Finding what proxies are in use with running job

Post by david.domask »

Hi @sschlott,

EDIT: nevermind, I just had issue on my lab. @sschlott, looks alive and kicking to me :)

Image
David Domask | Director: Customer Care | Veeam Technical Support
sschlott
Veeam Software
Posts: 54
Liked: 1 time
Joined: Jan 05, 2023 2:19 pm
Full Name: Sebastian Schlott
Contact:

Re: Finding what proxies are in use with running job

Post by sschlott »

In 12.1 seeams to be different
Image
david.domask
VeeaMVP
Posts: 1034
Liked: 278 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Finding what proxies are in use with running job

Post by david.domask »

You have a space after the - :)

Either remove space or remove dash, it will accept both. e.g.:

.\Veeam.Backup.Manager.exe -SHOWPROXYUSAGES
or
.\Veeam.Backup.Manager.exe SHOWPROXYUSAGES
David Domask | Director: Customer Care | Veeam Technical Support
sschlott
Veeam Software
Posts: 54
Liked: 1 time
Joined: Jan 05, 2023 2:19 pm
Full Name: Sebastian Schlott
Contact:

Re: Finding what proxies are in use with running job

Post by sschlott »

Shame on me, thanks a lot!
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests