PowerShell script exchange
Post Reply
BenBrooks
Lurker
Posts: 2
Liked: never
Joined: Oct 21, 2013 10:32 am
Full Name: Ben Brooks
Contact:

Get-VBRBacupSession for Tape backup

Post by BenBrooks » Oct 21, 2013 10:38 am

Hi,

We have a powershell script which checks various different things in Veeam to monitor our backup jobs. I have been running the "Get-VBRBackupSession" command to get the data I'm after (in this case the size of the data backed up). We have now implemented a backup to tape with Veeam version 7.0

I was wondering if there another powershell command which can get the same information from a Backup to tape, apologies if I'm missed something obvious!!

Thanks in advance,
Ben

veremin
Product Manager
Posts: 16901
Liked: 1438 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get-VBRBacupSession for Tape backup

Post by veremin » Oct 21, 2013 10:58 am

Hi, Ben,

Currently, commandlet “Get-VBRBackupSession” doesn’t return sessions of tape jobs. So, you can either use the following script in order to get only the latest session of tape job:

Code: Select all

$Job = Get-VBRTapeJob -name "Name of tape Job"
$LastSession = $Job.FindLastSession()
$LastSession.Info.BackupTotalSize  


Or use this script in order to get all sessions of tape job:

Code: Select all

asnp VeeamPSSnapin
$Job = Get-VBRTapeJob -name "Name of tape job" 
[Veeam.Backup.Core.CBackupSession]::GetByJob($Job.Id) 
Hope this helps.
Thanks.

BenBrooks
Lurker
Posts: 2
Liked: never
Joined: Oct 21, 2013 10:32 am
Full Name: Ben Brooks
Contact:

Re: Get-VBRBacupSession for Tape backup

Post by BenBrooks » Oct 22, 2013 1:33 pm

Thats great, thanks for your help. Exactly what I was looking for.

Cheers,
Ben

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests