-
- Service Provider
- Posts: 77
- Liked: 6 times
- Joined: Aug 31, 2015 8:20 pm
- Contact:
List all active Cloud Backup Copy jobs
Hi,
I'm trying to find the PowerShell command that will list all active Cloud Backup Copy jobs. I am able to see this from the Veeam console under Cloud Connect > Last 24 Hours > Running
Can someone please point me in the right direction? I've tried Get-VBRJob however I don't think this includes Cloud Connect jobs as it doesn't return any results.
Cheers!
I'm trying to find the PowerShell command that will list all active Cloud Backup Copy jobs. I am able to see this from the Veeam console under Cloud Connect > Last 24 Hours > Running
Can someone please point me in the right direction? I've tried Get-VBRJob however I don't think this includes Cloud Connect jobs as it doesn't return any results.
Cheers!
-
- Product Manager
- Posts: 8191
- Liked: 1322 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: List all active Cloud Backup Copy jobs
Hi Gunnersaurus,
Unfortunately I cannot test at this moment but I believe you should be looking into this direction:
The above should give you all sessions with a running state (or working).
Let me know
Mike
Unfortunately I cannot test at this moment but I believe you should be looking into this direction:
Code: Select all
$Job = Get-VBRBackupSession #This returns all sessions for backup, backup copy job, replication and file copy jobs
$Job | ? {$_State -eq "Working"} | %{Write-Host $_.Name "-" $_.State}
Let me know
Mike
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
The following one-liner should answer your requirements:
Thanks.
Code: Select all
Get-VBRJob | where {$_.Jobtype -eq "BackupSync" -and $_.isCloudTargetJob() -eq $True -and $_.GetLastState() -eq "Running"} | select name
-
- Service Provider
- Posts: 77
- Liked: 6 times
- Joined: Aug 31, 2015 8:20 pm
- Contact:
Re: List all active Cloud Backup Copy jobs
I have tried both solutions however neither return any results. I should mention that I am attempting to run this on the destination Cloud Connect Veeam server which has the console installed. In other words, tenant Backup Copy jobs are being received on the server that I am trying to run the command from.
-
- Product Manager
- Posts: 8191
- Liked: 1322 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: List all active Cloud Backup Copy jobs
Hi Gunnersaurus,
Could you run it without the ?. So:
This will give you the entire list and you should be able to see everything and the state and see what that returns?
Could you run it without the ?. So:
Code: Select all
$Job = Get-VBRBackupSession
$Job | %{Write-Host $_.Name "-" $_.State}
-
- Product Manager
- Posts: 8191
- Liked: 1322 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: List all active Cloud Backup Copy jobs
Or the oneliner of Vova but remove the last query
Code: Select all
Get-VBRJob | where {$_.Jobtype -eq "BackupSync" -and $_.isCloudTargetJob() -eq $True} | select name, state
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
Ah, tenants' backup copy jobs are not returned by PowerShell queries executed on SP's backup console. Feel free to leverage Veeam ONE Free that should have reports you're looking for. Thanks.In other words, tenant Backup Copy jobs are being received on the server that I am trying to run the command from.
-
- Service Provider
- Posts: 77
- Liked: 6 times
- Joined: Aug 31, 2015 8:20 pm
- Contact:
Re: List all active Cloud Backup Copy jobs
Will using Veeam ONE still allow me use that informatoin in a PowerShell script?v.Eremin wrote:Ah, tenants' backup copy jobs are not returned by PowerShell queries executed on SP's backup console. Feel free to leverage Veeam ONE Free that should have reports you're looking for. Thanks.
Basically, I want to temporarily disable a tenants account but before doing so, I need to make sure no Backup Copy Jobs are running to the MSP backup repository.
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
Veeam ONE does not expose information through PowerShell. As to disabling inactive tenants, have you thought about leveraging LastActive parameter of Tenant object? Make script check the said parameter and disable an account, if last activity happened, say, more than 30 minutes ago.
-
- Service Provider
- Posts: 77
- Liked: 6 times
- Joined: Aug 31, 2015 8:20 pm
- Contact:
Re: List all active Cloud Backup Copy jobs
I had a look at LastActive however for customers where the console shows an active backup, it shows LastActive as either a few hours ago or 1/01/1900.
-
- Novice
- Posts: 8
- Liked: 1 time
- Joined: Nov 17, 2016 2:39 pm
- Full Name: Stig Sörnsen
- Contact:
[MERGED] Last 24 hours in Powershell?
Hi, I would like to get the "Last 24 hours" view in Cloud Connect through Powershell.
But I can't see how to do that?
In Powershell regarding Cloud Connect I can only do the same as the in built Report shows. But the "Last 24 hours" view is quite useful to see if everything has worked as intended an also see which objects has failed if so.
Any help getting that useful info?
But I can't see how to do that?
In Powershell regarding Cloud Connect I can only do the same as the in built Report shows. But the "Last 24 hours" view is quite useful to see if everything has worked as intended an also see which objects has failed if so.
Any help getting that useful info?
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
The information you're looking for currently is not exposed via PowerShell. Have you checked Veeam ONE Cloud Connect free report pack?
-
- Novice
- Posts: 8
- Liked: 1 time
- Joined: Nov 17, 2016 2:39 pm
- Full Name: Stig Sörnsen
- Contact:
Re: List all active Cloud Backup Copy jobs
v.Eremin wrote:The information you're looking for currently is not exposed via PowerShell. Have you checked Veeam ONE Cloud Connect free report pack?
Hi Eremin, thank you for quick reply. Do you know how I can find that information in database? I have gone through alot of tables but haven't found it yet.
-
- Novice
- Posts: 8
- Liked: 1 time
- Joined: Nov 17, 2016 2:39 pm
- Full Name: Stig Sörnsen
- Contact:
Re: List all active Cloud Backup Copy jobs
Found it with a profiler:
This give me exactly what I want. Though I would love to be able to do this with Powershell natively
Code: Select all
SELECT * FROM ReportCloudFilteredSessionsView WITH (readuncommitted, nolock) WHERE (([end_time] > '2017-06-18T15:02:13' or [end_time] = '1900-01-01T00:00:00')) AND (([session_type] = '1' or ([session_type] = '2' or ([session_type] = '4' or [session_type] = '6')))) AND (not (([session_type] = '2' and ([productId] = '{819A7952-2B80-4287-A99A-79DD0578E5AD}' or [productId] = '{2C9E3B09-F27C-4E27-8A8E-CFEF030041F2}')))) AND (([end_time] > '2017-06-18T15:02:13' or [end_time] = '1900-01-01T00:00:00')) AND ([usn] > '0') ORDER BY creation_time desc
This give me exactly what I want. Though I would love to be able to do this with Powershell natively
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
Your voice has been heard, we will see what we can add for this matter in future product releases. By the way, great workaround!
-
- Service Provider
- Posts: 2
- Liked: never
- Joined: Feb 23, 2018 7:47 pm
- Full Name: Steven Garcia
- Contact:
Re: List all active Cloud Backup Copy jobs
v.Eremin.. clearly he is looking for a programmatic means to work around tenant jobs but you keep pushing veeam one reporter? This is not helpful. What is helpful is a way to insert this request into a voting list or some means by which we as Veeam SPs can input our needs as stakeholders.
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
I'm not trying to push anything, it's more about me suggesting existing solution that answers OP's requirements.
If Veeam ONE is not something you'd like to stick with, then, there is a programmatic workaround given on a previous page.
Anyway, consider your vote for PS enhancement counted.
Thanks.
If Veeam ONE is not something you'd like to stick with, then, there is a programmatic workaround given on a previous page.
Anyway, consider your vote for PS enhancement counted.
Thanks.
-
- Service Provider
- Posts: 11
- Liked: never
- Joined: Jul 25, 2019 1:11 pm
- Full Name: Christophe Niel
- Contact:
[MERGED] List running jobs/session in Cloud Connect replicas
Hello
I'm hosting a cloud connect with multiple tenants, one gateway a few dozen replicas
I'm trying to get the running replicas jobs (or more precisely the ones named "Cloud Backup Copy" in the Session Type)
my goal is to know when there are no active replication to do a bit of maintenance and cleanup on my proxies as I have a bug where the disks are staying mounted on the proxies and that is causing a lot of problems. this is not the issue of this post, ticket are already opened.
my problem is I can't seem to find active session for Jobs I don't have (they setup in my tenant server I don't see), and I could find a command in powershell Cloud Connect API to get active sessions.
Is there a way to get the running sessions in a command line (not powershell would be ok) ?
if there are no way to get it now, is it planned some time in the future?
thanks in advance
Christophe Niel
I'm hosting a cloud connect with multiple tenants, one gateway a few dozen replicas
I'm trying to get the running replicas jobs (or more precisely the ones named "Cloud Backup Copy" in the Session Type)
my goal is to know when there are no active replication to do a bit of maintenance and cleanup on my proxies as I have a bug where the disks are staying mounted on the proxies and that is causing a lot of problems. this is not the issue of this post, ticket are already opened.
my problem is I can't seem to find active session for Jobs I don't have (they setup in my tenant server I don't see), and I could find a command in powershell Cloud Connect API to get active sessions.
Is there a way to get the running sessions in a command line (not powershell would be ok) ?
if there are no way to get it now, is it planned some time in the future?
thanks in advance
Christophe Niel
-
- Service Provider
- Posts: 153
- Liked: 34 times
- Joined: Dec 18, 2017 8:58 am
- Full Name: Bill Couper
- Contact:
Re: List running jobs/session in Cloud Connect replicas
Don't do cloud connect replicas here, but if it works similar to cloud connect backups the 'last active date' is set to 1/1/1900 when it's running
-
- Service Provider
- Posts: 11
- Liked: never
- Joined: Jul 25, 2019 1:11 pm
- Full Name: Christophe Niel
- Contact:
Re: List running jobs/session in Cloud Connect replicas
Hi, thanks for your response
My problem is I can't even list the jobs or sessions from the veaam cloud connect.
I can get normal veeam B&R job and session.
What do you use as a command to event list the jobs?
Thanks in advance
My problem is I can't even list the jobs or sessions from the veaam cloud connect.
I can get normal veeam B&R job and session.
What do you use as a command to event list the jobs?
Thanks in advance
-
- Service Provider
- Posts: 11
- Liked: never
- Joined: Jul 25, 2019 1:11 pm
- Full Name: Christophe Niel
- Contact:
Re: List running jobs/session in Cloud Connect replicas
ah, I can't edit a post
maybe I should insist on the fact I am on the Service Provider (SP) side, not the Client side.
maybe I should insist on the fact I am on the Service Provider (SP) side, not the Client side.
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
This information is not available in PS or REST. You can use Veeam ONE free report pack, though. Thanks!
-
- Service Provider
- Posts: 11
- Liked: never
- Joined: Jul 25, 2019 1:11 pm
- Full Name: Christophe Niel
- Contact:
Re: List all active Cloud Backup Copy jobs
Thanks for your answer, but that is not a valid (acceptable) answer but I'll contact support from now on, even with the B&R admin console I don't even know which resources (ie: MY proxies) are being used by the clients..
I'm setting up a cloud with automation and bots, and I'm not sure if I need a software that must to have an UI and a human to read the output to make our cloud working.
I'm setting up a cloud with automation and bots, and I'm not sure if I need a software that must to have an UI and a human to read the output to make our cloud working.
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
I'm not sure that support team will help you with this issue. The can log feature request, sure, but you've done exactly that by posting your query here.
For now you can try db approach mentioned above or CC reports available in Veeam ONE.
Thanks; consider your vote counted!
For now you can try db approach mentioned above or CC reports available in Veeam ONE.
Thanks; consider your vote counted!
-
- Service Provider
- Posts: 11
- Liked: never
- Joined: Jul 25, 2019 1:11 pm
- Full Name: Christophe Niel
- Contact:
Re: List all active Cloud Backup Copy jobs
Thanks for your answer
Yes i was hoping to ask for a feature request to support, didn't know posting here would help for this.
I'll look into the db in the next days, if I find something I'll post it
Veeamone is not in my scope, I'll check with the team.
Best regards
Yes i was hoping to ask for a feature request to support, didn't know posting here would help for this.
I'll look into the db in the next days, if I find something I'll post it
Veeamone is not in my scope, I'll check with the team.
Best regards
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: List all active Cloud Backup Copy jobs
Since you're a Cloud Connect Provider, then, Veeam ONE (or its Cloud Connect report features) are available for you free. So, might be worth checking. Thanks!
-
- VeeaMVP
- Posts: 695
- Liked: 374 times
- Joined: Jun 24, 2019 1:39 pm
- Full Name: Chris Arceneaux
- Location: Georgia, USA
- Contact:
Re: List all active Cloud Backup Copy jobs
I've discovered a PowerShell method for retrieving this information. Please keep in mind that an undocumented API is being used so it's subject to change.
The output shows more than just Backup Copy Jobs and Replica Jobs:
If you're simply checking if there are any active sessions, let's say prior to a scheduled maintenance, the below one-liner will report the number of active sessions:
Code: Select all
[Veeam.Backup.Core.CCloudSession]::GetAll()
If you're simply checking if there are any active sessions, let's say prior to a scheduled maintenance, the below one-liner will report the number of active sessions:
Code: Select all
([Veeam.Backup.Core.CCloudSession]::GetAll() | ?{$_.JobName -ne "Console"} | ?{$_.State -eq "Working"}).Count
-
- Service Provider
- Posts: 50
- Liked: 15 times
- Joined: Nov 15, 2016 3:38 pm
- Full Name: Bart van de Beek
- Contact:
Re: List all active Cloud Backup Copy jobs
Even a little more direct for what people are looking for here:
[Veeam.Backup.Core.CCloudSession]::GetRunning()|? CloudType -eq BackupCopy
(GetAll() takes ages, at least in my environment, while the above one completes in seconds)
[Veeam.Backup.Core.CCloudSession]::GetRunning()|? CloudType -eq BackupCopy
(GetAll() takes ages, at least in my environment, while the above one completes in seconds)
-
- Service Provider
- Posts: 170
- Liked: 54 times
- Joined: Nov 20, 2019 5:44 pm
- Full Name: Tyler Jurgens
- Contact:
Re: List all active Cloud Backup Copy jobs
I ran into the same command a long while back as well
Anyone have an updated command that works with v12, or maybe even a proper powershell module?
However, it seems with v12 it no longer returns anything.[Veeam.Backup.Core.CCloudSession]::GetRunning()
Code: Select all
PS C:\Windows\system32> [Veeam.Backup.Core.CCloudSession]::GetRunning()
Exception calling "GetRunning" with "0" argument(s): "Object reference not set to an instance of an object."
At line:1 char:1
+ [Veeam.Backup.Core.CCloudSession]::GetRunning()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : NullReferenceException
-
- Veeam Software
- Posts: 2123
- Liked: 513 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: List all active Cloud Backup Copy jobs
Hi @tjurgens,
I think it's likely that the modules haven't fully loaded. I noticed that .NET reflection doesn't seem to work in v12 until you actually run an official cmdlet; I'm not sure on the reason, but I suspect it's that the DLLs don't get fully loaded for reflection until you actually invoke a cmdlet; likely it's a performance improvement to avoid unnecessary loading.
Try running a simple cmdlet before you run any .NET reflection (like Connect-VBRServer or Get-VBRLicenseAutoUpdateStatus), then try the reflection again.
I think it's likely that the modules haven't fully loaded. I noticed that .NET reflection doesn't seem to work in v12 until you actually run an official cmdlet; I'm not sure on the reason, but I suspect it's that the DLLs don't get fully loaded for reflection until you actually invoke a cmdlet; likely it's a performance improvement to avoid unnecessary loading.
Try running a simple cmdlet before you run any .NET reflection (like Connect-VBRServer or Get-VBRLicenseAutoUpdateStatus), then try the reflection again.
David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: No registered users and 11 guests