Discussions related to exporting backups to tape and backing up directly to tape.
Post Reply
Oerten
Service Provider
Posts: 12
Liked: 1 time
Joined: Nov 13, 2018 12:27 pm
Full Name: Fredrik Örtenholm
Contact:

Powershell Tape cmdlets feature request

Post by Oerten »

Hi,

We are sending backup copies to our Tape Library and it works fine and no problems there. VBR version 12.
At a daily basis we are executing a Powershell-script that reports to our invoice system, the amount of backup data our customers have.
The only thing I can't get is the amount of backup data that exists in the Tape library.
Is there a way, through the use of the Powershell cmdlets, to get this amount?

Otherwise it would be a nice to have features in the Powershell cmdlets.

Br,
Fredrik Örtenholm
david.domask
Veeam Software
Posts: 2233
Liked: 541 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Powershell Tape cmdlets feature request

Post by david.domask »

Hi @Oerten,

Try the following Powershell cmdlets:

$TJob = Get-VBRTapeJob -Name 'Name of desired Job'
$TJobSess = Get-VBRSession -Job $Tjob | Sort-Object -Property CreationTime -Descending | Select -First 1
$TaskSess = Get-VBRTaskSession -Session $TJobSess

$TaskSess will have some properties I think you're interested in like Progress property which shows the backup stats, more specifically the Transferred Size.

You can use this to report on the total usage, and just loop over each job session and get the Task session stats.

The output will look something like this:

Code: Select all

PS C:\Users\Administrator> $TaskSession = Get-VBRTaskSession -Session $TSess[0]
PS C:\Users\Administrator> $TaskSession.Progress


PercentCalculation               : BySize
SetTotalToProcessedOnComplete    : True
TotalObjects                     : 2
TotalObjectsDelta                : 0
TotalObjectsCalculationCompleted : True
ProcessedObjects                 : 2
ProcessedSize                    : 3649536
ProcessedUsedSize                : 3649536
ReadSize                         : 3649536
ReadedAverageSize                : 3649536
TransferedSize                   : 3649584
...#truncated for visibility purposes
David Domask | Product Management: Principal Analyst
Oerten
Service Provider
Posts: 12
Liked: 1 time
Joined: Nov 13, 2018 12:27 pm
Full Name: Fredrik Örtenholm
Contact:

Re: Powershell Tape cmdlets feature request

Post by Oerten »

Thank you so much.

I will use those cmdlets to calculate the total Tape Job Size.
Oerten
Service Provider
Posts: 12
Liked: 1 time
Joined: Nov 13, 2018 12:27 pm
Full Name: Fredrik Örtenholm
Contact:

Re: Powershell Tape cmdlets feature request

Post by Oerten »

One thing to figure out is how to get the amount of sessions to summarize.
Simular to the list you get when you open the Properties under Backups/Tape for the related tape content in VBR GUI.
Post Reply

Who is online

Users browsing this forum: No registered users and 55 guests