-
- Influencer
- Posts: 12
- Liked: 1 time
- Joined: Dec 20, 2021 1:13 pm
- Full Name: Telmo Eduardo Dos Santos
- Contact:
Get-VbrBackupSession show old values, not last sessions
When I run in powershell the command:
Get-VbrBackupSession | where-object {$_.JobName -eq "job name"}
Job Name State Start Time End Time Result
-------- ----- ---------- -------- ------
job name (Full) Stopped 06/03/2023 11:28:25 06/03/2023 11:28:51 Failed,
this shows old value and not the last session, this happens already a month ago.
has it ever happened to you?
Get-VbrBackupSession | where-object {$_.JobName -eq "job name"}
Job Name State Start Time End Time Result
-------- ----- ---------- -------- ------
job name (Full) Stopped 06/03/2023 11:28:25 06/03/2023 11:28:51 Failed,
this shows old value and not the last session, this happens already a month ago.
has it ever happened to you?
-
- Veeam Software
- Posts: 538
- Liked: 191 times
- Joined: Mar 07, 2016 3:55 pm
- Full Name: Ronn Martin
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Without specifying a sort order this isn't too surprising. Try sorting the output -
Code: Select all
Get-VbrBackupSession | where-object {$_.JobName -eq "job name"} | Sort-Object -Property EndTime -Descending
-
- Influencer
- Posts: 12
- Liked: 1 time
- Joined: Dec 20, 2021 1:13 pm
- Full Name: Telmo Eduardo Dos Santos
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Yes, as you say, it is with the command and performing a sorting, sorry for having put it wrong in the initial post
PS C:\Users\admabast1> Get-VbrBackupSession | where-object {$_.JobName -eq "job name"} | Sort-Object -Property EndTime -Descending
Job Name State Start Time End Time Result
-------- ----- ---------- -------- ------
job name Stopped 06/03/2023 11:28:25 06/03/2023 11:28:51 Failed
PS C:\Users\admabast1> Get-VbrBackupSession | where-object {$_.JobName -eq "job name"} | Sort-Object -Property EndTime -Descending
Job Name State Start Time End Time Result
-------- ----- ---------- -------- ------
job name Stopped 06/03/2023 11:28:25 06/03/2023 11:28:51 Failed
-
- Veeam Software
- Posts: 2123
- Liked: 513 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Hi @tedossantos,
Is this an agents item you're checking or a Hypervisor backups? The filtering on the Job Name might be matching on another similarly named job.
Can you try Where-Object {$_.JobID -eq 'id of the desired job'}?
You can get the job ID from Get-VBRJob/Get-VBRComputerBackupJob
Is this an agents item you're checking or a Hypervisor backups? The filtering on the Job Name might be matching on another similarly named job.
Can you try Where-Object {$_.JobID -eq 'id of the desired job'}?
You can get the job ID from Get-VBRJob/Get-VBRComputerBackupJob
David Domask | Product Management: Principal Analyst
-
- Influencer
- Posts: 12
- Liked: 1 time
- Joined: Dec 20, 2021 1:13 pm
- Full Name: Telmo Eduardo Dos Santos
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Hi @david.domask,
it's a windows agent backup.
When I run the command:
Get-VBRJob -Name "job name"
Job Name Type State Last Result
-------- ---- ----- -----------
job Name Windows Agen... Stopped Success
the Last Result does appear as succesful
but when i run
Get-VbrBackupSession | where-object {$_.JobID -eq "job_ID"} | Sort-Object -Property EndTime -Descending
Now nothing is displayed.
it's a windows agent backup.
When I run the command:
Get-VBRJob -Name "job name"
Job Name Type State Last Result
-------- ---- ----- -----------
job Name Windows Agen... Stopped Success
the Last Result does appear as succesful
but when i run
Get-VbrBackupSession | where-object {$_.JobID -eq "job_ID"} | Sort-Object -Property EndTime -Descending
Now nothing is displayed.
-
- Veeam Software
- Posts: 2123
- Liked: 513 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Try using the Get-VBRComputerBackupJob and Get-VBRComputerBackupJobSession: https://helpcenter.veeam.com/docs/backu ... ml?ver=120
Get-VBRJob is technically deprecated for retrieving Agents based backups, and my guess is that you're also seeing some older things like policy retries returned.
Get the JobID of the Agent Job you want to track, and filter with | Where-Object {$_.JobId -eq 'id of the job you want to check'}
Get-VBRJob is technically deprecated for retrieving Agents based backups, and my guess is that you're also seeing some older things like policy retries returned.
Get the JobID of the Agent Job you want to track, and filter with | Where-Object {$_.JobId -eq 'id of the job you want to check'}
David Domask | Product Management: Principal Analyst
-
- Influencer
- Posts: 12
- Liked: 1 time
- Joined: Dec 20, 2021 1:13 pm
- Full Name: Telmo Eduardo Dos Santos
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
I think both commands were not yet implemented in my version of veeam (9.5u4)
+ Get-VBRComputerBackupJob
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-VBRComputerBackupJob:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
En línea: 1 Carácter: 1
+ Get-VBRComputerBackupJobSession
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-VBRComputerBackupJobSession:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
+ Get-VBRComputerBackupJob
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-VBRComputerBackupJob:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
En línea: 1 Carácter: 1
+ Get-VBRComputerBackupJobSession
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-VBRComputerBackupJobSession:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
-
- Veeam Software
- Posts: 2123
- Liked: 513 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
AH, sorry, I didn't realize you were on an older version.
To be honest, the cmdlets from that time were not optimized as well for Agents based items (it was in development at that time), so I think it would be best if:
1. Upgrade to a newer version is possible: I realize this is pretty significant, but 9.5U4 is End of Support and Fix and Life, and likely it's going to be a bit of work to dig up the old documentation on this.
2. You might want to try unsupported methods here. Get the JobID with Get-VBRJob, then check the output of
[Veeam.Backup.Core.CBackupSession]::GetAll()
Check the properties and you should be able to filter on some of those properties and find the information you want based on the JobID.
To be honest, the cmdlets from that time were not optimized as well for Agents based items (it was in development at that time), so I think it would be best if:
1. Upgrade to a newer version is possible: I realize this is pretty significant, but 9.5U4 is End of Support and Fix and Life, and likely it's going to be a bit of work to dig up the old documentation on this.
2. You might want to try unsupported methods here. Get the JobID with Get-VBRJob, then check the output of
[Veeam.Backup.Core.CBackupSession]::GetAll()
Check the properties and you should be able to filter on some of those properties and find the information you want based on the JobID.
David Domask | Product Management: Principal Analyst
-
- Influencer
- Posts: 12
- Liked: 1 time
- Joined: Dec 20, 2021 1:13 pm
- Full Name: Telmo Eduardo Dos Santos
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Something wrong with the database, with [Veeam.Backup.Core.CBackupSession]::GetAll() the last sessions do not appear.
however with Get-VBRJob yes.
however with Get-VBRJob yes.
-
- Veeam Software
- Posts: 2123
- Liked: 513 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Sorry to hear it; is upgrading to a Supported Version possible by chance or you can't due to license/older devices you need to continue to work with?
Just as noted, it will be very difficult to advise without seeing what's actually in your Configuration Database and your full code. With an upgrade, we can check it out on a case.
Just as noted, it will be very difficult to advise without seeing what's actually in your Configuration Database and your full code. With an upgrade, we can check it out on a case.
David Domask | Product Management: Principal Analyst
-
- Influencer
- Posts: 12
- Liked: 1 time
- Joined: Dec 20, 2021 1:13 pm
- Full Name: Telmo Eduardo Dos Santos
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
We try de upgrade, thanks for youre help
-
- Veeam Software
- Posts: 2123
- Liked: 513 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Get-VbrBackupSession show old values, not last sessions
Happy to advise and glad it's possible.
If you still have issues on a supported version, update the thread with your current script and I'll do what I can to advise.
If you still have issues on a supported version, update the thread with your current script and I'll do what I can to advise.
David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: No registered users and 9 guests