Skip to content

Commit

Permalink
Merge pull request #53 from rebelinux/dev
Browse files Browse the repository at this point in the history
0.5.4
  • Loading branch information
rebelinux authored Sep 17, 2022
2 parents 16958f8 + 3a44983 commit f31a0c1
Show file tree
Hide file tree
Showing 8 changed files with 514 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AsBuiltReport.Veeam.VBR.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.Veeam.VBR.psm1'

# Version number of this module.
ModuleVersion = '0.5.3'
ModuleVersion = '0.5.4'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
1 change: 1 addition & 0 deletions AsBuiltreport.Veeam.VBR.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"Tape": 1,
"Surebackup": 1,
"Agent": 1,
"FileShare": 1,
"Replication": 1
}
},
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# :arrows_clockwise: Veeam VBR As Built Report Changelog

## [0.5.4] - 2022-09-?

### Added

- Added support for File Share Backup Job information
- Added support for Backup Jobs GFS Policy information
### Fixed

- Fixes [#49](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/49)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ The table below outlines the default and maximum **InfoLevel** settings for each
| Tape | 1 | 2 |
| Surebackup | 1 | 2 |
| Agent | 1 | 2 |
| FileShare | 1 | 2 |
| Replication | 1 | 2 |

The table below outlines the default and maximum **InfoLevel** settings for each Replication section.
Expand Down
76 changes: 76 additions & 0 deletions Src/Private/Get-AbrVbrFileShareBackupjob.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

function Get-AbrVbrFileShareBackupjob {
<#
.SYNOPSIS
Used by As Built Report to returns file share jobs created in Veeam Backup & Replication.
.DESCRIPTION
Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.5.4
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Credits: Iain Brighton (@iainbrighton) - PScribo module
.LINK
https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR
#>
[CmdletBinding()]
param (

)

begin {
Write-PscriboMessage "Discovering Veeam VBR File Share Backup jobs information from $System."
}

process {
try {
$FSBkjobs = Get-VBRJob -WarningAction SilentlyContinue | Where-Object {$_.TypeToString -like 'File Backup'}
if ($FSBkjobs.count -gt 0) {
Section -Style Heading3 'File Share Backup Jobs' {
Paragraph "The following section list file share backup jobs created in Veeam Backup & Replication."
BlankLine
$OutObj = @()
foreach ($FSBkjob in $FSBkjobs) {
try {
Write-PscriboMessage "Discovered $($FSBkjob.Name) file share."
$inObj = [ordered] @{
'Name' = $FSBkjob.Name
'Type' = $FSBkjob.TypeToString
'Status' = Switch ($FSBkjob.IsScheduleEnabled) {
'False' {'Disabled'}
'True' {'Enabled'}
}
'Latest Result' = $FSBkjob.info.LatestStatus
'Last Run' = Switch ($FSBkjob.FindLastSession()) {
$Null {'Unknown'}
default {$FSBkjob.FindLastSession().EndTimeUTC}
}
}
$OutObj += [pscustomobject]$inobj
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
}
}

$TableParams = @{
Name = "File Share Backup Jobs - $VeeamBackupServer"
List = $false
ColumnWidths = 25, 20, 15, 15, 25
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Sort-Object -Property 'Name' |Table @TableParams
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
}
}
end {}

}
424 changes: 424 additions & 0 deletions Src/Private/Get-AbrVbrFileShareBackupjobConf.ps1

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Src/Private/Get-AbrVbrReplInfraSummary.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Get-AbrVbrReplInfraSummary {
$TableParams = @{
Name = "Replication Summary - $VeeamBackupServer"
List = $true
ColumnWidths = 40, 60
ColumnWidths = 50, 50
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
Expand Down
5 changes: 5 additions & 0 deletions Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ function Invoke-AsBuiltReport.Veeam.VBR {
Get-AbrVbrAgentBackupjob
Get-AbrVbrAgentBackupjobConf
}
Write-PScriboMessage "File Share Jobs InfoLevel set at $($InfoLevel.Jobs.FileShare)."
if ($InfoLevel.Jobs.FileShare -ge 1) {
Get-AbrVbrFileShareBackupjob
Get-AbrVbrFileShareBackupjobConf
}
}
}
}
Expand Down

0 comments on commit f31a0c1

Please sign in to comment.