PowerShell script exchange
Post Reply
kiemann
Novice
Posts: 3
Liked: never
Joined: Jul 21, 2017 9:58 am
Full Name: Stefan Kiemann
Contact:

Backup size for Veeam Agent for Windows

Post by kiemann »

Hallo, i have a question,

in VBR I could show me the backup size of an Veeam Agent for Windows Backup. Could I do this also with powershell?
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Backup size for Veeam Agent for Windows

Post by veremin »

Have you tried already Get-VBRBackup cmdlet?
kiemann
Novice
Posts: 3
Liked: never
Joined: Jul 21, 2017 9:58 am
Full Name: Stefan Kiemann
Contact:

Re: Backup size for Veeam Agent for Windows

Post by kiemann »

Thanks for your help.

Yes I use Get-VBRBackup, but with Get-VBRBackup I did not get any inforamtion about backup size. The only size I get is wenn I use Get-VBRRestorePoint. Their is a variable ApproxSize but this value is without dedup and compression.
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Backup size for Veeam Agent for Windows

Post by veremin »

What about the following one-liner:

Code: Select all

Get-VBRBackup | Select @{N="Job Name";E={$_.Name}}, @{N="Size (GB)";E={[math]::Round(($_.GetAllStorages().Stats.BackupSize | Measure-Object -Sum).Sum/1GB,1)}} | Format-Table -AutoSiz 
Thanks.
kiemann
Novice
Posts: 3
Liked: never
Joined: Jul 21, 2017 9:58 am
Full Name: Stefan Kiemann
Contact:

Re: Backup size for Veeam Agent for Windows

Post by kiemann »

Thank you for your help. This was what i need $_.GetAllStorages().Stats.BackupSize
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Backup size for Veeam Agent for Windows

Post by veremin »

You're welcome. As always with PowerShell it's all about discovery process. I typically assign this or that object to a variable, and then start digging deeper into the properties and methods it has, trying to find information I need. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests