Skip to content

Commit

Permalink
Added more health check recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelinux committed Jun 2, 2023
1 parent c45e708 commit 63fdf28
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 10 deletions.
33 changes: 32 additions & 1 deletion Src/Private/Get-AbrVbrAgentBackupjobConf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Get-AbrVbrAgentBackupjobConf {
.DESCRIPTION
Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.7.1
Version: 0.7.2
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down Expand Up @@ -56,6 +56,11 @@ function Get-AbrVbrAgentBackupjobConf {
}
$OutObj = [pscustomobject]$inobj

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description'
$OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description'
}

$TableParams = @{
Name = "Job Mode - $($ABkjob.Name)"
List = $true
Expand All @@ -65,6 +70,12 @@ function Get-AbrVbrAgentBackupjobConf {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description'}) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: It is a general rule of good practice to establish well-defined descriptions. This helps to speed up the fault identification process, as well as enabling better documentation of the environment." -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning "Agent Backup Jobs Common Information Section: $($_.Exception.Message)"
Expand Down Expand Up @@ -468,6 +479,10 @@ function Get-AbrVbrAgentBackupjobConf {
}
$OutObj += [pscustomobject]$inObj

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)'
}

$TableParams = @{
Name = "Advanced Settings (Maintenance) - $($ABkjob.Name)"
List = $true
Expand All @@ -477,6 +492,12 @@ function Get-AbrVbrAgentBackupjobConf {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq 'No' }) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: It is recommended to use storage-level corruption guard for any backup job with no active full backups scheduled. Synthetic full backups are still 'incremental forever' and may suffer from corruption over time. Storage-level corruption guard was introduced to provide a greater level of confidence in integrity of the backups." -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning "Agent Backup Jobs Advanced Settings (Maintenance) Section: $($_.Exception.Message)"
Expand All @@ -501,6 +522,10 @@ function Get-AbrVbrAgentBackupjobConf {
}
$OutObj = [pscustomobject]$inobj

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No'} | Set-Style -Style Warning -Property 'Enabled Backup File Encryption'
}

$TableParams = @{
Name = "Advanced Settings (Storage) - $($ABkjob.Name)"
List = $true
Expand All @@ -510,6 +535,12 @@ function Get-AbrVbrAgentBackupjobConf {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No'}) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: Backup and replica data is a high potential source of vulnerability. To secure data stored in backups and replicas, use Veeam Backup & Replication inbuilt encryption to protect data in backups" -Italic -Bold
}
}
}
}
catch {
Expand Down
13 changes: 12 additions & 1 deletion Src/Private/Get-AbrVbrBackupToTape.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Get-AbrVbrBackupToTape {
.DESCRIPTION
Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.7.1
Version: 0.7.2
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand Down Expand Up @@ -56,6 +56,11 @@ function Get-AbrVbrBackupToTape {
}
$OutObj = [pscustomobject]$inobj

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description'
$OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description'
}

$TableParams = @{
Name = "Common Information - $($TBkjob.Name)"
List = $true
Expand All @@ -65,6 +70,12 @@ function Get-AbrVbrBackupToTape {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description'}) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: It is a general rule of good practice to establish well-defined descriptions. This helps to speed up the fault identification process, as well as enabling better documentation of the environment." -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning "Common Information - $($TBkjob.Name) Section: $($_.Exception.Message)"
Expand Down
21 changes: 21 additions & 0 deletions Src/Private/Get-AbrVbrBackupjobHyperV.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ function Get-AbrVbrBackupjobHyperV {
}
}

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description'
$OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description'
}

$TableParams = @{
Name = "Common Information - $($Bkjob.Name)"
List = $true
Expand All @@ -100,6 +105,12 @@ function Get-AbrVbrBackupjobHyperV {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description'}) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: It is a general rule of good practice to establish well-defined descriptions. This helps to speed up the fault identification process, as well as enabling better documentation of the environment." -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning "Hyper-V Backup Jobs Common Information Section: $($_.Exception.Message)"
Expand Down Expand Up @@ -360,6 +371,10 @@ function Get-AbrVbrBackupjobHyperV {
}
$OutObj = [pscustomobject]$inobj

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No'} | Set-Style -Style Warning -Property 'Enabled Backup File Encryption'
}

$TableParams = @{
Name = "Advanced Settings (Storage) - $($Bkjob.Name)"
List = $true
Expand All @@ -369,6 +384,12 @@ function Get-AbrVbrBackupjobHyperV {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Enabled Backup File Encryption' -eq 'No'}) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: Backup and replica data is a high potential source of vulnerability. To secure data stored in backups and replicas, use Veeam Backup & Replication inbuilt encryption to protect data in backups" -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning "Hyper-V Backup Jobs Advanced Settings (Storage) Section: $($_.Exception.Message)"
Expand Down
23 changes: 22 additions & 1 deletion Src/Private/Get-AbrVbrBackupjobVMware.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ function Get-AbrVbrBackupjobVMware {
}
}

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $Null -like $_.'Description' } | Set-Style -Style Warning -Property 'Description'
$OutObj | Where-Object { $_.'Description' -match "Created by" } | Set-Style -Style Warning -Property 'Description'
}

$TableParams = @{
Name = "Common Information - $($Bkjob.Name)"
List = $true
Expand All @@ -100,6 +105,12 @@ function Get-AbrVbrBackupjobVMware {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Description' -match 'Created by' -or $Null -like $_.'Description'}) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: It is a general rule of good practice to establish well-defined descriptions. This helps to speed up the fault identification process, as well as enabling better documentation of the environment." -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
Expand Down Expand Up @@ -340,7 +351,7 @@ function Get-AbrVbrBackupjobVMware {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($InfoLevel.Jobs.Backup -ge 2 -and ($Bkjob.Options.GenerationPolicy.EnableRechek -or $Bkjob.Options.GenerationPolicy.EnableCompactFull)) {
if ($InfoLevel.Jobs.Backup -ge 2) {
Section -Style NOTOCHeading6 -ExcludeFromTOC "Advanced Settings (Maintenance)" {
$OutObj = @()
try {
Expand All @@ -358,6 +369,10 @@ function Get-AbrVbrBackupjobVMware {
}
$OutObj = [pscustomobject]$inobj

if ($HealthCheck.Jobs.BestPractice) {
$OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq "No" } | Set-Style -Style Warning -Property 'Storage-Level Corruption Guard (SLCG)'
}

$TableParams = @{
Name = "Advanced Settings (Maintenance) - $($Bkjob.Name)"
List = $true
Expand All @@ -367,6 +382,12 @@ function Get-AbrVbrBackupjobVMware {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$OutObj | Table @TableParams
if ($HealthCheck.Jobs.BestPractice) {
if ($OutObj | Where-Object { $_.'Storage-Level Corruption Guard (SLCG)' -eq 'No' }) {
Paragraph "Health Check:" -Italic -Bold -Underline
Paragraph "Best Practice: It is recommended to use storage-level corruption guard for any backup job with no active full backups scheduled. Synthetic full backups are still 'incremental forever' and may suffer from corruption over time. Storage-level corruption guard was introduced to provide a greater level of confidence in integrity of the backups." -Italic -Bold
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
Expand Down
Loading

0 comments on commit 63fdf28

Please sign in to comment.