Comprehensive data protection for all workloads
Post Reply
thatstheplace
Novice
Posts: 7
Liked: 5 times
Joined: Jan 29, 2023 5:57 pm
Contact:

Multiple questions after upgrade to V12

Post by thatstheplace »

Hi,

after reading and testing the changes of V12, I have some questions.

1. Healthchecks are now scheduled independent of backup jobs. Can we start it manually? Best for me would be with powershell or trigger healthchecks after backups completed?

2. Is it possible to send E-Mails with the results of the healthecks?

3. Can we change the time of the background retention? At the moment its hardcoded at "every 24 hours at 00:30"?

4. I have an backup repository on an SMB share, how would I make it immutable?

Thanks in advance!
steamrick
Novice
Posts: 7
Liked: 2 times
Joined: Jul 11, 2020 7:53 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by steamrick »

1. Not per Powershell, at least. There's only the very specific Start-VBRNASBackupHealthCheck command.
2. Good question
3. I'd very much like that. 00:30 is highly inconvenient for me.
4. Immutability is impossible on SMB, afaik. The protocol doesn't allow for it.
mkretzer
Veteran
Posts: 1255
Liked: 444 times
Joined: Dec 17, 2015 7:17 am
Contact:

Re: Multiple questions after upgrade to V12

Post by mkretzer » 2 people like this post

3. is just not very smart if it has still the same impact as with V11a. We have jobs where deleting the ~10000 points of one job takes > 12 hours. In that time all other backups run significantly slower. It would thus make sense to be run at daytime when there are less backups running!
thatstheplace
Novice
Posts: 7
Liked: 5 times
Joined: Jan 29, 2023 5:57 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by thatstheplace »

steamrick wrote: Mar 14, 2023 7:56 pm 1. Not per Powershell, at least. There's only the very specific Start-VBRNASBackupHealthCheck command.
2. Good question
3. I'd very much like that. 00:30 is highly inconvenient for me.
4. Immutability is impossible on SMB, afaik. The protocol doesn't allow for it.
1. Is it possible at all, when not with powershell? I did see the command "Start-VBRNASBackupHealthCheck" but its only for NAS Backup I think. Or is it possible to do the healthcheck after the backup like in v11?
4. Do you have an advice for immutable backups with veeam on a repository which is placed on a synology?
steamrick
Novice
Posts: 7
Liked: 2 times
Joined: Jul 11, 2020 7:53 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by steamrick » 2 people like this post

@mkretzer - Gostev posted regkeys to change the time here: veeam-backup-replication-f2/scheduling- ... 85775.html

@thatstheplace:
1. There doesn't seem to be a function to trigger one, but you can set the time for 5 minutes after you save the job...
4. I think you only chance is to run a linux hardened repository VM on it like described here: https://infrageeks.com/post/2022-01-27. ... ology-nas/

If you're stuck with the Synology, maybe do offline backup copies onto USB HDDs? Offline is another form of immutability...
Mildur
Product Manager
Posts: 10369
Liked: 2781 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Multiple questions after upgrade to V12

Post by Mildur » 3 people like this post

1) Start-VBRBackupHealthCheck
Undocumented command :)

Maybe we will document it in the future.

Best,
Fabian
Product Management Analyst @ Veeam Software
thatstheplace
Novice
Posts: 7
Liked: 5 times
Joined: Jan 29, 2023 5:57 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by thatstheplace »

@Mildur - Nice, thanks! Could you give an example for such a call?

I tried "Start-VBRBackupHealthCheck -?" but there aren't any examples. It says:

SYNTAX
Start-VBRBackupHealthCheck [-Backup] <CBackup> [[-Oib] <COib>] [-RunAsync] [<CommonParameters>]

But where do I get CBackup?

My problem is that, when I'm calling Start-VBRBackupHealthCheck -Backup "Server Backup" I get an error:

Start-VBRBackupHealthCheck : Der Parameter "Backup" kann nicht gebunden werden. Der Wert "Veeam.Backup.Core.CBackupJob" vom Typ "Veeam.Backup.Core.CBackupJob" kann nicht in den Typ
"Veeam.Backup.Core.CBackup" konvertiert werden.
In Zeile:1 Zeichen:36
+ Start-VBRBackupHealthCheck -Backup "Server Backup"
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-VBRBackupHealthCheck], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.PowerShell.Cmdlets.StartVBRBackupHealthCheck

