Get-VBRBacupSession for Tape backup

PowerShell script exchange

Get-VBRBacupSession for Tape backup

Veeam Logoby BenBrooks » Mon 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
BenBrooks
Lurker
 
Posts: 2
Liked: never
Joined: Mon Oct 21, 2013 10:32 am
Full Name: Ben Brooks

Re: Get-VBRBacupSession for Tape backup

Veeam Logoby v.Eremin » Mon 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.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Get-VBRBacupSession for Tape backup

Veeam Logoby BenBrooks » Tue Oct 22, 2013 1:33 pm

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

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


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests