Comprehensive data protection for all workloads
Post Reply
Jonneh
Novice
Posts: 6
Liked: 1 time
Joined: Jun 27, 2017 8:51 am
Full Name: Jonathan Spencer
Contact:

Veeam Maintanence for Patching

Post by Jonneh »

Hi,

If I have a veeam server (windows) and several proxies (also windows) and these machines need to be OS patched and rebooted to comply with .. well, good sense.... how do I do that without generating loads of failure messages which will get logged and needlessly investigated.

The veeam box does hourly replicas with an allowed schedule of 6am-8pm, and copy jobs offsite the data to a target at another datacenter down a VPN.

I can easily schedule this, and make sure no backups are actually running, but you still generate failure messages because the replicas and copy jobs are all in a state where they are "waiting" for the next copy window, so rebooting the box causes a false failure notification even though there is no backup running.

A global maintenance window feature would be nice, but I don't believe that exists. How else can I do this without pissing off first line with false alerts?
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Veeam Maintanence for Patching

Post by PTide »

Hi,

Do you use Veeam One for alarms or just built-in email notifications?
but you still generate failure messages because the replicas and copy jobs are all in a state where they are "waiting" for the next copy window, so rebooting the box causes a false failure notification even though there is no backup running.
Replicas and copy jobs occur between repositories directly without proxy servers. Have you tried completely disabling the jobs first?
A global maintenance window feature would be nice, but I don't believe that exists.It does not
Right, it doesn't. Good candidate for FR though.
How else can I do this without pissing off first line with false alerts?
If you have sevral proxies serving the same set of jobs then you should try temporarily disabling proxies for maintenance, one by one, instead of stopping all the jobs.

Thanks
Jonneh
Novice
Posts: 6
Liked: 1 time
Joined: Jun 27, 2017 8:51 am
Full Name: Jonathan Spencer
Contact:

Re: Veeam Maintanence for Patching

Post by Jonneh »

PTide wrote:Hi,

Do you use Veeam One for alarms or just built-in email notifications?


Replicas and copy jobs occur between repositories directly without proxy servers. Have you tried completely disabling the jobs first?
Sadly running a script to disable the replicas probably would be OK, but disabling the copy jobs still generates a failure message (yes, default email alerts). This customer does not use Veeam One.

How do I log a FR? It does seem logical to me also. Thanks!
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Veeam Maintanence for Patching

Post by PTide »

How do I log a FR?
You just did :)
but disabling the copy jobs still generates a failure message (yes, default email alerts)
If a copy job is a in an 'idle" state then it should not yell when you disable it. If you still get failure messages then I'd suggest you to contact support team.

Thank you
Jonneh
Novice
Posts: 6
Liked: 1 time
Joined: Jun 27, 2017 8:51 am
Full Name: Jonathan Spencer
Contact:

Re: Veeam Maintanence for Patching

Post by Jonneh »

PTide wrote:If a copy job is a in an 'idle" state then it should not yell when you disable it. If you still get failure messages then I'd suggest you to contact support team.
You are right actually, I just tested it on an Idle one. I think before I must have tested it on one that wasn't fully complete. I think we can work this with a simple get-vbrjob | disable-vbrjob at a time when we can be sure there are no jobs actually running, and then just re-enable them after our maintenance window.

Going forward though that script gets more complicated when you want to allow for jobs that might be disabled by design, and a simple script will just re-enable them when it does all the rest. I'd need to write logic into it to test if a job is disabled before the window and then exclude it from being re-enabled.

Thanks for taking the feedback and FR, it would make life much simpler, I'll look forward to it appearing in a future release!
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Veeam Maintanence for Patching

Post by veremin »

Before disabling jobs, you can run this query to get list of already disabled jobs:

Code: Select all

Get-VBRJob | where {$_.IsScheduleEnabled -eq $False} | select name
Then, while re-enabling jobs, be aware to exclude those from this list (name filter).

Thanks.
Jonneh
Novice
Posts: 6
Liked: 1 time
Joined: Jun 27, 2017 8:51 am
Full Name: Jonathan Spencer
Contact:

Re: Veeam Maintanence for Patching

Post by Jonneh » 1 person likes this post

Thanks,

What we did was...

Code: Select all

#  Load Veeam snap-in and connect to Veam server
Add-PSSnapin VeeamPSSnapin
Connect-VBRServer -Server <SERVERNAME>

$mailFrom = "Veeam@customerdomain.com"
$mailTo = "backupalerts@recipient.com"
$SMTPServer = "smtp.host"
$mailSubject = "Veeam Server Maintenance"
$mailBody = "Server is entering scheduled maintenance.  All backup/replication failures shortly before & after this message can be ignored.  A list of 

affected backup jobs is attached"
$mailAttachment = "c:\scripts\joblist.txt"

# Get list of enabled jobs and write the job names to a file
$jobsToDisable = get-vbrjob | ?{$_.isscheduleenabled -eq $true}
$jobsToDisable | select -expand name | set-content c:\scripts\joblist.txt

foreach ($job in $jobsToDisable) {
write-output "Disabling job $($job.name)"
get-vbrjob -name $job | disable-vbrjob
}

Send-MailMessage -From $mailFrom -To $mailTo -SMTPServer $SMTPServer -Subject $mailSubject -Body $mailBody -Attachments $mailAttachment
Then to restart...

Code: Select all

#  Load Veeam snap-in and connect to Veeam server
Add-PSSnapin VeeamPSSnapin
Connect-VBRServer -Server <SERVERNAME>

# Read list of previously running jobs from file
$jobsToEnable = Get-Content c:\scripts\joblist.txt

# Enable each job from the list
foreach ($job in $jobsToEnable) {
write-output "Enabling job $job"
get-vbrjob -name $job | enable-vbrjob
}
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Veeam Maintanence for Patching

Post by veremin »

Yep, that's exactly what I was suggesting. Thank you for sharing the scripts with the community; most appreciated.
Post Reply

Who is online

Users browsing this forum: No registered users and 123 guests