PowerShell script exchange
Post Reply
costas
Influencer
Posts: 10
Liked: 2 times
Joined: Jan 07, 2022 10:37 am
Full Name: Costas Loupas
Contact:

Get-VBRPluginBackupSession - where is the log?

Post by costas »

Hi

We just upgraded to 12.2 and i noticed that when i run the Get-VBRPluginBackupSession, the log property is empty. It was not the case before as i use it to extract information.
Any ideas? I would like it back

Thanks
Costas
david.domask
Veeam Software
Posts: 2663
Liked: 617 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get-VBRPluginBackupSession - where is the log?

Post by david.domask »

Hi Costas,

I'm afraid I don't have a VBR server on 12.1 with any log backup sessions, but do you maybe have an example of what it used to show?

I'm not sure what changed but I see the same behavior, and while I'm not sure what it had previously, VBRLogItem are log entries from the UI and looks like we can return this with an unlisted cmdlet:

Code: Select all

PS C:\Users\david.LAB\Desktop> $sess[0]|gm


   TypeName: Veeam.Backup.PowerShell.Infos.VBRPluginBackupSession

Name         MemberType Definition
----         ---------- ----------
Equals       Method     bool Equals(System.Object obj)
GetHashCode  Method     int GetHashCode()
GetType      Method     type GetType()
ToString     Method     string ToString()
CreationTime Property   datetime CreationTime {get;}
EndTime      Property   System.Nullable[datetime] EndTime {get;}
Id           Property   guid Id {get;}
JobId        Property   guid JobId {get;}
Log          Property   Veeam.Backup.PowerShell.Infos.VBRLogItem[] Log {get;}
Name         Property   string Name {get;}
Result       Property   Veeam.Backup.PowerShell.Infos.VBRSessionResult Result {get;}
SessionType  Property   Veeam.Backup.PowerShell.Infos.VBRJobType SessionType {get;}
State        Property   Veeam.Backup.PowerShell.Infos.VBRSessionState State {get;}

PS C:\Users\david.LAB\Desktop> Get-VBRLogItem -Session $sess[0]

Id          : 19077155
Usn         : 4014025834
Title       : Oracle RMAN Backup job started at 04.10.2024 09:24:36
Cookie      :
Description :
Time        : 04.10.2024 09:25:06
StartTime   : 04.10.2024 09:24:36
Status      : Succeeded
Can you confirm this type of data is what you were expecting? I will try to understand what changed and why and if this workaround is supported, but if you could confirm this is what you were relying on, would be great.
David Domask | Product Management: Principal Analyst
costas
Influencer
Posts: 10
Liked: 2 times
Joined: Jan 07, 2022 10:37 am
Full Name: Costas Loupas
Contact:

Re: Get-VBRPluginBackupSession - where is the log?

Post by costas »

Hi David

Thanks for your reply.
I can confim that get-vbrlogitem returns the log for the session.

Before the upgrade the output of the getsession cldlet was like this (JSON):
"SessionType": 23,
"Log": [
{
"Id": 4031662,
"Usn": 105047739,
"Title": "Microsoft SQL Server Backup job started at 9/25/2024 8:52:16 AM",
"Cookie": "",
"Description": "",
"Time": "\/Date(1727279553993)\/",
"StartTime": "\/Date(1727279536837)\/",
"Status": 1
},
{
"Id": 4031665,
"Usn": 105047681,
"Title": "Progress bar is disabled, status will be updated upon job completion",
"Cookie": "{f11071f9-9f7f-4120-9631-20c1dd2084e1}",
"Description": "",
"Time": "\/Date(1727279539337)\/",
"StartTime": "\/Date(1727279539337)\/",
"Status": 1

The get log one returns the same:
Id : 4031672
Usn : 105047727
Title : Creating metadata
Cookie : 854ca428-2b88-4f89-81-6f5ec62bcad
Description :
Time : 9/25/2024 8:52:33 AM
StartTime : 9/25/2024 8:52:32 AM
Status : Succeeded

Id : 4031674
Usn : 105047733
Title : Session failed: Failed to backup database VQA0OLL. Error: Error code: 0x80070005 Access
denied. You must be logged in as a Windows administrator to create a virtual device. Failed to start VDI
backup.
Cookie : 565f8922-2f62-46a8-3-9682e76a8179
Description :
Time : 9/25/2024 8:52:33 AM
StartTime : 9/25/2024 8:52:33 AM
Status : Failed

Does the undocumented cmdlet work in all 12+ versions? I know other servers are in 12+ but not sure of the exact version

Thanks
Costas
david.domask
Veeam Software
Posts: 2663
Liked: 617 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get-VBRPluginBackupSession - where is the log?

Post by david.domask »

Thanks for confirming Costas. For right now, I think use Get-VBRLogItem as a temporary workaround as I'm not sure if this change was intentional and I'm not keen on having you use an undocumented cmdlet long term, so let me confirm a few things internally on if this was an expected change and if we have concerns about using the cmdlet identified.
David Domask | Product Management: Principal Analyst
costas
Influencer
Posts: 10
Liked: 2 times
Joined: Jan 07, 2022 10:37 am
Full Name: Costas Loupas
Contact:

Re: Get-VBRPluginBackupSession - where is the log?

Post by costas »

FYI, I am using the Powershell interface because there is no API for the plugin jobs. Ideally they should be included with the rest of the sessions, just one session endpoint for all types of jobs. I can well imagine as Veeam's capabilities expand new job type are added but the api should make it simpler for those who want to use the data for other reasons.
david.domask
Veeam Software
Posts: 2663
Liked: 617 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get-VBRPluginBackupSession - where is the log?

Post by david.domask »

Understood re: API, it is a major focus to ensure the API endpoints are expanded to cover the areas of the UI where they're missing, so stay tuned and be sure to check the change logs for the new endpoints.

@costas, discussed internally, the behavior is not expected, so I'd ask if you could to please open a Support Case and let us check the behavior. Please:

1. Reproduce the issue (note the date/time of the test and the user you used to test)
2. Export logs from the Veeam server itself (use the 3rd radio button to export from selected hosts, pick the Veeam server)

Open a case and please share the case number here once created.

Thanks!
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests