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 » Jun 30, 2014 11:33 pm

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: 16710
Liked: 1396 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get backup size of VM

Post by veremin » Jul 01, 2014 9:28 am

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 » Jul 01, 2014 10:41 pm

I would like to get the backup size of them VM from the last full backup

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

Re: Get backup size of VM

Post by veremin » Jul 02, 2014 8:49 am

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 » Jul 02, 2014 10:58 pm

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: 16710
Liked: 1396 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get backup size of VM

Post by veremin » Jul 03, 2014 8:49 am

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: Google [Bot] and 4 guests