Hello,
For some vm backup inventories or consommation issues, we use script that extract job configuration/consumption but we don't get real size of the backups job because you need to recalculate the job first with your option on the job at the virtual machine tab.
So our graph or analysis are false if we don't do it, so i ask if it's possible to get a script that recalculate all jobs ? Automaticaly each month or manually. Because it's very long to go each job when you have a lot of job and
Regards
-
- Novice
- Posts: 3
- Liked: never
- Joined: Mar 20, 2024 9:54 am
- Full Name: Macé Steve
- Contact:
-
- Veeam Software
- Posts: 1258
- Liked: 328 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Feature Request - Recalculate Option Scriptable
Hi @smace
I'm not sure I'm following fully; how are you trying to calculate this currently?
You should be able to use Get-VBRJobObjects and pass a CJob object (from Get-VBRJob) to get the current state of all added VMs. For a simple example, I can do this:
There is slight annoyance in that the ApproxSizeString property has non-integer characters so to sum up the entire job, we need to use a deeper property. I added another VM to the same job so the result looks like this:
And we can sum this with Measure-Object in Powershell by checking the Info property of the CObjectInJob object returned by Get-VBRJobObject.
There's no need to manually populate the job, so maybe this will work for you? Or maybe I'm misunderstanding, and if so, can you maybe show your code and the output that is not correct until you click the Populate button?
I'm not sure I'm following fully; how are you trying to calculate this currently?
You should be able to use Get-VBRJobObjects and pass a CJob object (from Get-VBRJob) to get the current state of all added VMs. For a simple example, I can do this:
Code: Select all
$job = Get-VBRJob -name 'ps-summation-test'
Get-VBRJobObject -Job $job
Name Type ApproxSize Location
---- ---- ---------- --------
ddom-debian-backmeup Include 16 GB somevc.place.local...
Code: Select all
Get-VBRJobObject -Job $job
Name Type ApproxSize Location
---- ---- ---------- --------
ddom-debian-backmeup Include 16 GB somevc.place.local...
ddom-malware Include 15.8 GB somevc.place.local...
Code: Select all
$objs = Get-VBRJobObject -Job $job
$objs.Info.ApproxSize | Measure-Object -Sum
Count : 2
Average :
Sum : 34125905920 <=== Total size in bytes
Maximum :
Minimum :
Property :
David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: No registered users and 5 guests