My backup job name is Server Backup, the hostname of the device is Server. With "Server" I just get the error that there aren't found any jobs named like this.

@Mildur - Do you have such a hidden feature for point 2 too? Could we send E-Mails with the results of the healtchecks?

@steamrick - Thanks! I will think about the linux hardened repository VM!
mkretzer
Veteran
Posts: 1255
Liked: 444 times
Joined: Dec 17, 2015 7:17 am
Contact:

Re: Multiple questions after upgrade to V12

Post by mkretzer »

steamrick wrote: Mar 14, 2023 11:36 pm @mkretzer - Gostev posted regkeys to change the time here: veeam-backup-replication-f2/scheduling- ... 85775.html
Very nice, thank you!
Mildur
Product Manager
Posts: 10369
Liked: 2781 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Multiple questions after upgrade to V12

Post by Mildur »

@thatstheplace
I need to check the command again. I'll give you an update.
@Mildur - Do you have such a hidden feature for point 2 too? Could we send E-Mails with the results of the healtchecks?
Will also come back on this point.

Best,
Fabian
Product Management Analyst @ Veeam Software
marco.horstmann
Veeam Software
Posts: 618
Liked: 116 times
Joined: Dec 31, 2014 3:05 pm
Full Name: Marco Horstmann
Location: Hannover, Germany
Contact:

Re: Multiple questions after upgrade to V12

Post by marco.horstmann »

thatstheplace wrote: Mar 15, 2023 4:40 pm But where do I get CBackup?
Hi,
you first get the backup object of your job and pipe this to the command.

Code: Select all

Get-VBRBackup -Name "Server Backup" | Start-VBRBackupHealthCheck
That was all I had to do in my lab.

Kind regards
Marco
Marco Horstmann
Senior System Engineer @ Veeam Software

@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
cgsm
Expert
Posts: 101
Liked: 21 times
Joined: Oct 05, 2021 3:55 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by cgsm »

I am interested in the OP's #2, emails for health checks. It does not seem like the health check for a job uses the same email settings for the parent job (i.e.: backup job has emails set for failures only, but if the health check fails no email is sent).
marco.horstmann
Veeam Software
Posts: 618
Liked: 116 times
Joined: Dec 31, 2014 3:05 pm
Full Name: Marco Horstmann
Location: Hannover, Germany
Contact:

Re: Multiple questions after upgrade to V12

Post by marco.horstmann »

marco.horstmann wrote: Mar 20, 2023 8:57 am Hi,
you first get the backup object of your job and pipe this to the command.

Code: Select all

Get-VBRBackup -Name "Server Backup" | Start-VBRBackupHealthCheck
That was all I had to do in my lab.

Kind regards
Marco
Seems that this command actually doesn't do anything. We are investigating.
Marco Horstmann
Senior System Engineer @ Veeam Software

@marcohorstmann
https://horstmann.in
VMware VCP
NetApp NCIE-SAN for 7-Mode and Clustered Ontap
NorthGuard
Service Provider
Posts: 108
Liked: 8 times
Joined: Jan 19, 2022 4:48 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by NorthGuard »

thatstheplace wrote: Mar 14, 2023 10:53 pm 4. Do you have an advice for immutable backups with veeam on a repository which is placed on a synology?
For what it's worth, I have begun rolling out QNAP NAS devices with their QuObjects to achieve local immutability. Maybe you could sell the Synology and replace with a QNAP?
Mildur
Product Manager
Posts: 10369
Liked: 2781 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Multiple questions after upgrade to V12

Post by Mildur »

A small update:
2. Is it possible to send E-Mails with the results of the healthecks?
Not yet. Will be solved by a future update.
Start-VBRBackupHealthCheck - Seems that this command actually doesn't do anything. We are investigating.
The command doesn't work with the new V12 backup chain type. Using the scheduler is the only method to run a health check immediately. Configure the health check scheduler a few minutes from now and the health check will start.

Best,
Fabian
Product Management Analyst @ Veeam Software
thatstheplace
Novice
Posts: 7
Liked: 5 times
Joined: Jan 29, 2023 5:57 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by thatstheplace » 2 people like this post

Maybe this is helping somebody, because there is no way to start Healthchecks manually yet:

This is setting the time of the Healthcheck of a Veeam Agent Backup to 1 minute after now, waits for the job to finish and disables the Healthcheck after that.

