PowerShell script exchange
Post Reply
jbennett
Enthusiast
Posts: 33
Liked: 12 times
Joined: Jun 23, 2015 3:47 pm
Full Name: Justin Bennett
Location: Los Angeles, CA
Contact:

Run All VMware Backup Jobs CBT disabled and re-enable after

Post by jbennett »

In light to the CBT bug KB2136854 ref:http://forums.veeam.com/vmware-vsphere- ... 31280.html, I wanted to be able to schedule of our VMware backup jobs to run once a week without CBT disabled, then re-enable CBT once it's done. Also, I only wanted to limit CBT disabled to one job at a time to prevent such a large impact on our entire systems and jobs.

https://github.com/cajeeper/Veeam/blob/ ... outCBT.ps1

Image

Can any expert let me know if I'm on the right track?

Thank you,
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Run All VMware Backup Jobs CBT disabled and re-enable af

Post by veremin » 1 person likes this post

I would limit the scope to backup and replication jobs, because along with backup and replication jobs Get-VBRJob commandlet would return file copy, VM copy and backup copy jobs. Then, your code would try to disable CBT on them and execute them in accordance. So, this modification might be needed:

Code: Select all

Get-VBRJob | ? {$_.JobType -eq "Backup" -or $_.JobType -eq "Replica"}
Other than that, everything looks good.

Thanks.
jbennett
Enthusiast
Posts: 33
Liked: 12 times
Joined: Jun 23, 2015 3:47 pm
Full Name: Justin Bennett
Location: Los Angeles, CA
Contact:

Re: Run All VMware Backup Jobs CBT disabled and re-enable af

Post by jbennett »

v.Eremin wrote:I would limit the scope to backup and replication jobs...
Good call. We're not using replications just yet. I've added that limitation.

So far, I've tested it with some jobs and seemed to work as expected.

Thank you!
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Run All VMware Backup Jobs CBT disabled and re-enable af

Post by veremin »

You're welcome. Should other questions arise, don't hesitate to ask. Thanks.
jbennett
Enthusiast
Posts: 33
Liked: 12 times
Joined: Jun 23, 2015 3:47 pm
Full Name: Justin Bennett
Location: Los Angeles, CA
Contact:

Re: Run All VMware Backup Jobs CBT disabled and re-enable af

Post by jbennett » 2 people like this post

So far, it's been working just fine. It's going on 40 hours in our system, but it's still churning away. 1 more job out of 7 left.

I can't wait for that patch Gostev just mentioned in the weekly digest.
-Justin
[@cajeeper]|[http://www.allthingstechie.net]
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests