PowerShell to gather backup sizes per server??

PowerShell script exchange

PowerShell to gather backup sizes per server??

Veeam Logoby tommls » Thu Oct 13, 2016 1:18 pm

VMware has a cmdlet such that one can get a list of VMs' provisioned and used disk sizes.

Does Veeam have anything PowerShell that can do something similar??

I want to nightly get a list of the VMs backed up by Veeam with the size of the daily backup size per VM and the backup date (Get-Date).

I want a csv file output that I can put into Access and calculate daily changes.

Can anyone suggest a script for this?? Or at least the proper PowerShell code to output the daily backup size per VM??

Veeam support says they don't have anything to do this, which surprised me.

What I want is this: "You can see the VMs backed up by a job by going to the statistics of the job. To do this, right click on the job and select Statistics. In the left inside you will see a list of VMs. To see the size of the backup files, go to Backup & Replication --> Backups --> Disk, right click on your Job and select "Properties". The column Backup Size will show you the size of each backup file and the date when the file was created."

I want something to output this data rather than clicking all these backups every day...I can't imagine there's not a way via PowerShell, I'm just not knowledgeable enough to know or find it but once I know what it is I can work with it...This should be something standard in the application.

Thank you, Tom
tommls
Enthusiast
 
Posts: 26
Liked: never
Joined: Tue Apr 28, 2015 7:52 pm
Full Name: Tom Lyczko

how to get $Session.Info Backup Size PER VM PER JOB??

Veeam Logoby tommls » Thu Oct 13, 2016 2:14 pm

I found this in another forum thread, how can I make $Session.Info.BackupTotalSize become ALSO backup size PER VM??
Or anything similar??
I need a script that will look at each job and output the backup size per VM per job daily, after backups have finished.
What is the correct session variable to use??
Is there a list somewhere of session variables obtainable per VM per job per day??

Another way to put it: I need all the backup job properties per job per VM per day.

Thank you, Tom

asnp VeeamPSSnapin
$Job = Get-VBRJob -Name "Name of your job"
$Session = $Job.FindLastSession()
$Session.State
$Session.CreationTime
$Session.EndTime
$Session.Info.BackupTotalSize
$Session.BackupStats.CompressRatio
$Session.BackupStats.DataSize
$Session.BackupStats.DedupRatio

Thank you, Tom
tommls
Enthusiast
 
Posts: 26
Liked: never
Joined: Tue Apr 28, 2015 7:52 pm
Full Name: Tom Lyczko

Re: PowerShell to gather backup sizes per server??

Veeam Logoby tdewin » Fri Oct 14, 2016 1:38 pm

Check out Mimicscript : https://github.com/VeeamHub/powershell/ ... Report.ps1

Look for function calculate-vm and calculate-job. Those basically show you all the fields you are looking for and that are shown in the B&R reports (hence the name MimicReport) (perticiular how to get the "per vm session")

Final note, there is not field that says how much one VM represents inside a single restore point (it is also not something you can look up in the gui)
tdewin
Veeam Software
 
Posts: 1043
Liked: 361 times
Joined: Fri Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 9 guests