PowerShell script exchange
Post Reply
jed-hyper
Enthusiast
Posts: 39
Liked: 4 times
Joined: Feb 26, 2014 4:42 am
Full Name: Jed Parkes
Contact:

Get backup size of VM

Post by jed-hyper »

I'm trying to get the backup size of each VM in a backup job for reporting so i can see if there is a data increase or decrease of the data in the VM
This command
Get-VBRBackup -name "BackupJob" | Get-VBRRestorePoint -name "VM-Name"| ? {$_.type -eq "Full"}
Show an ApproxSize but the value doesn't seem to change.

Any suggestions?
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get backup size of VM

Post by veremin »

I'm whether you want to get the size of VM in a given restore point or just the size of VM at the time of backup. Thanks.
jed-hyper
Enthusiast
Posts: 39
Liked: 4 times
Joined: Feb 26, 2014 4:42 am
Full Name: Jed Parkes
Contact:

Re: Get backup size of VM

Post by jed-hyper »

I would like to get the backup size of them VM from the last full backup
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get backup size of VM

Post by veremin »

The size of latest restore point can be found via the following script:

Code: Select all

$Backup = Get-VBRBackup -Name "Name of Backup Job"
$LastStorage = $Backup.GetStorages() | sort -Descending | select -last 1
$LastStorage.Info.Stats.BackupSize/1mb
However, it's not possible to get information on what amount of space within given restore point is occupied by specific VM.

Thanks.
jed-hyper
Enthusiast
Posts: 39
Liked: 4 times
Joined: Feb 26, 2014 4:42 am
Full Name: Jed Parkes
Contact:

Re: Get backup size of VM

Post by jed-hyper »

That script came back with a result of 0 ?

I don't want the size of the latest backup job.
I need to know for a specific VM, is that possible?
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get backup size of VM

Post by veremin »

I need to know for a specific VM, is that possible?
As I've mentioned in the previous post, it's not. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests