PowerShell script exchange
Post Reply
lsch
Lurker
Posts: 2
Liked: never
Joined: Oct 12, 2023 7:39 am
Contact:

Get-VBRTapeJob - How to recover the start date and metrics of a backup to tape job

Post by lsch »

Hello,

I am unable to obtain the following data for backup to tape jobs

- Start time
- End time
- Duration
- Total size
- Data read
- Transferred

I'm using Get-VBRTapeJob but the JSON returned doesn't contain the data and I can't find another calllet that does.

Is there a way to return this data with or without powershell?

Thanks in advance for your help.
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get-VBRTapeJob - How to recover the start date and metrics of a backup to tape job

Post by david.domask »

Hi @lsch,

You need to pass the VBRBackupToTape job object to Get-VBRTapeBackupSession -Job parameter:

Code: Select all

$tapejob = Get-VBRTapeJob -Name 'gfs'
 Get-VBRTapeBackupSession -Job $tapejob | Sort -Property CreationTime -Descending | Se
lect -First 1


Progress     : 0
RunManually  : False
Log          : {Id: 1492684, Usn: 12097397, Title: Some tasks require retry, Cookie: , Description: , Time: 10/13/2023
               4:25:41 PM, StartTime: 10/13/2023 1:00:11 AM, Status: None, Id: 1492714, Usn: 12097393, Title: Total
               backup job size: 0 files  (0 B), Cookie: 244480a3-b4f3-4361-bddf-70dcc1df5d68, Description: , Time:
               10/13/2023 4:25:41 PM, StartTime: 10/13/2023 4:25:41 PM, Status: Succeeded, Id: 1495142, Usn: 12078874,
               Title: 0 folders and 1 files backed up, Cookie: , Description: , Time: 10/13/2023 8:03:53 AM,
               StartTime: 10/13/2023 8:03:53 AM, Status: Succeeded, Id: 1495132, Usn: 12078855, Title: Processing
               incremental backup of ddom-tinyvm, Cookie: , Description: , Time: 10/13/2023 8:03:42 AM, StartTime:
               10/13/2023 8:03:30 AM, Status: Succeeded...}
Initiator    : SYSTEM
CreationTime : 10/13/2023 1:00:08 AM
EndTime      : 1/1/1900 12:00:00 AM
JobId        : 0bce7faf-5968-4277-b695-84eed383327d
Result       : None
State        : Idle
That will have most of the stats for you. The transfer items are in Get-VBRTaskSession, which can take the resultant session object from Get-VBRTapeBackupSession.

https://helpcenter.veeam.com/docs/backu ... ml?ver=120
David Domask | Product Management: Principal Analyst
lsch
Lurker
Posts: 2
Liked: never
Joined: Oct 12, 2023 7:39 am
Contact:

Re: Get-VBRTapeJob - How to recover the start date and metrics of a backup to tape job

Post by lsch »

Thanks !
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests