History Reports

Availability for the Always-On Enterprise

History Reports

Veeam Logoby larry » Mon Feb 27, 2017 3:37 pm

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.
larry
Expert
 
Posts: 372
Liked: 89 times
Joined: Wed Mar 24, 2010 5:47 pm
Full Name: Larry Walker

Re: History Reports

Veeam Logoby mpark » Mon Feb 27, 2017 5:16 pm 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.
mpark
Influencer
 
Posts: 23
Liked: 3 times
Joined: Wed Jan 20, 2016 4:43 am
Full Name: Min Park

Re: History Reports

Veeam Logoby larry » Mon Feb 27, 2017 10:21 pm

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.
larry
Expert
 
Posts: 372
Liked: 89 times
Joined: Wed Mar 24, 2010 5:47 pm
Full Name: Larry Walker

Re: History Reports

Veeam Logoby mpark » Tue Feb 28, 2017 1:56 pm 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
mpark
Influencer
 
Posts: 23
Liked: 3 times
Joined: Wed Jan 20, 2016 4:43 am
Full Name: Min Park

Re: History Reports

Veeam Logoby larry » Wed Mar 01, 2017 7:48 pm 3 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.
larry
Expert
 
Posts: 372
Liked: 89 times
Joined: Wed Mar 24, 2010 5:47 pm
Full Name: Larry Walker

Re: History Reports

Veeam Logoby mpark » Thu Mar 02, 2017 4:40 pm

Nice script! Glad I could help
mpark
Influencer
 
Posts: 23
Liked: 3 times
Joined: Wed Jan 20, 2016 4:43 am
Full Name: Min Park


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot], PenguinSSH and 33 guests