Getting postprocessing details from backup sessions

PowerShell script exchange

Getting postprocessing details from backup sessions

Veeam Logoby PedroVDP » Tue Sep 22, 2015 8:40 am

I've made some scripts to do some custom reporting using powershell on our jobs with relative success but there's a few jobs that need some extra hand-holding.

Essentially some massive VMs have 300-500 GB of new stored data every day which sometimes can lead to extreme merge operations on forever incremental jobs.

In order to create some reports I'm de-constructing each part of the job's total duration but while it's easy to get the details on an individual VM in a job by listing the task sessions, I'm having trouble finding out where I can get the duration of the post-processing using powershell.

If anyone has a better suggestion, I'd welcome the help.

What I have so far is something along the lines of the below which gets me all details of each individual VM but not the post-processing of the job. Somehow it seems a bit crude to have to sum up all task sessions and subtract it from the total job durations but that's the best I could come up with so far.

Code: Select all
..snip...
foreach ($backup in $vbrsessions) {
      $Sessions = $backup.GetTaskSessions()
      foreach ($VM in $Sessions) {
      # Get Array Data
      $JobName = $backup.OrigJobName
      $Name = $VM.Name
      $Status = $VM.status
      $Size = [Math]::Round([Decimal]$VM.Progress.ProcessedSize/1GB,2)
      $Used = [Math]::Round([Decimal]$VM.Progress.ProcessedUsedSize/1GB,2)
      $Read = [Math]::Round([Decimal]$VM.Progress.Readsize/1GB,2)
      $Stored = [Math]::Round([Decimal]$VM.Progress.StoredSize/1GB,2)
      $Start = $VM.progress.starttime
      $Finish = $VM.progress.stoptime
      $Duration = '{0:00}:{1:00}:{2:00}' -f ($VM.progress.duration | % {$_.Hours, $_.Minutes, $_.Seconds})
        $retry = ($backup.name).split("(")[2] -replace "\)"
      $Message = $VM.GetDetails()

}
...snip...
PedroVDP
Service Provider
 
Posts: 18
Liked: 2 times
Joined: Wed Jan 18, 2012 9:10 am

Re: Getting postprocessing details from backup sessions

Veeam Logoby tsightler » Tue Sep 22, 2015 3:07 pm

I'm assuming by post-processing you mean things like synthetic fulls and merges. Unfortunately I don't know if there's any great way to get those details from specific properties, but you can do a little creative log parsing for the job, so something like:
Code: Select all
$backup.Logger.GetLog().UpdatedRecords | ?{$_.Title -like "*backup file merge*"}

This should return the log entry for the merge or synthetic operation which includes both a status and a start and end time property. To make it work reliably you'll probably need to tweak the exact phrase match, but I've used this approach to reasonable success in the past.
tsightler
Veeam Software
 
Posts: 4772
Liked: 1739 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: Getting postprocessing details from backup sessions

Veeam Logoby PedroVDP » Wed Sep 23, 2015 9:18 am

For merges that would be "Full backup file merge completed successfully" actually.

Thanks, this should do the trick in getting the data out.
PedroVDP
Service Provider
 
Posts: 18
Liked: 2 times
Joined: Wed Jan 18, 2012 9:10 am


Return to PowerShell



Who is online

Users browsing this forum: robbysmith and 8 guests