Code: Select all

 # Veeam Physical Machine HV01 Healthcheck

    # Get Job
    $job = Get-VBRComputerBackupJob -Name "HV-HV01-NAS01"

    # Get Time + 1 Minute
    $newCheckTime = (Get-Date).AddMinutes(1)

    # Create Healthcheck-Options
    $healthCheckOptions = New-VBRHealthCheckOptions -Enable -ScheduleType Weekly -DayOfWeek Sunday -DayNumber 1 -SelectedDays 0,1,2,3,4,5,6 -WeeklyPeriod ([TimeSpan]::Parse($newCheckTime.ToString("HH:mm:ss")))

    # Set Healthcheck-Options
    Set-VBRComputerBackupJob -Job $job -HealthCheckOptions $healthCheckOptions

    Start-Sleep -Seconds 300

    do {
        Start-Sleep -Seconds 60
        # Get last Healtcheck-Session
        $lastSession = Get-VBRSession -Type HealthCheck | Sort-Object -Property CreationTime -Descending | Select-Object -First 1

        $lastSessionState = $lastSession.State

        # Check state of last Healtcheck-Session
        if ($lastSessionState -eq 'Working') {
            Write-Host ("Healthcheck runnning.")
            Write-Host ("Starttime:" + $lastSession.CreationTime)
        } else {
            Write-Host ("No Healthcheck running.")
            Write-Host ("Starttime:" + $lastSession.CreationTime)
            Write-Host ("Endtime:" + $lastSession.EndTime)
        }
    } while ($lastSessionState -eq 'Working')

    # Create Healthcheck-Options
    $healthCheckOptions = New-VBRHealthCheckOptions -Enable:$false -EnableFullHealthCheck:$false -ScheduleType Weekly

    # Set Healthcheck-Options
    Set-VBRComputerBackupJob -Job $job -HealthCheckOptions $healthCheckOptions
    

This is setting the time of the Healthcheck of a Veeam HyperV Backup to 1 minute after now, waits for the job to finish and disables the Healthcheck after that.

Code: Select all

 # Veeam Virtual Machines HV01 Healthcheck

    # Get Job
    $job = Get-VBRJob -Name "VM-HV01-NAS01"

    # Get Options
    $jobOptions = Get-VBRJobOptions -Job $job

    # Get Time + 1 Minute
    $newCheckTime = (Get-Date).AddMinutes(1)

    # Set RecheckTime
    $jobOptions.GenerationPolicy.RecheckTime = [TimeSpan]::Parse($newCheckTime.ToString("HH:mm:ss"))
    
    # Enable Healthcheck
    $jobOptions.GenerationPolicy.EnableRechek = $true
    
    # Set Options
    Set-VBRJobOptions -Job $job -Options $jobOptions

    Start-Sleep -Seconds 300

    do {
        Start-Sleep -Seconds 60
        # Get last Healtcheck-Session
        $lastSession = Get-VBRSession -Type HealthCheck | Sort-Object -Property CreationTime -Descending | Select-Object -First 1

        $lastSessionState = $lastSession.State

        # Check state of last Healtcheck-Session
        if ($lastSessionState -eq 'Working') {
            Write-Host ("Healthcheck runnning.")
            Write-Host ("Starttime:" + $lastSession.CreationTime)
        } else {
            Write-Host ("No Healthcheck running.")
            Write-Host ("Starttime:" + $lastSession.CreationTime)
            Write-Host ("Endtime:" + $lastSession.EndTime)
        }
    } while ($lastSessionState -eq 'Working')
    
    # Disable Healthcheck
    $jobOptions.GenerationPolicy.EnableRechek = $false

    # Set Options
    Set-VBRJobOptions -Job $job -Options $jobOptions 
Can't remember if it came with an update, but the results of the healtchecks are coming daily now. I think they are coming from the daily reports in the general options of Veeam.
Mildur
Product Manager
Posts: 10369
Liked: 2781 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Multiple questions after upgrade to V12

Post by Mildur »

Thank you for sharing this script with the community.
Can't remember if it came with an update, but the results of the healtchecks are coming daily now. I think they are coming from the daily reports in the general options of Veeam.
Correct. Mail notification for the new health checks was added in version 12.1.

Best,
Fabian
Product Management Analyst @ Veeam Software
JPMS
Expert
Posts: 144
Liked: 53 times
Joined: Nov 02, 2019 6:19 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by JPMS »

