Hi PowerShell experts and especially Mr. Feoktistov! ![Wink :wink:]()
I'm updating a script of mine that I use to assess restore point sizes. It worked well for v11, but things have changed in v12. My script basically sums up backup sizes for all objects that belong to a restore point = job run. It groups objects in a restore point that belong to a single job run and then it sums up their backup sizes. So, in theory, nothing special. I can easily get restore points:
Then I used to group objects by "CreationTime" and sum up their backup sizes.
It worked well in v11 where this property reflected the original (first run) start time of the job session, meaning the first start and not the last successful retry time. In v12 now every object gets a "real" creation time, meaning if a job retried, the creation time is from the last successful retry. I'm struggling with getting a basis that determines a single job run. I discovered that in v12 a "JobRunId" was added but I'd rather not use this property since I'd like that my script works correctly for v11 and v12. I'd rather use a first job run start time because I also use it in output. Any idea on how to get a first job run start time from every restore point object? I need this for restore points from backup jobs, backup copy jobs and agent backup jobs.
Thanks!
I'm updating a script of mine that I use to assess restore point sizes. It worked well for v11, but things have changed in v12. My script basically sums up backup sizes for all objects that belong to a restore point = job run. It groups objects in a restore point that belong to a single job run and then it sums up their backup sizes. So, in theory, nothing special. I can easily get restore points:
Code:
Get-VBRJob -Name "A Job Name" | ForEach-Object {$_.FindLastBackup()} | Get-VBRRestorePointCode:
$<RestorePoint>.GetStorage().Stats.BackupSizeThanks!
Statistics: Posted by GregorS — Aug 28, 2024 10:17 am







