Comprehensive data protection for all workloads
Post Reply
larry
Veteran
Posts: 387
Liked: 97 times
Joined: Mar 24, 2010 5:47 pm
Full Name: Larry Walker
Contact:

History Reports

Post by larry »

I am still using v9 so it this has changed just let me know.

Can the job history to keep be done by job, not server? The reason I ask is I needed to open history report for a job that triggers every hour. We only keep the backups for three days of this job. Opening the history report can take 15 minutes as we keep 365 days of history. History should just have a setting like the show last number of jobs setting. Monthly jobs we would like to keep years worth of history but hourly jobs way less, and everything in between. For now I am just lowering the weeks to keep for all jobs so I can open the reports. If I just had a number of sessions to keep, setting would work for all jobs for me. I tried setting to show just the last ten sessions but still takes a long time to open report, do I need to restart the veeam server after changing this? Tiring to find setting so reports open in 5 minutes or less. For an audit I need to print the last ten sessions of all jobs, 50 jobs times fifteen plus minutes is painful.
mpark
Enthusiast
Posts: 32
Liked: 4 times
Joined: Jan 20, 2016 4:43 am
Full Name: Min Park
Contact:

Re: History Reports

Post by mpark » 1 person likes this post

Have you tried Veeam One? I'm not sure what the limitation of Veeam One Free version is but I can use Veeam One to pull reports per job.
Someone from Veeam can piggyback on this but I know Veeam One is made for just that, reports customization the Veeam B&R can't do.
larry
Veteran
Posts: 387
Liked: 97 times
Joined: Mar 24, 2010 5:47 pm
Full Name: Larry Walker
Contact:

Re: History Reports

Post by larry »

the report you get when you right click is all I need. Just with so much history on 1 hour jobs it takes a long time to view. With a setting for weeks to keep history applying to all jobs - yearly, monthly, daily and hourly only the hourly jobs reports are slow.
mpark
Enthusiast
Posts: 32
Liked: 4 times
Joined: Jan 20, 2016 4:43 am
Full Name: Min Park
Contact:

Re: History Reports

Post by mpark » 2 people like this post

Right, I understand that as I also wished the reports to be a little more customizable. I ended up choosing Veeam One as it does a lot of things that my organization requires. As for your need, perhaps a powershell might do the trick using Get-VBRBackupSession.

For example, you need last ten session job from all jobs, using for loop to get each server:

Code: Select all

Foreach ($jobname in $jobs){
Get-VbrBackupSession -Name $jobname | select JobName, Result, CreationTime,EndTime
}
You can pick and choose additional properties to meet your audit requirement. I hope it helps.
MP
larry
Veteran
Posts: 387
Liked: 97 times
Joined: Mar 24, 2010 5:47 pm
Full Name: Larry Walker
Contact:

Re: History Reports

Post by larry » 4 people like this post

thanks don't know why I didn't start there. Right click is too easy.
mpark that's for the push in the right direction

ended up with

Code: Select all

Add-PSSnapin "VeeamPSSnapIn" -ErrorAction SilentlyContinue
 

$HourstoCheck = 100000

$tempArry =@()
$tempArry = Get-VBRBackupSession
$allSesh = $allSesh+ $tempArry 

$tempArry =@()
$tempArry = @(Get-VBRJob | ? {$_.JobType -eq "Backup"})
$allJobsBk = $allJobsBk + $tempArry
# Gather all Backup sessions within timeframe
$seshListBk = @($allSesh | ?{($_.CreationTime -ge (Get-Date).AddHours(-$HourstoCheck)) -and $_.JobType -eq "Backup"})

# Get Backup session information
$totalxferBk = 0
$totalReadBk = 0
$seshListBk | %{$totalxferBk += $([Math]::Round([Decimal]$_.Progress.TransferedSize/1GB, 2))}
$seshListBk | %{$totalReadBk += $([Math]::Round([Decimal]$_.Progress.ReadSize/1GB, 2))}
$tempSeshListBk = $seshListBk
$seshListBk = @()
Foreach($job in (Get-VBRJob | ? {$_.JobType -eq "Backup"})) {
$seshListBk += $TempSeshListBk | ?{$_.Jobname -eq $job.name} | Sort-Object CreationTime -Descending | Select-Object -First 10
}

$successSessionsBk = @($seshListBk | ?{$_.Result -eq "Success"})
$warningSessionsBk = @($seshListBk | ?{$_.Result -eq "Warning"})
$failsSessionsBk = @($seshListBk | ?{$_.Result -eq "Failed"})
$runningSessionsBk = @($allSesh | ?{$_.State -eq "Working" -and $_.JobType -eq "Backup"})
$failedSessionsBk = @($seshListBk | ?{($_.Result -eq "Failed") -and ($_.WillBeRetried -ne "True")})

$All = @($seshListBk)



$bodySessSuccBk = $All | Sort Name, Creationtime | Select @{Name="Job Name"; Expression = {$_.Name}},
                @{Name="Start Time"; Expression = {$_.CreationTime}},
                @{Name="Stop Time"; Expression = {$_.EndTime}},
@{Name="Duration (Mins)"; Expression = {[Math]::Round($_.WorkDetails.WorkDuration.TotalMinutes,2)}},
@{Name="Avg Speed (MB/s)"; Expression = {[Math]::Round($_.Info.Progress.AvgSpeed/1MB,2)}},
@{Name="Total (GB)"; Expression = {[Math]::Round($_.Info.Progress.ProcessedSize/1GB,2)}},
@{Name="Processed (GB)"; Expression = {[Math]::Round($_.Info.Progress.ProcessedUsedSize/1GB,2)}},
@{Name="Data Read (GB)"; Expression = {[Math]::Round($_.Info.Progress.ReadSize/1GB,2)}},
@{Name="Transferred (GB)"; Expression = {[Math]::Round($_.Info.Progress.TransferedSize/1GB,2)}},
Result  | ConvertTo-HTML -Fragment
               



$bodySessSuccBk >c:\temp\test.html
Now I get a report of the last ten status of all jobs in under 5 minutes.
mpark
Enthusiast
Posts: 32
Liked: 4 times
Joined: Jan 20, 2016 4:43 am
Full Name: Min Park
Contact:

Re: History Reports

Post by mpark »

Nice script! Glad I could help
Anil1310
Novice
Posts: 5
Liked: never
Joined: Feb 11, 2021 12:00 pm
Full Name: Anil Babu
Contact:

Re: History Reports

Post by Anil1310 »

Hi All... Above script we are not getting backup type ="Windows Agent” details .
Post Reply

Who is online

Users browsing this forum: BaptisteT, Bing [Bot], david.domask, robertbelus, Semrush [Bot] and 118 guests