If anybody wants to do Health Check on a Copy Job, the syntax is similar to an Agent Backup but uses Get-VBRBackupCopyJob and Set-VBRBackupCopyJob instead.

So @thatstheplace's code would look like this:

Code: Select all

# Health Check Copy Backup
$job = Get-VBRBackupCopyJob -Name "VM-HV01-NAS01"
$newCheckTime = (Get-Date).AddMinutes(1)
$healthCheckOptions = New-VBRHealthCheckOptions -Enable -ScheduleType Weekly -DayOfWeek Sunday -DayNumber 1 -SelectedDays 0,1,2,3,4,5,6 -WeeklyPeriod ([TimeSpan]::Parse($newCheckTime.ToString("HH:mm:ss")))
Set-VBRBackupCopyJob -Job $job -HealthCheckOptions $healthCheckOptions
Start-Sleep -Seconds 300
do {
    Start-Sleep -Seconds 60
    $lastSession = Get-VBRSession -Type HealthCheck | Sort-Object -Property CreationTime -Descending | Select-Object -First 1
    $lastSessionState = $lastSession.State
    if ($lastSessionState -eq 'Working') {
        Write-Host ("Healthcheck runnning.")
        Write-Host ("Starttime:" + $lastSession.CreationTime)
    } else {
        Write-Host ("No Healthcheck running.")
        Write-Host ("Starttime:" + $lastSession.CreationTime)
        Write-Host ("Endtime:" + $lastSession.EndTime)
    }
    } while ($lastSessionState -eq 'Working')
# Disable Heath Check for Hyper-V copy backup
$healthCheckOptions = New-VBRHealthCheckOptions -Enable:$false -EnableFullHealthCheck:$false -ScheduleType Weekly
Set-VBRBackupCopyJob -Job $job -HealthCheckOptions $healthCheckOptions
    
I've removed the comments because this is from my working version but if you need any explanations you can get them from the Agent Backup as originally posted by @thatstheplace
JPMS
Expert
Posts: 144
Liked: 53 times
Joined: Nov 02, 2019 6:19 pm
Contact:

Re: Multiple questions after upgrade to V12

Post by JPMS » 1 person likes this post

I found a small issue with the code for carrying out the health check for a VM backup as it does not set the day. If you previously set the day to the day you want, or you have all days selected it will work fine. If neither of these is true, you may want to add the code "$jobOptions.GenerationPolicy.RecheckDays = (Get-Date).DayOfWeek".

With the additional line, you cover all situations.

So, @thatstheplace's code would become:

Code: Select all

 # Veeam Virtual Machines HV01 Healthcheck

    # Get Job
    $job = Get-VBRJob -Name "VM-HV01-NAS01"

    # Get Options
    $jobOptions = Get-VBRJobOptions -Job $job

    # Get Time + 1 Minute
    $newCheckTime = (Get-Date).AddMinutes(1)

    # Set RecheckTime
    $jobOptions.GenerationPolicy.RecheckTime = [TimeSpan]::Parse($newCheckTime.ToString("HH:mm:ss"))
    
    # Set RecheckDay
    $jobOptions.GenerationPolicy.RecheckDays = (Get-Date).DayOfWeek
    
    # Enable Healthcheck
    $jobOptions.GenerationPolicy.EnableRechek = $true
    
    # Set Options
    Set-VBRJobOptions -Job $job -Options $jobOptions

    Start-Sleep -Seconds 300

    do {
        Start-Sleep -Seconds 60
        # Get last Healtcheck-Session
        $lastSession = Get-VBRSession -Type HealthCheck | Sort-Object -Property CreationTime -Descending | Select-Object -First 1

        $lastSessionState = $lastSession.State

        # Check state of last Healtcheck-Session
        if ($lastSessionState -eq 'Working') {
            Write-Host ("Healthcheck runnning.")
            Write-Host ("Starttime:" + $lastSession.CreationTime)
        } else {
            Write-Host ("No Healthcheck running.")
            Write-Host ("Starttime:" + $lastSession.CreationTime)
            Write-Host ("Endtime:" + $lastSession.EndTime)
        }
    } while ($lastSessionState -eq 'Working')
    
    # Disable Healthcheck
    $jobOptions.GenerationPolicy.EnableRechek = $false

    # Set Options
    Set-VBRJobOptions -Job $job -Options $jobOptions 
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ivan239 and 119 guests